Development #7128
Updated by Kyle Chong 3 months ago
Refer to: * docs/planning/modules/M05_Discount_Engine.md * docs/planning/modules/M03_POS_Terminal_Cart.md Implement discount against the overall receipt/cart. Scope: * Apply percentage or fixed-amount receipt discount. * Validate user permission/approval where required. * Validate maximum/permitted discount. * Determine how receipt discount is allocated across eligible cart lines. * Exclude ineligible lines where applicable. * Recalculate receipt subtotal Discount Engine (M05) (docs/planning/modules/M05_Discount_Engine.md). At payment, save one TransactionDiscount for each rule that fired and final amount. * Recalculate affected M04 taxable amounts. * Record requesting/approving user and reason where required. * Support removal/reversal of an applied receipt discount before payment. one TransactionLineDiscount for each line allocation. Done when: A valid when reports can show both receipt-level and item-level discount can be applied and correctly distributed/recalculated across the cart. evidence.