crater-invoice / crater

Open Source Invoicing Solution for Individuals & Businesses
https://craterapp.com
GNU Affero General Public License v3.0
7.62k stars 1.53k forks source link

Discount must be calculated before taxes #1227

Open Seb33300 opened 1 year ago

Seb33300 commented 1 year ago

Describe the bug The way discount works is wrong. The discount should be applied before taxes calculation.

My config:

Example invoice with the actual version:

=> This is wrong because the invoice show a tax total = 11 EUR => This means the total without tax = 100 EUR => This means tax rate is 11% and not 10% as displayed...

Expected behavior

This is how all invoicing softwares work.

See: https://www.zoho.com/ae/books/vat/faq/supply-vat/vat-with-discounts.html#:~:text=VAT%20is%20calculated%20on%20the%20discounted%20price%20of%20the%20product%2e

Seb33300 commented 1 year ago

Same issue if I enable both tax per product & discount per product options:

image