I have encountered a problem while developing a POS application for a client in Canada. My issue lies in the tax calculation process, where I am unsure how to handle discounts and tax exemptions properly. Here is the scenario: I have 2 items - item 1 priced at $10 and item 2 priced at $2 (tax exempt). Before applying the tax rate of 13%, I need to apply a discount of $5 on the total bill. How can I correctly calculate the total amount of taxes after applying the discount?
The desired result is obtaining the tax amount after the discount has been applied. The tax rate is fixed at 13%.
Item 1: $10 Item 2: $2 (Tax Exempt)
Subtotal: $12 Discount: $5 Tax Amount: ?