mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 16:54:25 +08:00
account edit page displays the debt amount instead of the balance for credit card and debt accounts
This commit is contained in:
@@ -146,8 +146,9 @@
|
||||
:persistent-placeholder="true"
|
||||
:currency="selectedAccount.currency"
|
||||
:show-currency="true"
|
||||
:label="currentAccountIndex < 0 ? tt('Account Balance') : tt('Sub-account Balance')"
|
||||
:placeholder="currentAccountIndex < 0 ? tt('Account Balance') : tt('Sub-account Balance')"
|
||||
:flip-negative="account.isLiability"
|
||||
:label="accountAmountTitle"
|
||||
:placeholder="accountAmountTitle"
|
||||
v-model="selectedAccount.balance"/>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6" v-show="selectedAccount.balance"
|
||||
@@ -274,6 +275,14 @@ const selectedAccount = computed<Account>(() => {
|
||||
return subAccounts.value[currentAccountIndex.value];
|
||||
});
|
||||
|
||||
const accountAmountTitle = computed<string>(() => {
|
||||
if (currentAccountIndex.value < 0) {
|
||||
return account.value.isLiability ? tt('Account Outstanding Balance') : tt('Account Balance');
|
||||
} else {
|
||||
return account.value.isLiability ? tt('Sub-account Outstanding Balance') : tt('Sub-account Balance');
|
||||
}
|
||||
});
|
||||
|
||||
let resolveFunc: ((value: AccountEditResponse) => void) | null = null;
|
||||
let rejectFunc: ((reason?: unknown) => void) | null = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user