diff --git a/src/pages/Supplier/Card/SupplierBalance.vue b/src/pages/Supplier/Card/SupplierBalance.vue index 75cbcc673..ab7120021 100644 --- a/src/pages/Supplier/Card/SupplierBalance.vue +++ b/src/pages/Supplier/Card/SupplierBalance.vue @@ -197,18 +197,8 @@ function setFooter(data) { tableRef.value.footer = tableFooter(initialFooter, data); } async function onFetch(data) { + setFooter(data); return; - // balances.value = []; - // for (const [index, balance] of data.entries()) { - // if (index === 0) { - // balance.balance = await getCurrentBalance(); - // continue; - // } - // const previousBalance = data[index - 1]; - // balance.balance = - // previousBalance?.balance - (previousBalance?.debit - previousBalance?.credit); - // } - // balances.value = data; } const showNewPaymentDialog = () => { @@ -227,6 +217,9 @@ const showNewPaymentDialog = () => { const showBalancePdf = ({ id }) => { openReport(`InvoiceOuts/${id}/download`, {}, '_blank'); }; +function round(value) { + return Math.round(value * 100) / 100; +}