mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-21 02:04:26 +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();
|
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);
|
value = utils.numericCurrencyToString(value);
|
||||||
|
|
||||||
|
if (hasIncompleteFlag) {
|
||||||
|
value = value + '+';
|
||||||
|
}
|
||||||
|
|
||||||
const currencyDisplayMode = settings.getCurrencyDisplayMode();
|
const currencyDisplayMode = settings.getCurrencyDisplayMode();
|
||||||
|
|
||||||
if (currencyCode && currencyDisplayMode === 'symbol') {
|
if (currencyCode && currencyDisplayMode === 'symbol') {
|
||||||
|
|||||||
Reference in New Issue
Block a user