News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

VAT is calculated incorrectly after upgrade

Started by stensbo, January 24, 2019, 11:46:39 AM

Previous topic - Next topic

Milbo

I just tested the case and "Price modifier after tax per product" + "Price modifier before tax per bill" and it works correctly.

(I thought at begin you use "Price modifier before tax per bill" and "Price modifier after tax per bill".

But I see now, for the case "Price modifier BEFORE tax per product" it works wrong. Crazy. Thanks for the report.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

stensbo

#31
QuoteI just tested the case and "Price modifier after tax per product" + "Price modifier before tax per bill" and it works correctly.
Agrees

Quote(I thought at begin you use "Price modifier before tax per bill" and "Price modifier after tax per bill".
Sorry if I have made confusion - we use

Calculations rule for VAT: 'Tax per bill'
Calculations rule for discount: -% 'Price modifier before tax' (is per product)
Calculations rule for discount: -% 'Price modifier before tax per bill'

QuoteBut I see now, for the case "Price modifier BEFORE tax per product" it works wrong.
Agrees - you get incorrect Total amount for discount - discount amount is considered as positiv (I think :-\) for this rule - and only in calculation of Total discount amount - all other amounts/total amounts is correct

Milbo

In your setting, it would make no difference to use the other rule, because you add the VAT at the end. Just so, but it should be fixed, please test.

http://dev.virtuemart.net/attachments/1165/com_virtuemart.3.4.5.10063_package_or_extract.zip

I dont know how it behaves in order edit and the shipment radical vat setting. Maybe it works only correct with the radical tax. Did not test it yet. Please do that, it was hard enough to get it working.

Time to rewrite the calculator. The new calculator will gather first all rules per product, even when they are per bill, because our rules per bill work also per category and so on (which makes it so hard to write). Finally we collect the result and display it. It is almost that way already.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

stensbo

YES :) Thanks Milbo - I appreciate your help a lot.

I have tested 3.4.5.10063 on our test site (also with a mix of categories and shoppergroups) and I can confirm that all amounts/total amounts are now
correct calculated if you use

Calculations rule for VAT: 'Tax per bill'
Calculations rule for discount: -% 'Price modifier before tax' (is per product)
Calculations rule for discount: -% 'Price modifier before tax per bill'.

But you are right you can't edit an order without screw it up - in our case it is not a problem  - we don't edit orders in Virtuemart.
If you wants some screenshot and explanations how it act - please let me know.

...the shipment radical vat setting - I managed to make a test in demo shop with differentiated VAT rules and the 'Simplified VAT for shipping' enabled,
I can tell that if you use

Calculations rule for VAT: +7% 'Tax per bill'
Calculations rule for VAT: +10% 'Tax per bill'
Calculations rule for discount: -% 'Price modifier before tax' (is per product)
Calculations rule for discount: -% 'Price modifier before tax per bill'

it does not work properly. In Denmark we do not have differentiated VAT - we only have the 25% rate so in our case it is not a problem,
we do not use the radical vat setting. I know that "it does not work properly" is a very short comment for a test. If you wants some screenshot and explanations how it act - please let me know.

QuoteTime to rewrite the calculator
I can imagine that it is hard to write with all these opportunities available. Please have in mind that it is important, in cart and order confirmation, to tell/display for
customer/shopper what discount they get - especially the per bill rules.