mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +08:00
code refactor
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { isNumber, appendThousandsSeparator } from './common.js';
|
||||
|
||||
export function numericCurrencyToString(num) {
|
||||
export function numericCurrencyToString(num, enableThousandsSeparator) {
|
||||
let str = num.toString();
|
||||
const negative = str.charAt(0) === '-';
|
||||
|
||||
@@ -18,7 +18,7 @@ export function numericCurrencyToString(num) {
|
||||
let integer = str.substring(0, str.length - 2);
|
||||
let decimals = str.substring(str.length - 2);
|
||||
|
||||
integer = appendThousandsSeparator(integer);
|
||||
integer = appendThousandsSeparator(integer, enableThousandsSeparator);
|
||||
|
||||
str = `${integer}.${decimals}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user