Fixed number format
This commit is contained in:
parent
709734d3ac
commit
0971c5847a
2 changed files with 2 additions and 2 deletions
|
|
@ -115,7 +115,7 @@ window.format_number = function(v, format, decimals){
|
|||
}
|
||||
|
||||
// join decimal
|
||||
part[1] = part[1] ? (info.decimal_str + part[1]) : "";
|
||||
part[1] = (part[1] && info.decimal_str) ? (info.decimal_str + part[1]) : "";
|
||||
|
||||
// join
|
||||
return (is_negative ? "-" : "") + part[0] + part[1];
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ def fmt_money(amount, precision=None, currency=None):
|
|||
|
||||
parts.reverse()
|
||||
|
||||
amount = comma_str.join(parts) + (precision and (decimal_str + decimals) or "")
|
||||
amount = comma_str.join(parts) + ((precision and decimal_str) and (decimal_str + decimals) or "")
|
||||
amount = minus + amount
|
||||
|
||||
if currency:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue