Only save available for last month and add overspent
This commit is contained in:
@ -78,29 +78,54 @@ const budgeted = computed(() => accountStore.GetBudgeted(selected.value.Year, se
|
||||
|
||||
<template>
|
||||
<h1>Budget for {{ selected.Month + 1 }}/{{ selected.Year }}</h1>
|
||||
<span>
|
||||
Available last month:
|
||||
<Currency
|
||||
:value="accountStore.GetIncomeAvailable(previous.Year, previous.Month)"
|
||||
/>
|
||||
</span><br>
|
||||
<span>Available balance:
|
||||
<Currency
|
||||
:value="accountStore.GetIncomeAvailable(selected.Year, selected.Month)"
|
||||
/>
|
||||
</span><br>
|
||||
<span>Budgeted this month:
|
||||
<Currency :value="budgeted.Assigned" /> - <Currency :value="-budgeted.Deassigned" /> = <Currency :value="budgeted.Assigned+budgeted.Deassigned" />
|
||||
</span><br>
|
||||
<span>Income:
|
||||
<Currency
|
||||
:value="budgeted.Income"
|
||||
/> <Currency
|
||||
:value="budgeted.Spent"
|
||||
/> = <Currency
|
||||
:value="budgeted.Income + budgeted.Spent"
|
||||
/>
|
||||
</span><br>
|
||||
<table class="inline-block">
|
||||
<tr>
|
||||
<td>
|
||||
Available last month:
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<Currency :value="accountStore.Available-accountStore.OverspentLastMonth+budgeted.Assigned+budgeted.Deassigned" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Overspent last month:
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<Currency :value="accountStore.OverspentLastMonth" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Budgeted this month:
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<Currency :value="budgeted.Assigned+budgeted.Deassigned" />
|
||||
</td>
|
||||
<td class="text-sm pl-2">
|
||||
= <Currency :value="budgeted.Assigned" /> - <Currency :value="-budgeted.Deassigned" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="font-bold">
|
||||
<td class="py-2">
|
||||
Available balance:
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<Currency :value="accountStore.Available" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Activity:
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<Currency :value="budgeted.Income + budgeted.Spent" />
|
||||
</td>
|
||||
<td class="text-sm pl-2">
|
||||
= <Currency :value="budgeted.Income" /> - <Currency :value="-1 * budgeted.Spent" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>
|
||||
<router-link
|
||||
:to="'/budget/' + CurrentBudgetID + '/budgeting/' + previous.Year + '/' + previous.Month"
|
||||
|
Reference in New Issue
Block a user