Academy index
Page referenceIntermediate/sales/rebates
Rebate Management
A rebate agreement gives a customer a share of its purchases. The page keeps agreements and computes a monthly accrual with no entry; parts of it do not work yet.
Reviewed independently, claim by claim against the sources and the screens, on 3 December 2026.
Last checked against the screen and the code: 3 December 2026, version 9e9c7ecf9.
This page of the program is under construction: the reference states only what works in it today.
What this page is
A rebate is an agreement to give a customer back a share of what it bought over a set period. This page keeps rebate agreements with customers: each one's type, rebate rate, target value and validity period. Nothing prevents several agreements for the same customer, even overlapping ones, and each accrues on the same invoices. The «Calculate» button works out, for every agreement in force, what the customer earned for the current month.
The calculation: the month's basis is the customer's posted invoices dated in it, net of VAT, less its posted credit notes of the same month, net of VAT; it is then multiplied by the rebate rate. Drafts, cancelled and rejected documents and deemed supplies are left out. Each document is translated into the company's currency at its own rate. The whole month is taken even if the agreement starts or ends inside it. One row per agreement per month is kept on the «Accruals» tab and worked out again each time you press «Calculate» in the same month.
What does not work today: in the agreements table the Customer column stays empty, searching by the customer's name finds nothing, the «Achievement» and «Accrued» columns show no correct figure, and the «Total Accrued», «Total Paid» and «Avg Achievement» cards stay at zero; the program stores the customer's sales and the total accrued on the agreement, but the page does not show them. The «Settle» button never appears, so no agreement is settled from this page. After «Calculate», the new row does not show on the «Accruals» tab until you reload the page in the browser. The type and status names show in English.
This page posts no entry to the books: the accrual is a figure for follow-up. No rebate expense or liability to the customer is recorded, and the customer's balance is not lowered. Lowering what a customer owes is done by a credit note on the credit notes page, which is not linked to this agreement.
The agreement type and the target value are kept for reference: the calculation is the same for every type, and the rate applies from the first dirham without the target being reached.
Before you start
- An active customer in the contacts.
- Sales invoices issued to the customer during the agreement's period: the accrual is worked out from them.
Fields
| Field as on the screen | Meaning | Required |
|---|---|---|
| Agreement Type | The agreement type: volume, growth, promotional or loyalty. Kept for reference; it does not change the calculation. | Yes |
| Customer | The customer whose invoices make the agreement's sales.The company's own customer, and active. | Yes |
| Target Value | The sales targeted over the agreement's period, for follow-up. The calculation does not require reaching it.Not negative. | Yes |
| Rebate Rate | The percentage the month's sales are multiplied by.From 0 to 100. | Yes |
| Start Date | The agreement's first day; its number is taken from the agreement sequence of that year. The customer's sales since the start are added from it, but a month's accrual counts the whole month: an agreement starting on the 15th also counts the invoices of the days before. | Yes |
| End Date | The agreement's last day. Months starting after it are left out, but the month holding the end date is counted whole, invoices after that day included.Not before the start date. | Yes |
Buttons and actions
| Button | When it shows | What it does | Posts |
|---|---|---|---|
| New | Always, at the top of the page. | Opens a new rebate agreement form. | No |
| Create | In the agreement form. | Saves the agreement as active with a number from the rebate agreement sequence. | No |
| Calculate | Always, at the top of the page. | Works out the current month's accrual for every agreement that has a customer and whose period covers the month, and saves or updates it. Posts no entry. The result does not show on the «Accruals» tab until you reload the page in the browser. | No |
| Export | Always, at the top of the page. | Downloads the table shown as a CSV file. | No |
| Always, at the top of the page. | Prints the page. | No |
The document's statuses
- Active (agreement): The agreement from its save; it is calculated in the months its period covers. The screen shows the English word «active».
- Pending (accrual row): A month's accrual, worked out again each time you press «Calculate» in the same month. The screen shows the English word «pending».
Permissions
| To | Permission needed |
|---|---|
| Open the page and read the agreements and accruals | Sales — View |
| Save an agreement, and press «Calculate» | Sales — Create |
Refusals and fixes
VALIDATION_ERRORA required field is missing, the rate is above 100, or the end date is before the start. The message names the field.
Fix: Correct the field named and save again.
CONTACT_INACTIVEThe customer is inactive: no new agreement is made with it.
Fix: Reactivate the customer in the contacts if you still deal with it.
MODULE_PERMISSIONYou tried to save an agreement or press «Calculate» and your role lacks the sales create right.
Fix: Ask the administrator to give your role the sales create right.
Related pages
Educational content for general understanding, not accounting, tax or legal advice. Sources · About the Academy