View Issue Details

IDProjectCategoryView StatusLast Update
0000368OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2012-12-07 15:19
Reportersven_kliebenstein Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Fixed in Version4.0.0.0 revision 14260 
Summary0000368: Vat rates using decimals are not displyed correctly
DescriptionThe following bug was reported in the forum under:
http://www.oxid-esales.com/de/resources/forum/installation-and-configuration/internationalization-or-lack-it

Here's an excerpt of the problem:
I have set the VAT to 21.5, it is correctly calculated and displayed in the shopping cart on the actual item line, but at the bottom it only comes back with "plus tax21% Amount", which looks like a formating issues as there is no space between tax and the 21 as well.

The method $oxcmp_basket->getProductVats() returns an array with vat rates used as the key. The problem is located in the class core/oxpricelist, the key assignment is not correct:
$aVatValues[$oPrice->getVat()] += $oPrice->getVATValue(); => should be done by using a new var and then assigning the var as a string, e.g.:
$fVatKey = $oPrice->getVat();
$aVatValues["$fVatKey"] += $oPrice->getVATValue();
TagsVAT
Theme
BrowserAll
PHP Version5.2.6
Database Version5.0.33

Activities

marco_steinhaeuser

2008-11-13 12:34

reporter   ~0000244

"... are not displyed correctly ..." unfortunately is only half the truth:
The value after the comma is cut away at least at checkout step 4 and the wrong value is taken for calculation.

marco_steinhaeuser

2008-11-13 12:36

reporter   ~0000245

set severity to 'major' and proirity to 'high' as this issue is appropriate to avoid international spreading of the shop.

marco_steinhaeuser

2008-11-13 13:52

reporter   ~0000246

formatting problem:
Concerning http://de.wikipedia.org/wiki/Umsatzsteuer I found 2 characters after comma max (e.g. IRL, luxury goods at 36,75 %). IMHO in a first step it shall be done this way (19,00%), who wants to change can do it in smarty.
Smarter way would be to have it configurable in admin backend.

tomas_liubinas

2008-11-13 14:09

reporter   ~0000247

Last edited: 2008-11-13 14:14

imo as a general rule, we just can:
1) take decimal separator from active currency
and
2) drop all 0 from the end
when formating VAT


So VAT 18% will always look 18%.
21.5% will be 21,5% when price is 13,45 EUR and 21.5% when price is 8.00 USD in order not to confuse (but never 21.50% or 18.0%)

ralf_trapp

2008-11-16 12:43

reporter   ~0000250

Last edited: 2008-11-16 12:43

Tomas' solution is the best. I choose that.

arvydas_vapsva

2008-11-17 09:46

reporter   ~0000253

fixed according to comments