Fix: decimal support for italian language
This commit is contained in:
parent
dad1e55637
commit
742b775f37
@ -1312,7 +1312,7 @@ class Facture extends CommonObject
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$txtva=price2num($txtva);
|
||||
|
||||
|
||||
if ($price_base_type=='HT')
|
||||
{
|
||||
$pu=$pu_ht;
|
||||
|
||||
@ -2100,7 +2100,8 @@ function price2num($amount,$rounding='',$alreadysqlnb=-1)
|
||||
$dec=','; $thousand=' ';
|
||||
if ($langs->trans("SeparatorDecimal") != "SeparatorDecimal") $dec=$langs->trans("SeparatorDecimal");
|
||||
if ($langs->trans("SeparatorThousand")!= "SeparatorThousand") $thousand=$langs->trans("SeparatorThousand");
|
||||
|
||||
|
||||
//print 'x'.$dec.$thousand.'-';
|
||||
if ($alreadysqlnb != 1) // If not a PHP number or unknown, we change format
|
||||
{
|
||||
if ($thousand != ',' && $thousand != '.') $amount=str_replace(',','.',$amount); // To accept 2 notations for french users
|
||||
|
||||
@ -265,8 +265,11 @@ class Translate {
|
||||
//if ($this->charset_inputfile == 'UTF-8') $value=utf8_decode($value);
|
||||
if ($this->charset_inputfile == 'ISO-8859-1') $value=utf8_encode($value);
|
||||
|
||||
//$this->setTransFromTab($key,$value);
|
||||
$this->tab_translate[$key]=$value;
|
||||
// We do not load Separator values for alternate files
|
||||
if (! $alt || (! eregi('^Separator',$key)))
|
||||
{
|
||||
$this->tab_translate[$key]=$value;
|
||||
}
|
||||
if ($enablelangcacheinsession) $tabtranslatedomain[$key]=$value; // To save lang in session
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user