Classic scenario, where an order has order lines.
The client wants to be able to apply a rebate to the entire order, that is either a fixed amount or a percentage.
What would be the best way to implement that?
I am thinking storing two fields on the order-object:
- Rebate fixed amount
- Rebate percentage
And then I can calculate the total rebate - and make the rebate an order line, that I re-calc every time the rebate-fields or order lines are changed.
Caveats, hints, best practices?