mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 23:47:33 +08:00
fix amount error when amount is incomplete
This commit is contained in:
@@ -11,8 +11,18 @@ export default function ({i18n}, value, currencyCode) {
|
||||
value = value.toString();
|
||||
}
|
||||
|
||||
const hasIncompleteFlag = utils.isString(value) && value.charAt(value.length - 1) === '+';
|
||||
|
||||
if (hasIncompleteFlag) {
|
||||
value = value.substr(0, value.length - 1);
|
||||
}
|
||||
|
||||
value = utils.numericCurrencyToString(value);
|
||||
|
||||
if (hasIncompleteFlag) {
|
||||
value = value + '+';
|
||||
}
|
||||
|
||||
const currencyDisplayMode = settings.getCurrencyDisplayMode();
|
||||
|
||||
if (currencyCode && currencyDisplayMode === 'symbol') {
|
||||
|
||||
Reference in New Issue
Block a user