From 50de0aa07222ce3156e6a95bb8cf0e34101f7a3e Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 27 Aug 2024 14:55:36 +0200 Subject: [PATCH] fix: InvoiceIn sections --- src/pages/InvoiceIn/Card/InvoiceInDueDay.vue | 15 ++++++-------- src/pages/InvoiceIn/Card/InvoiceInVat.vue | 21 +++++++++----------- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue b/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue index 7dbd0fe9e..62beb88ad 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue @@ -18,6 +18,7 @@ const { notify } = useNotify(); const { t } = useI18n(); const arrayData = useArrayData(); const invoiceIn = computed(() => arrayData.store.data); +const currency = computed(() => invoiceIn.value?.currency?.code); const rowsSelected = ref([]); const banks = ref([]); @@ -139,9 +140,9 @@ const getTotalAmount = (rows) => rows.reduce((acc, { amount }) => acc + +amount, rows.reduce((acc, { amount }) => acc + +amount, - {{ - toCurrency(getTotalAmount(rows), invoiceIn.currency.code) - }} + {{ toCurrency(getTotalAmount(rows), currency) }} @@ -208,11 +207,9 @@ const getTotalAmount = (rows) => rows.reduce((acc, { amount }) => acc + +amount, :label="t('Foreign value')" class="full-width" :class="{ - 'no-pointer-events': !isNotEuro( - invoiceIn.currency.code - ), + 'no-pointer-events': !isNotEuro(currency), }" - :disable="!isNotEuro(invoiceIn.currency.code)" + :disable="!isNotEuro(currency)" v-model="props.row.foreignValue" clearable clear-icon="close" diff --git a/src/pages/InvoiceIn/Card/InvoiceInVat.vue b/src/pages/InvoiceIn/Card/InvoiceInVat.vue index 4dac5058e..34b0b64bd 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInVat.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInVat.vue @@ -242,11 +242,12 @@ const formatOpt = (row, { model, options }, prop) => {