Related topics
This is the start-up program for rebuilding rebate agreements.
When a rebate agreement is rebuilt all rebate transactions belonging to the agreement will be deleted, with the exception of the transactions that have been selected on rebate payments/claims (e.g., if the transactions have already been claimed/paid). In terms of the transaction status, this means those transactions with the following statuses are deleted:
F | Final transaction |
D | Deleted-marked agreement |
The transactions with the following transaction statuses cannot be deleted:
S | Transactions are selected |
O | Claim/Payment order is created |
C | Rebate is claimed/paid |
For all deleted transactions, bookkeeping transactions and statistic information are created as if the transaction was manually deleted.
Once the transactions are deleted, a new rebate calculation will take place for the rebate agreement. The invoice lines/goods reception transactions that are marked as already included in a previous calculation run are now read again. The program determines within which dates these lines/transactions are to be read based on the earliest from/start date and the latest to/end date amongst those agreements that have been selected for rebuild. New transactions will then be created for the rebuilt agreements, just as if a normal calculation run was taking place (so new bookkeeping transactions and statistics information are created). Those transactions that could not be deleted are also updated. Instead of deleting the transaction the field for calculated rebate amount gets set to zero. The transaction is then updated with the new calculated rebate amount. If the transaction was actually no longer valid, the calculated rebate amount will remain as zero. Thus, if the claimed/paid amount is different than the calculated rebate amount, it will be possible to find those transactions where you have not actually paid/claimed what the system believes is the correct rebate amount.
Note: It is possible to set up the system in a way that rebate transactions belonging to one agreement can either be based on rebate transactions from other agreements, or themselves have an effect on rebate transactions on other agreements. This can happen if you have rebate agreement types that are flagged for Single rebate or for End rebate. It can also happen if any agreement is flagged for Rebate reduction. If the rebuild routine detects that any kind of dependencies can occur for transactions on the agreement that are rebuilt, it will automatically rebuild those agreements that can be affected. So even though you only select to rebuild one agreement, it is possible to end up in a situation where several (or even all) active and open agreements are rebuilt.
Selection fields
- Accounting period
- The current accounting period is defaulted. If necessary, change the accounting period for the bookkeeping transactions.
- Only changed
- Indicate if only rebate agreements that are marked as changed should be rebuilt. This field is set to YES by default, meaning that only changed rebate agreements will be included. If you change the flag to NO, all open and active agreements are rebuilt.