Projects/Projects:Taxes per BOM/Technical Documentation
Definition
- New field BOM Price in Bill of Materials tab of the Products window to define the proportion of price to tax
- New field as per BOM in tax category window to allow to identify that taxes for products defined as Bill of Materials have to be calculated based on the taxes of the products that compose the list of products.
Retail master data
- New retail master data model for bill of materials with all the information included.
- Add new field Bill of Materials in products master data
- Add new field as per BOM in taxes categories master data
Taxes calculation logic
Taxes calculation in Web POS is done in the client side and it is contained in the dataordertaxes.js javascript file.
- Refactor of current taxes logic that implements taxes logic:
- Encapsulation of the functionality to allow to be invoked by receipt line.
- Calculation of taxes by line must have as parameters the tax rate definition to apply and the base price to use to apply the taxes.
- Calculation of taxes by line function must accumulate taxes information to allow to be invoked several times by line.
- Also new functions must be created to clean the taxes information by line and by receipt.
- Include the new functionality in taxes logic after the refactor.
- If line contains a regular product the taxes logic remains the same.
- If line contains a BOM product with tax category marked as per BOM the logic must iterate for all taxes categories of each product contained in the BOM and calculate the proportion of the amount of the base tax. And finally invoke the function that calculates taxes by line.