Show reconcile button and current reconciling-balance
This commit is contained in:
@ -5,35 +5,39 @@ import TransactionRow from "../components/TransactionRow.vue";
|
||||
import TransactionInputRow from "../components/TransactionInputRow.vue";
|
||||
import { useAccountStore } from "../stores/budget-account";
|
||||
import EditAccount from "../dialogs/EditAccount.vue";
|
||||
import Button from "../components/Button.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
defineProps<{
|
||||
budgetid: string
|
||||
accountid: string
|
||||
}>()
|
||||
|
||||
const accountStore = useAccountStore();
|
||||
const CurrentAccount = computed(() => accountStore.CurrentAccount);
|
||||
const TransactionsList = computed(() => accountStore.TransactionsList);
|
||||
|
||||
const accounts = useAccountStore();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1 class="inline">{{ CurrentAccount?.Name }}</h1>
|
||||
<h1 class="inline">{{ accounts.CurrentAccount?.Name }}</h1>
|
||||
<EditAccount /> <br />
|
||||
|
||||
<span>
|
||||
Current Balance:
|
||||
<Currency :value="CurrentAccount?.WorkingBalance" />
|
||||
<Currency :value="accounts.CurrentAccount?.WorkingBalance" />
|
||||
</span>
|
||||
|
||||
<span>
|
||||
Cleared Balance:
|
||||
<Currency :value="CurrentAccount?.ClearedBalance" />
|
||||
<Currency :value="accounts.CurrentAccount?.ClearedBalance" />
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<span v-if="accounts.Reconciling">
|
||||
<br />
|
||||
Reconciling
|
||||
</span>
|
||||
<span v-if="!accounts.Reconciling">
|
||||
Reconciled Balance:
|
||||
<Currency :value="CurrentAccount?.ReconciledBalance" />
|
||||
<Currency :value="accounts.CurrentAccount?.ReconciledBalance" />
|
||||
<Currency :value="accounts.ReconcilingBalance" />
|
||||
<Button @click="accounts.Reconciling = true" v-if="!accounts.Reconciling">Reconcile</Button>
|
||||
</span>
|
||||
<table>
|
||||
<tr class="font-bold">
|
||||
@ -44,10 +48,11 @@ const TransactionsList = computed(() => accountStore.TransactionsList);
|
||||
<td class="text-right">Amount</td>
|
||||
<td style="width: 20px;"></td>
|
||||
<td style="width: 40px;"></td>
|
||||
<td style="width: 20px;" v-if="accounts.Reconciling">R</td>
|
||||
</tr>
|
||||
<TransactionInputRow :budgetid="budgetid" :accountid="accountid" />
|
||||
<TransactionRow
|
||||
v-for="(transaction, index) in TransactionsList"
|
||||
v-for="(transaction, index) in accounts.TransactionsList"
|
||||
:transaction="transaction"
|
||||
:index="index"
|
||||
/>
|
||||
|
Reference in New Issue
Block a user