[x] When a discount is applied, the tax amount is not adjusted accordingly. For example, if the tax rate is 20% and the product price is $100, applying a discount of 10% should result in a tax amount of $18. However, the tax amount is calculated as $19.5 instead of the expected $18. Screenshot: https://snipboard.io/Fl8tVg.jpg
[x] The calculation seems incorrect for flat discounts as well. Considering the tax rate of 20% and product price of $40, a $10 discount should reduce the tax rate to $6 from $8. However, it appears to be $7.50; screenshot: https://snipboard.io/CIQeDq.jpg
[x] Additionally, some validations seem missing when displaying the tax rate at the frontend. When the tax rate is set as 0 [screenshot], this is displayed: https://snipboard.io/2wEUZJ.jpg in place of the tax rate.
Steps to Reproduce:
Go to the POS screen.
Add a product to the cart.
Apply a discount of 10% & flat $10.
Observe the tax amount deducted from the total.
Expected Behavior:
When a discount is applied on the POS screen, the tax amount should be adjusted proportionally to reflect the discounted price accurately.
System Status:
wePOS: 1.2.7
WooCommerce: 8.6.0
WordPress: v6.4.2
Description of the Issue:
[x] When a discount is applied, the tax amount is not adjusted accordingly. For example, if the tax rate is 20% and the product price is $100, applying a discount of 10% should result in a tax amount of $18. However, the tax amount is calculated as $19.5 instead of the expected $18. Screenshot: https://snipboard.io/Fl8tVg.jpg
[x] The calculation seems incorrect for flat discounts as well. Considering the tax rate of 20% and product price of $40, a $10 discount should reduce the tax rate to $6 from $8. However, it appears to be $7.50; screenshot: https://snipboard.io/CIQeDq.jpg
[x] Additionally, some validations seem missing when displaying the tax rate at the frontend. When the tax rate is set as 0 [screenshot], this is displayed: https://snipboard.io/2wEUZJ.jpg in place of the tax rate.
Steps to Reproduce:
Expected Behavior: When a discount is applied on the POS screen, the tax amount should be adjusted proportionally to reflect the discounted price accurately.
System Status: wePOS: 1.2.7 WooCommerce: 8.6.0 WordPress: v6.4.2