diff --git a/svelte/src/user_home/dashboard/CardPrepaidTransactions.svelte b/svelte/src/user_home/dashboard/CardPrepaidTransactions.svelte index b50e2dd..9d53aba 100644 --- a/svelte/src/user_home/dashboard/CardPrepaidTransactions.svelte +++ b/svelte/src/user_home/dashboard/CardPrepaidTransactions.svelte @@ -19,6 +19,8 @@ let transactions = { total_bandwidth_charge: 0, total_deposited: 0, total_deducted: 0, + balance_start: 0, + balance_end: 0, } const load_transactions = async () => { @@ -45,6 +47,13 @@ const load_transactions = async () => { total_bandwidth_charge: 0, total_deposited: 0, total_deducted: 0, + balance_start: 0, + balance_end: 0, + } + + if (month.rows && month.rows.length > 0) { + month.balance_start = month.rows[0].new_balance + month.balance_end = month.rows[month.rows.length-1].new_balance } month.rows.forEach(row => { @@ -105,30 +114,44 @@ onMount(() => { -
Opening balance | +|
Closing balance | +|
Total charge | +|
Subscription charge | +|
Storage charge | +
+ |
+
Bandwidth charge | +
+ |
+
Deposited | +