Author Topic: VAT is calculated incorrectly after upgrade  (Read 3697 times)

stensbo

  • Jr. Member
  • **
  • Posts: 88
Re: VAT is calculated incorrectly after upgrade
« Reply #15 on: May 09, 2019, 16:10:31 pm »
Thanks - jjk

Please try to change your discount rule to 'Price modifier before tax per bill' and set your VAT rule to 'Tax per bill' - this is "normal" for B2B customer... and then attach your screenshot -  to see if you get the correct VAT amount / total VAT amount


jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3648
  • using Matomo instead of Google Analytics
Re: VAT is calculated incorrectly after upgrade
« Reply #16 on: May 09, 2019, 16:42:51 pm »
If you use 'Price modifier after tax' rule set to -10%, this happens:
The discount is based on net price with VAT, the tax amount is recalculated based on the new net price. And the result are correct numbers.  I think you should just use it and it solves your problem.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

stensbo

  • Jr. Member
  • **
  • Posts: 88
Re: VAT is calculated incorrectly after upgrade
« Reply #17 on: May 09, 2019, 17:23:07 pm »
... but that rule is not ‘per bill’

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 538
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: VAT is calculated incorrectly after upgrade
« Reply #18 on: May 09, 2019, 20:06:39 pm »
and set your VAT rule to 'Tax per bill' - this is "normal" for B2B customer...

Is it normal? I must have done something really wrong the last few years.

Maybe you could use VAT tax per product instead and prepare your invoice in a way that it shows what you want.

Regards
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3648
  • using Matomo instead of Google Analytics
Re: VAT is calculated incorrectly after upgrade
« Reply #19 on: May 09, 2019, 23:11:29 pm »
... but that rule is not ‘per bill’

The 25% tax rule is a tax per bill rule. See attached screenshot. A tax per product would show in the product row next to the Quantity column.

Is it normal? I must have done something really wrong the last few years.

B2B VAT tax per bill is common practice in EU countries, because both, the net amount and the tax amount have to be on the invoice to allow pre-tax deduction for a business customer. At least for invoices above 250 Euro (due to EU Regulations). However, if the invoice includes products with different VAT percentages, it becomes more complicated. (But VM can handle that, too)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 538
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: VAT is calculated incorrectly after upgrade
« Reply #20 on: May 10, 2019, 00:54:02 am »
B2B VAT tax per bill is common practice in EU countries, because both, the net amount and the tax amount have to be on the invoice to allow pre-tax deduction for a business customer. At least for invoices above 250 Euro (due to EU Regulations). However, if the invoice includes products with different VAT percentages, it becomes more complicated. (But VM can handle that, too)

You can achieve that with VAT tax per product too. No need to use a tax that is called different. Especially using VAT tax and deducting another tax, as I have seen in places, to show the net is not necessary. Especially if you sell B2B and B2C on the same site that is complicating things for no reason.

The attached invoice is all done with VAT tax per product and shows everything you need for invoices over 250 Euro.

Regards
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

stensbo

  • Jr. Member
  • **
  • Posts: 88
Re: VAT is calculated incorrectly after upgrade
« Reply #21 on: May 10, 2019, 11:31:02 am »
@jjk
Quote
The 25% tax rule is a tax per bill rule. See attached screenshot

Yes but I meant that the discount rule  'Price modifier after tax' is not a PER BILL rule.

If I do as you suggested the discount is displayed as a strikethrough the price and the discounted price is displayed - you don't tell your costumer what discount they get - see screenshot of cart  'tax per bill- price modifier after tax' and order email confirmation screenshot 'order tax per bill- price modifier after tax'   

AND what if you have 2 discount rules this way  ??? then cart looks like this screeshot 'with 2 price modifire after tax' - this is not good..

I know that the discount rules that is NOT per bill is working and gives the correct VAT amount.

We need the discount calculations rules per bill like it worked back in version before upgrade to 3.4.x  please se screenshot 'Price modifier before tax per bill'  and you can see what I mean.

stensbo

  • Jr. Member
  • **
  • Posts: 88
Re: VAT is calculated incorrectly after upgrade
« Reply #22 on: May 10, 2019, 13:36:06 pm »
@StefanSTS
Quote
Maybe you could use VAT tax per product instead and prepare your invoice in a way that it shows what you want.

Thanks but we do not do invoices in virtuemart - maybee same can be done with order email confirmation...
If discount rules per bill is used together with VAT TAX per product -  amounts is displayed incl. VAT  - that is why we have used tax per bill and discount rules per bill.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: VAT is calculated incorrectly after upgrade
« Reply #23 on: May 15, 2019, 16:43:30 pm »
Stensbo, thank you for your good bug report.

Please test this version http://dev.virtuemart.net/attachments/1163/com_virtuemart.3.4.5.10057_package_or_extract.zip

I fixed some notices and so I know it could not work as expected. Please try the version above.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

stensbo

  • Jr. Member
  • **
  • Posts: 88
Re: VAT is calculated incorrectly after upgrade
« Reply #24 on: May 16, 2019, 10:55:07 am »
Thanks Milbo,

Have tested with 3.4.5.10057 - :'( but I do not get correct VAT amount  - please try to add 1 to cart  joom.danrider.dk/index.php/wear/skirt-knock-rock-detail  and view cart then you can see calculation  - or see attached screenshot

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3648
  • using Matomo instead of Google Analytics
Re: VAT is calculated incorrectly after upgrade
« Reply #25 on: May 16, 2019, 13:54:19 pm »
Just curious - what are the settings for your shipment and payment fees? Both shown tax amounts for these don't look correct to me either.
For a total of 169,63 you would owe the Danish Skat kontor 33,93 €.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

stensbo

  • Jr. Member
  • **
  • Posts: 88
Re: VAT is calculated incorrectly after upgrade
« Reply #26 on: May 16, 2019, 15:05:10 pm »
I downloaded demo version and have not changed settings for these - did not think they where affecting calculation of vat/dis on product - of course total amounts they will affect Yes. I will just disable them so we don't get confused.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

stensbo

  • Jr. Member
  • **
  • Posts: 88
Re: VAT is calculated incorrectly after upgrade
« Reply #28 on: May 22, 2019, 10:01:36 am »
Thanks Milbo - I have tested with 3.4.5.10059 -  8)
I can now confirm that if you use

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

..you get correct amounts for product/VAT/discount and correct Total amounts for product/VAT

..but Total discount amount is incorrect when you use both discount rules at the same time, we often do that - please see screenshot -
checked in old orderconfirmations and this have been present a long time back, but I haven't noticed it before now.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: VAT is calculated incorrectly after upgrade
« Reply #29 on: May 22, 2019, 17:21:15 pm »
omg.

I just thought about to write "But it may not correctly work for both kind of discount rules applied in one bill."

Okey, you have it extra complex. Lets see what I can do. Anyway time for a rewrite of the calculator, next time.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/