mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 02:11:27 +01:00
fix price for forms
This commit is contained in:
@@ -6956,10 +6956,6 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
|
||||
|
||||
// Format number
|
||||
$output = number_format((float) $amount, $nbdecimal, $dec, $thousand);
|
||||
if ($form) {
|
||||
$output = preg_replace('/\s/', ' ', $output);
|
||||
$output = preg_replace('/\'/', ''', $output);
|
||||
}
|
||||
// Add symbol of currency if requested
|
||||
$cursymbolbefore = $cursymbolafter = '';
|
||||
if ($currency_code && is_object($outlangs)) {
|
||||
@@ -6977,6 +6973,10 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
|
||||
}
|
||||
}
|
||||
$output = $cursymbolbefore.$output.$end.($cursymbolafter ? ' ' : '').$cursymbolafter;
|
||||
if ($form) {
|
||||
$output = preg_replace('/\s/', ' ', $output);
|
||||
$output = preg_replace('/\'/', ''', $output);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user