VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: iamalive on July 24, 2012, 11:38:45 AM

Title: How can the shop function when the maths is wrong? This is fundamental
Post by: iamalive on July 24, 2012, 11:38:45 AM
Hi

I can't work out how a discount is calculated during the payment process.

I have a product with price 236.02;
Tax is 8% = 18.88
Total Price = 254.90
Cost of sending is 12.00
Discount for prepayment is 3% which to me is must be either calculated on price before tax is 7.08 or 7.65 with tax or 8.01 with postage as well. What is shown is 8.26
After that the tax is shown as 18. 27

The logic and the maths escape me here. Can someone explain the calculation steps for me please. I have to explain it to the shop owner.

Regards
David


[attachment cleanup by admin]
Title: Re: How can the shop function when the maths is wrong? This is fundamental
Post by: John2400 on July 30, 2012, 12:08:29 PM
mmm,

followed exactly what you asked for ? see my end result.
I added 8% tax on products and 3% discount on bill - shipping not included

[attachment cleanup by admin]
Title: Re: How can the shop function when the maths is wrong? This is fundamental
Post by: iamalive on July 30, 2012, 12:12:59 PM
Given that we have used the same numbers, how can such different results be achieved. I don't get it.

What is the calculation behind the component? what steps does it take to get the result? As I said, I need to be able to explain it to those who use the component.

Thanks for any help.

Regards
Dvid
Title: Re: How can the shop function when the maths is wrong? This is fundamental
Post by: John2400 on July 30, 2012, 14:12:45 PM
Joomla 2.5.6  and VM 2.0.8 e

* product shown - and price
* Tax one
* Tax 2

have a look - and see if you have something else throwing off your calculations -



[attachment cleanup by admin]
Title: Re: How can the shop function when the maths is wrong? This is fundamental
Post by: iamalive on July 30, 2012, 14:43:19 PM
Ha!

Silly me - I have never spotted that with the arithmetic operations previously.

Thank you very much for pointing it out. Now I can see how to go about it.

Regards

David