Skip to content

Commit

Permalink
FIX Position of price symbol (before) for nl_NL
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jan 16, 2019
1 parent 6159703 commit 1f87b8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion htdocs/admin/company.php
Original file line number Diff line number Diff line change
Expand Up @@ -773,10 +773,11 @@


print '<tr class="oddeven"><td>'.$langs->trans("CompanyCurrency").'</td><td>';
print currency_name($conf->currency,1);
print currency_name($conf->currency,0);
print ' ('.$conf->currency;
print ($conf->currency != $langs->getCurrencySymbol($conf->currency) ? ' - '.$langs->getCurrencySymbol($conf->currency) : '');
print ')';
print ' - '.$langs->trans("PriceFormatInCurrentLanguage", $langs->defaultlang).' : '.price(price2num('99.333333333','MT'), 1, $langs, 1, -1, -1, $conf->currency);
print '</td></tr>';


Expand Down
8 changes: 6 additions & 2 deletions htdocs/core/lib/functions.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -4350,7 +4350,7 @@ function vatrate($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0)
* @param string $currency_code To add currency symbol (''=add nothing, 'auto'=Use default currency, 'XXX'=add currency symbols for XXX currency)
* @return string Chaine avec montant formate
*
* @see price2num Revert function of price
* @see price2num() Revert function of price
*/
function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
{
Expand Down Expand Up @@ -4413,7 +4413,11 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou
if ($currency_code == 'auto') $currency_code=$conf->currency;

$listofcurrenciesbefore=array('USD','GBP','AUD','MXN','PEN','CNY');
if (in_array($currency_code,$listofcurrenciesbefore)) $cursymbolbefore.=$outlangs->getCurrencySymbol($currency_code);
$listoflanguagesbefore=array('nl_NL');
if (in_array($currency_code, $listofcurrenciesbefore) || in_array($outlangs->defaultlang, $listoflanguagesbefore))
{
$cursymbolbefore.=$outlangs->getCurrencySymbol($currency_code);
}
else
{
$tmpcur=$outlangs->getCurrencySymbol($currency_code);
Expand Down

0 comments on commit 1f87b8b

Please sign in to comment.