tax amount of ordered product when quantity > 1

Phoca Cart - complex e-commerce extension
jagg1010
Phoca Member
Phoca Member
Posts: 39
Joined: 22 Nov 2021, 02:18

tax amount of ordered product when quantity > 1

Post 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
jagg1010
Phoca Member
Phoca Member
Posts: 39
Joined: 22 Nov 2021, 02:18

Re: tax amount of ordered product when quantity > 1

Post 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)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48752
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: tax amount of ordered product when quantity > 1

Post 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
If you find Phoca extensions useful, please support the project
jagg1010
Phoca Member
Phoca Member
Posts: 39
Joined: 22 Nov 2021, 02:18

Re: tax amount of ordered product when quantity > 1

Post 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)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48752
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: tax amount of ordered product when quantity > 1

Post by Jan »

Version 5
If you find Phoca extensions useful, please support the project
Post Reply