News:

Looking for documentation? Take a look on our wiki

Main Menu

Discount after tax but the tax need to be lessened as well

Started by Kuubs, March 22, 2022, 11:33:21 AM

Previous topic - Next topic

Kuubs

I have a weird situation that I cannot seem to resolve with Virtuemart calculations.

Let's say I have a product of 100 euro. And I have 21% tax. This means that the product is 121 euro. Now when i apply a discount the final salesprice becomes 111 euro.  The tax of this product is 19,26. But my VatTax rule is not applied correctly. It is essentially calculating tax of that 100 euro, and then doesn't recalculate when a discount happens. How can I fix this?
Do I need to use another calculation method? Tax per invoice or something? But then the tax of the specific prodcut is not calculated. I find it all very weird.

I am using coupons for the discount!

Jörgen

Please tell is what You use, dbtax, datax and all your calculated data. This should work.
Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

pinochico

QuoteThe tax of this product is 19,26. But my VatTax rule is not applied correctly. It is essentially calculating tax of that 100 euro, and then doesn't recalculate when a discount happens. How can I fix this?

This bug is long time, sorry, we had to fix for every shops, which use invoice from VM (not for shops connected to ERP).
I remember how Max furiously defended the mistake in some discussion (I solved it in 2015, but it didn't solve it).
Since then, I have lost the illusion of a remedy and we always program the hack ourselves, unfortunately.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

Jörgen

Hmm, once again, in my shop it works, How do you do it? I have still not seen all the numbers.

Org price: 95 sek (inkl VAT)
Vat: 25 %
Discount 50%
end price 47,50 sek
vat 9,50 sek = 20 % of 47,50 this is OK

Where is the problem ?

I do not see any problems.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

pinochico

Jörgen:

For acountant, the VAT must be still 25% after discount == then calculation for VAT for discount is wrong == must be recalculate after discount again
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

Jörgen

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

pinochico

To Jorgen:

I Read Your Figure

Quote
Org price: 95 sek (inkl VAT)
Vat: 25 %
Discount 50%
end price 47,50 sek
vat 9,50 sek = 20 % of 47,50 this is OK

And our accountant put this in my head and say - what the hell is your shop? I created, then my shop and my mistake :)
Is totaly wrong and calculating not function for financial goverments.

100 - basic price
121 - sales price with 21%VAT
111 - final price with discount 10 EUR

basic price - must be recalculate - 91,735537190082645 (111 * 100 / 121)
vat after discount (21%) - must be recalculate - 19,264462809917355 - finally not really in VM

Your example - change VAT from 25 to 20. And this is big mistake :)
But for us is not mother, we fixed in ERP and if some clients wants invoice from VM, then we recomended external online invoicing, not VM
We don't waiting. Not anymore, otherwise we would never see it, sorry.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

Jörgen

You really did not read my figures.

VAT is 25 % to be added on price without VAT which equals 20 % of total customer price.

Original VAT = 20% OF price = 19 sek (25 % added on price without VAT)
VAT after discount = 20% of discounted price = 9,5 sek (25 % added on discounted price without VAT)

Please do not waste my time any more.  >:(

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Kuubs

Quote from: Jörgen on March 22, 2022, 12:18:05 PM
Please tell is what You use, dbtax, datax and all your calculated data. This should work.
Jörgen

I use the following:

VatTax.

And I also have DATax discount in the VM itself. But it's going wrong when people use Coupons!

Jörgen

OK, this is new information, native VM coupons or AwoCoupon?

I can not remember I have had any problems with AwoCoupon.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Kuubs

Quote from: Jörgen on March 23, 2022, 13:30:04 PM
OK, this is new information, native VM coupons or AwoCoupon?

I can not remember I have had any problems with AwoCoupon.

Jörgen @ Kreativ Fotografi
Native coupons! I thought I was clear in my OP, lets double check taht again.

Jörgen

Sorry missed that.

I only read, added discount.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Jörgen

Tested with 10 % native coupon.

Works for me

Screenshots would probably help.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Kuubs

Quote from: Jörgen on March 23, 2022, 14:40:04 PM
Tested with 10 % native coupon.

Works for me

Screenshots would probably help.

Jörgen

What kind of screenshots?

I have a product with 21% VatTax. I also have a DATax discount code of 15 euro. When I add a discount code for 10% the Tax is wrong. Please let me know what kind of screenshots you need!

Jörgen

A screenshot of the checkout that shows the figures that are wrong. It is hard to guess, since my figures all seem to show correctly  8)

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.