[-] BO : #PSCFV-3670 : add a new format of currency in JS files
This commit is contained in:
@@ -105,7 +105,6 @@ class CurrencyCore extends ObjectModel
|
|||||||
// price sign before or after the price number
|
// price sign before or after the price number
|
||||||
$this->prefix = $this->format % 2 != 0 ? $this->sign.' ' : '';
|
$this->prefix = $this->format % 2 != 0 ? $this->sign.' ' : '';
|
||||||
$this->suffix = $this->format % 2 == 0 ? ' '.$this->sign : '';
|
$this->suffix = $this->format % 2 == 0 ? ' '.$this->sign : '';
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Overriding check if currency with the same iso code already exists.
|
* Overriding check if currency with the same iso code already exists.
|
||||||
@@ -181,12 +180,15 @@ class CurrencyCore extends ObjectModel
|
|||||||
'left' => $this->sign.' ',
|
'left' => $this->sign.' ',
|
||||||
'right' => ' '.$this->sign
|
'right' => ' '.$this->sign
|
||||||
);
|
);
|
||||||
|
|
||||||
$formats = array(
|
$formats = array(
|
||||||
1 => array('left' => &$formated_strings['left'], 'right' => ''),
|
1 => array('left' => &$formated_strings['left'], 'right' => ''),
|
||||||
2 => array('left' => '', 'right' => &$formated_strings['right']),
|
2 => array('left' => '', 'right' => &$formated_strings['right']),
|
||||||
3 => array('left' => &$formated_strings['left'], 'right' => ''),
|
3 => array('left' => &$formated_strings['left'], 'right' => ''),
|
||||||
4 => array('left' => '', 'right' => &$formated_strings['right']),
|
4 => array('left' => '', 'right' => &$formated_strings['right']),
|
||||||
|
5 => array('left' => '', 'right' => &$formated_strings['right'])
|
||||||
);
|
);
|
||||||
|
|
||||||
return ($formats[$this->format][$side]);
|
return ($formats[$this->format][$side]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,8 @@ function formatCurrency(price, currencyFormat, currencySign, currencyBlank)
|
|||||||
return (currencySign + blank + formatNumber(price, priceDisplayPrecision, '.', ','));
|
return (currencySign + blank + formatNumber(price, priceDisplayPrecision, '.', ','));
|
||||||
if (currencyFormat == 4)
|
if (currencyFormat == 4)
|
||||||
return (formatNumber(price, priceDisplayPrecision, ',', '.') + blank + currencySign);
|
return (formatNumber(price, priceDisplayPrecision, ',', '.') + blank + currencySign);
|
||||||
|
if (currencyFormat == 5)
|
||||||
|
return (formatNumber(price, priceDisplayPrecision, ' ', '.') + blank + currencySign);
|
||||||
return price;
|
return price;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ function formatCurrency(price, currencyFormat, currencySign, currencyBlank)
|
|||||||
return (currencySign + blank + formatNumber(price, priceDisplayPrecision, '.', ','));
|
return (currencySign + blank + formatNumber(price, priceDisplayPrecision, '.', ','));
|
||||||
if (currencyFormat == 4)
|
if (currencyFormat == 4)
|
||||||
return (formatNumber(price, priceDisplayPrecision, ',', '.') + blank + currencySign);
|
return (formatNumber(price, priceDisplayPrecision, ',', '.') + blank + currencySign);
|
||||||
|
if (currencyFormat == 5)
|
||||||
|
return (formatNumber(price, priceDisplayPrecision, ' ', '.') + blank + currencySign);
|
||||||
return price;
|
return price;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user