A discount rule gives a standing discount on a sale line without anybody having to remember it. You set it up once — “10% off everything in the Beverages category”, “50 AFN off this item for wholesale customers” — and the sale form fills the discount in for you when that item is added to an invoice.
What a rule is made of
| Field | What it does |
|---|---|
| Name | A label you will recognise later, e.g. “Ramadan promo”. It is shown on the sale line so the cashier can see where the figure came from. |
| Applies to | All items, or one brand, one category, or one item. |
| Target | Which brand, category or item — depending on what you chose above. |
| Discount type | Percentage of the line, or a fixed amount off it. |
| Value | The percentage or the amount. |
| Customer group | “All customers”, or one group. A rule aimed at a group only fires for customers in it. |
| Minimum quantity | The rule waits until the line reaches this quantity. Leave empty for no minimum. |
| Starts / Ends | The date window. Leave either side empty for open-ended. |
| Priority | A switch. When two rules are equally specific, the one switched on wins. |
| Active | Turn a rule off without deleting it. |
| Show on invoice | Whether the discount is printed on the customer’s invoice. |
Which rule wins
Only ever one. Discounts never stack. The most specific rule wins, and a rule aimed at the customer’s group beats the same kind of rule without one:
| Rule | Beats |
|---|---|
| Named item | A category, brand or all-items rule |
| Category | A brand or all-items rule |
| Brand | An all-items rule |
| Tied to a customer group | The same scope without a group |
If two rules are still level after that, the one with Priority switched on wins; if both or neither have it, the larger discount does.
On the sale form
Add the item to a sale and the discount box fills in by itself, with the rule’s name underneath it. The figure is a suggestion, not a lock: type over it and it is yours — the rules stop touching that line, even if you change the quantity afterwards. A small “Apply …” link appears so you can hand the line back to the rule if you change your mind.
A quantity change can move the line onto a different rule — a “10 or more” bulk rule takes over as soon as the line reaches 10, and drops away again if you reduce it. Changing the customer re-checks every line that you have not typed over, because a different customer may be in a different group.