News:

Looking for documentation? Take a look on our wiki

Main Menu

VAT is calculated incorrectly after upgrade

Started by stensbo, January 21, 2019, 13:42:49 PM

Previous topic - Next topic

stensbo

Hello,
Using Joomla 3.9.2, Virtuemart 3.4.2, PHP Version 7.1.26, vm overrides.
template Storefront version 3.23.3

I discovered that VAT is calculated wrong if a discount is given. (i think after update to 3.4.2)

Attached image - Moms(VAT) correctly should have been DKK 52,92 and Total Amount correctly should have been DKK 264,60.

We use
Vat rule: TaxBill - Vat pr. invoice (B2B)
Discount  rule: DBTaxBill - Price modification before Tax per bill.

Updated our test site to Virtuemart 3.4.3 but it is the same.

I don't know if this is a bug or...?


stensbo

I assume that incorrect calculation is a bug so I will try to report it as a bug


jenkinhill

Have you tried updating Joomla to the current version, 3.9.2?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

stensbo

Thanks jenkinhill -  yes just did  - make no difference.

jjk

In your case you might have to try 'Price modifier before tax per bill' instead of 'Price modifier before tax'. If that doesn't work, please post a screenshot of your tax rule setting.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

stensbo

#5
Thanks jjk

QuoteIn your case you might have to try 'Price modifier before tax per bill' instead of 'Price modifier before tax'
Discount calculation rule is allready set to  "Price modifier before tax per bill".

Attached screenshot of settings for discount and VAT rule.

Please see attached screenshot "Price modifier before tax" -  I tried to set discount rule to "Price modifier before tax" and that gives correct calculation of discount and VAT but price is not DKK 2,45 it is DKK 2,50 and discount is 0,05 that is correct. In this way you do not tell shopper correct price and what discount they get (-2%).

Please see attached screenshot "Price modifier before tax per bill" - here VAT it is calculated incorrectly - Moms(VAT) should have been DKK 0,61 and total amount should have been DKK 3,06. This is the option that tell shopper the discount they get and the correct price. I think .. if the option is there it has to calculated correct :) and it did work perfect before upgrade.

stensbo

.. and here is a screenshot of an order before upgrade to 3.4.x correct calculated.

Can anyone tell if it will be as is in 3.4.x in future or...?

I think this topic is about the same
http://forum.virtuemart.net/index.php?topic=141259.0

jjk

#7
I just made a test using the price and tax value from your screenshot of your first post with the latest code in the VM repository at http://dev.virtuemart.net/projects/virtuemart/repository/show/trunk
The calculation is correct if I select 'Price modifier before tax' instead of 'Price modifier before tax per bill'. I didn't test with VM 3.4.3 or earlier, but of course you can try this setting yourself.

See attached screenshot.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

stensbo

#8
Thank s jjk for testing. I am aware of that - if setting is set to 'Price modifier before tax' then VAT is calculated correct - attached that test
in my fourth post. But this is not a good way to give -% discount for the whole amount before VAT on cart . It is confusing for customers.. they
can't see what -% discount they get for what - especially if you use a -% discount for some products (then we use Price modifier before tax) and then a -% for
whole cart before vat for same customer.

Hope explanation makes sense and that the 'Price modifier before tax per bill' will be corrected so it calculate VAT correct.
According to GJC Web in another topic there is in 3.4.x a lot of changes in this file ...administrator\components\com_virtuemart\helpers\calculationh.php but I'm not a coder :(

PS: in 3.4.3 Title / rule with -% 'Price modifier before tax per bill' is displayed as a separat line in cart but is gone on email order confirmation.

sarajames

#9
Are there any upgrades available for the same? I would really like to use it. I'm building a website similar to this (freeaccount.org/get-onlyfans-free-accounts-best-methods-2019/) and would love to have more upgrades.

It just might be the thing I need. Cheers!

stensbo

I don't think so - I have tested with VirtueMart 3.4.3 10014 and it is still the same - VAT for calculation rule -% 'Price modifier before tax per bill' is not calculated and gives an incorrect VAT Amount ond a incorrect Total amount

I have reported it as a bug here https://forum.virtuemart.net/index.php?topic=141930.0