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

Price calculation: tax,sales (with samples)

Started by moonaway, September 25, 2014, 15:06:38 PM

Previous topic - Next topic

moonaway

Sample #1 Discount after tax





Sample #2 Discount before tax


VM3.0.0 testing: http://store.c-site.ru/

Milbo

Everything is alright.

the VAT uses the endresult, that means

10 euro + 20 VAT => 12 euro,.. 10 percent discount => 10.8 euro,... this is now taxed. So the VAT must be recalculated. So that x +VAT = 10.8 euro.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

moonaway

Quote10 euro + 20 VAT => 12 euro,.. 10 percent discount => 10.8 euro,... this is now taxed. So the VAT must be recalculated. So that x +VAT = 10.8 euro.

Hmmmmmm.... Let's see sample #1b.



Base price = 1500р
Discount after tax = 200р
VAT tax = 20%

How calculated TAX = 266,666 ? ....I could not calculate this value
VM3.0.0 testing: http://store.c-site.ru/

Milbo

#3
1500 + 1500 * 0.2 = 1800 with Discount => 1600.
1333.3333 with tax of 20% => 1600
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

moonaway

Maybe I'm stupid, but how we get 1533,33333 ?? =))))
VM3.0.0 testing: http://store.c-site.ru/

Milbo

your final price is 1600. So you need the tax of a product, which results in 1600 with tax.... so x *1.2 =1600

btw, corrected my post
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

moonaway

#6
You right, but...

Input data:
1.Base price = 1500р
2.VAT tax = 20%
3.Discount after tax = 200р
1->2->3, yes?

Next:
1500 + 1500*0.2 - 200 = 1600 - It's sale price for customers.

We wrote:
Quoteyour final price is 1600. So you need the tax of a product, which results in 1600 with tax.... so x *1.2 =1600

This formula is correct, if we ignored the discount in calculation, but take the sales price which we have calculated in the above example.

X + X*0,2 = 1600 - It's sales price
X * 1.2 = 1600
X = 1600/1.2 = 1333,3 - It's base price
VAT = 1600 - 1333,3 = 266,6 - It's VAT
1333,3 + 266,6 = 1600 - It's final price

That is, in these calculations we ignored the discount and we calculate the tax on the sale price which was calculated in the above example.

So in these calculations we ignored the discount and calculated the tax on the final price, which was calculated in the first example.
And we see:


discountedPriceWithoutTax + taxAmount = salesPriceWithDiscount

or (This calculation I want to publish on the frontend)

basePrice + taxAmount2 - discountAmount = salesPrice

How I can publish taxAmount2 (which is not in the object) on the frontend?
VM3.0.0 testing: http://store.c-site.ru/

AH

Why [discount_amount] -ve.   Because discount can also be +ve  the name "discount" is really an adjustment amount to a value.

Regarding TAX

Why do you say "your right, but.." ?

From a tax perspective all the values are correct.

You applied a discount to the final price inc VAT

Expressing the taxamount2 as you required is overstating tax

As you pay VAT, you have just overpaid ad if your customer is claiming VAT back they have just over claimed!

X + X*0,2 = 1600 - It's sales price
X * 1.2 = 1600
X = 1600/1.2 = 1333,3 - It's base price
VAT = 1600 - 1333,3 = 266,6 - It's VAT
1333,3 + 266,6 = 1600 - It's final price

You now want to state the Gross to be 1600 and the Tax to be 300
Net = Sales price - Tax

Hmm..
That would result in the Net being 1300

Which as we know it is not!

Because 1300 * 1.20 = 1560

As far as I can make out, there are NO errors in the values shown.

Regards
A

Joomla 4.4.5
php 8.1

Milbo

Moonaway. Please lern again the tax types. Just replace your VAT with a normal Tax rule and it will work as YOU expected. But the tax officials will tell you that it wrong. The VAT is based on money. So if you reduce the money, you have to pay less tax. Compare it with a normal tax, for example on Oil. Regardless the costs, the oil is always taxed the same way.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

moonaway

Thank you for your replay! :D :D

You are completely right. I just could not find documentation on the rules of calculation and, therefore, I'm thought wrong. Thank you!



QuoteWhy [discount_amount] -ve.   Because discount can also be +ve  the name "discount" is really an adjustment amount to a value.

In my samples all "discount" be -ve. But in price model discountAmount = -200 in sample#1, and = 200 in sample #2. Why?
VM3.0.0 testing: http://store.c-site.ru/