This commit is contained in:
gRoussac
2013-10-24 18:09:21 +02:00
parent 0416aca547
commit 759fe2f671

View File

@@ -718,12 +718,8 @@
function fixPriceFormat(price)
{
if(price.indexOf(',') > 0 && price.indexOf('.') > 0) // if contains , and .
{
if(price.indexOf(',') < price.indexOf('.')) // if , is before .
{
price = price.replace(',',''); // remove ,
}
}
price = price.replace(' ',''); // remove any spaces
price = price.replace(',','.'); // remove , if price did not cotain both , and .
return price;