From 402b2882da33cba40ad8129d9c1b18adbb7d46e2 Mon Sep 17 00:00:00 2001 From: provira Date: Tue, 21 Jan 2025 10:04:18 +0100 Subject: [PATCH] feat: refs #8395 added computed to calculate and display amounts --- src/pages/InvoiceIn/Card/InvoiceInVat.vue | 35 ++++++++++++++--------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/src/pages/InvoiceIn/Card/InvoiceInVat.vue b/src/pages/InvoiceIn/Card/InvoiceInVat.vue index b22166dc7..dfe79e658 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInVat.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInVat.vue @@ -92,7 +92,7 @@ const columns = computed(() => [ { name: 'total', label: t('Total'), - sortable: true, + align: 'left', }, ]); @@ -136,6 +136,24 @@ function autocompleteExpense(evt, row, col) { if (lookup) row[col.model] = lookup; } + +const taxableBaseTotal = computed(() => { + return getTotal(invoiceInFormRef.value.formData, 'taxableBase', ); +}); + +const taxRateTotal = computed(() => { + return getTotal(invoiceInFormRef.value.formData, null, { + cb: taxRate, + }); +}); + + +const combinedTotal = computed(() => { + return +taxableBaseTotal.value + +taxRateTotal.value; +}); + + +