forked from verdnatura/salix-front
fix: InvoiceIn sections
This commit is contained in:
parent
ec979d11e0
commit
50de0aa072
|
@ -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,
|
|||
<QTd>
|
||||
<VnInputNumber
|
||||
:class="{
|
||||
'no-pointer-events': !isNotEuro(invoiceIn.currency.code),
|
||||
'no-pointer-events': !isNotEuro(currency),
|
||||
}"
|
||||
:disable="!isNotEuro(invoiceIn.currency.code)"
|
||||
:disable="!isNotEuro(currency)"
|
||||
v-model="row.foreignValue"
|
||||
clearable
|
||||
clear-icon="close"
|
||||
|
@ -154,9 +155,7 @@ const getTotalAmount = (rows) => rows.reduce((acc, { amount }) => acc + +amount,
|
|||
<QTd />
|
||||
<QTd />
|
||||
<QTd>
|
||||
{{
|
||||
toCurrency(getTotalAmount(rows), invoiceIn.currency.code)
|
||||
}}
|
||||
{{ toCurrency(getTotalAmount(rows), currency) }}
|
||||
</QTd>
|
||||
<QTd />
|
||||
</QTr>
|
||||
|
@ -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"
|
||||
|
|
|
@ -242,11 +242,12 @@ const formatOpt = (row, { model, options }, prop) => {
|
|||
</template>
|
||||
<template #body-cell-taxablebase="{ row }">
|
||||
<QTd>
|
||||
{{ currency }}
|
||||
<VnInputNumber
|
||||
:class="{
|
||||
'no-pointer-events': isNotEuro(invoiceIn.currency.code),
|
||||
'no-pointer-events': isNotEuro(currency),
|
||||
}"
|
||||
:disable="isNotEuro(invoiceIn.currency.code)"
|
||||
:disable="isNotEuro(currency)"
|
||||
label=""
|
||||
clear-icon="close"
|
||||
v-model="row.taxableBase"
|
||||
|
@ -312,9 +313,9 @@ const formatOpt = (row, { model, options }, prop) => {
|
|||
<QTd>
|
||||
<VnInputNumber
|
||||
:class="{
|
||||
'no-pointer-events': !isNotEuro(invoiceIn.currency.code),
|
||||
'no-pointer-events': !isNotEuro(currency),
|
||||
}"
|
||||
:disable="!isNotEuro(invoiceIn.currency.code)"
|
||||
:disable="!isNotEuro(currency)"
|
||||
v-model="row.foreignValue"
|
||||
/>
|
||||
</QTd>
|
||||
|
@ -361,12 +362,10 @@ const formatOpt = (row, { model, options }, prop) => {
|
|||
<VnInputNumber
|
||||
:label="t('Taxable base')"
|
||||
:class="{
|
||||
'no-pointer-events': isNotEuro(
|
||||
invoiceIn.currency.code
|
||||
),
|
||||
'no-pointer-events': isNotEuro(currency),
|
||||
}"
|
||||
class="full-width"
|
||||
:disable="isNotEuro(invoiceIn.currency.code)"
|
||||
:disable="isNotEuro(currency)"
|
||||
clear-icon="close"
|
||||
v-model="props.row.taxableBase"
|
||||
clearable
|
||||
|
@ -427,11 +426,9 @@ const formatOpt = (row, { model, options }, prop) => {
|
|||
: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"
|
||||
/>
|
||||
</QItem>
|
||||
|
|
Loading…
Reference in New Issue