Page 1 of 1

tax amount of ordered product when quantity > 1

Posted: 20 May 2025, 09:30
by jagg1010
I don't understand this fact - I have a product for brutto 4.50 € - tax (calculation_type = 1) is 7%.

When I order this product with quantity 1 it is stored in the *_phocacart_order_products db with 'netto' 4.2100 and tax '0.2900' which looks ok to me. But when I order it with quantity 2 it is stored with 'netto' 4.2100 and tax '0.1450' which I don't understand :idea:

Is this correct?

Image

Re: tax amount of ordered product when quantity > 1

Posted: 20 May 2025, 09:49
by jagg1010
I think this line is responsible for that https://github.com/PhocaCz/PhocaCart/bl ... .php#L1519 and it latest github (v5?) it is commented out!!!! (but it is not in the latest v4.0.11 version)

Re: tax amount of ordered product when quantity > 1

Posted: 20 May 2025, 13:45
by Jan
Hi, as written in the comment, it is stored per item. There is a calculation and when there is for example: discount, coupon, reward point, etc. etc, the "tax discount" needs to be divided into all products in the cart, so it is calculated per item and stored for each item.

The tax per product which is set in product detail can be completely different after purchase (because of different discounts, etc.)

Jan

Re: tax amount of ordered product when quantity > 1

Posted: 20 May 2025, 14:01
by jagg1010
and that means? Which is correct code, v5 or v4 ;)

I think there were a reason why you commented out that line in v5 code?
(So I also commented out here in v4)

Re: tax amount of ordered product when quantity > 1

Posted: 20 May 2025, 21:59
by Jan
Version 5