[TYPO3-commerce] calculating the article sum price
Jeroen Visser
jeroen at roquin.nl
Mon Mar 31 10:47:22 CEST 2008
Hi All,
In the webshop that's running it seems that round off is not done as expected.
For example: a article that costs 1.42 inc. Tax and 1.19 ex. Tax on the website I show the 1.19
The following happens when changing the amount in the basket:
€ 1,19 1x € 1,19
€ 1,19 2x € 2,38
€ 1,19 3x € 3,57
€ 1,19 4x € 4,77 (should be 4,76)
€ 1,19 5x € 5,96 (should be 5,95)
€ 1,19 7x € 8,35 (should be 8,33)
€ 1,19 10x € 11,93 (should be 11,90)
€ 1,19 20x € 23,86 (should be 23,80)
The article settings are:
BTW: 19,00
Net: 1,19
Gross: 1,42
I have tested in class.tx_commerce_basic_basket.php adding ,2 to the functions round() which resulted in the list above. Without round(,2) the
list looks like:
€ 1,19 2x € 2,38
€ 1,19 3x € 3,58
€ 1,19 20x € 23,87
Does anyone else has the same problem? Thank's in advance
Kind regards,
Jeroen
More information about the TYPO3-project-commerce
mailing list