1.9 KiB
POS Loyalty Discount Before Tax
This module modifies the loyalty reward discount calculation in POS to apply discounts before tax calculation and ensures that discount values are displayed as tax-exclusive in both the POS receipt and accounting entries.
Features
-
Discount Calculation Before Tax: All loyalty rewards are calculated on the tax-exclusive amount rather than the tax-inclusive amount.
-
Tax-Exclusive Display: Discount values are displayed as tax-exclusive in the POS receipt.
-
Proper Accounting Entries: Accounting entries are created with tax only on the credit side, ensuring compliance with accounting standards.
Technical Changes
JavaScript Changes
- Modified
static/src/overrides/models/loyalty.jsto calculate discounts on tax-exclusive amounts - Ensured discount line values are tax-exclusive for display purposes
Backend Changes
- Created
models/pos_order.pyto handle accounting entries for loyalty discounts - Created
models/loyalty_reward.pyto ensure discount products are properly configured - Created
models/account_move.pyto ensure discount lines in account moves are tax-exclusive - Created
models/pos_session.pyto handle session-level accounting for loyalty discounts
Installation
- Copy the module to your Odoo addons directory
- Update the apps list in Odoo
- Install the "POS Loyalty Discount Before Tax" module
Configuration
No additional configuration is required. The module automatically applies the changes to all loyalty programs in POS.
Usage
The module works automatically with all existing loyalty programs. Discounts will be calculated on tax-exclusive amounts and displayed as such in the POS interface and accounting entries.
Compatibility
This module is compatible with Odoo 17 and requires the following modules:
- point_of_sale
- pos_loyalty
License
LGPL-3