diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue
index c26a9c4a5..f3280511c 100644
--- a/src/components/CrudModel.vue
+++ b/src/components/CrudModel.vue
@@ -1,7 +1,7 @@
ref="invoiceInFormRef"
data-key="InvoiceInIntrastats"
url="InvoiceInIntrastats"
- :auto-load="!currency"
+ auto-load
:data-required="{ invoiceInFk: invoiceInId }"
:filter="filter"
v-model:selected="rowsSelected"
@@ -124,6 +130,9 @@ const getTotal = (data, key) =>
option-value="id"
option-label="description"
:filter-options="['id', 'description']"
+ :hide-selected="false"
+ :fill-input="false"
+ :display-value="formatOpt(row, col, 'description')"
>
@@ -247,7 +256,11 @@ const getTotal = (data, key) =>
}
}
-
+
en:
amount: Amount
diff --git a/src/pages/InvoiceIn/Card/InvoiceInVat.vue b/src/pages/InvoiceIn/Card/InvoiceInVat.vue
index 58f6e0d01..bed28b7ce 100644
--- a/src/pages/InvoiceIn/Card/InvoiceInVat.vue
+++ b/src/pages/InvoiceIn/Card/InvoiceInVat.vue
@@ -69,6 +69,7 @@ const columns = computed(() => [
model: 'taxTypeSageFk',
optionValue: 'id',
optionLabel: 'id',
+
sortable: true,
tabindex: 3,
align: 'left',
@@ -162,8 +163,14 @@ async function addExpense() {
}
}
const getTotalTaxableBase = (rows) =>
- rows.reduce((acc, { taxableBase }) => acc + +taxableBase, 0);
+ rows.reduce((acc, { taxableBase }) => acc + +(taxableBase || 0), 0);
const getTotalRate = (rows) => rows.reduce((acc, cur) => acc + +taxRate(cur), 0);
+
+const formatOpt = (row, { model, options }, prop) => {
+ const obj = row[model];
+ const option = options.find(({ id }) => id == obj);
+ return option ? `${obj}:${option[prop]}` : '';
+};
rows.reduce((acc, cur) => acc + +taxRate(cur), 0)
:option-value="col.optionValue"
:option-label="col.optionLabel"
:filter-options="['id', 'vat']"
- :autofocus="col.tabIndex == 1"
- input-debounce="0"
+ :hide-selected="false"
+ :fill-input="false"
+ :display-value="formatOpt(row, col, 'vat')"
>
@@ -280,6 +288,9 @@ const getTotalRate = (rows) => rows.reduce((acc, cur) => acc + +taxRate(cur), 0)
:filter-options="['id', 'transaction']"
:autofocus="col.tabIndex == 1"
input-debounce="0"
+ :hide-selected="false"
+ :fill-input="false"
+ :display-value="formatOpt(row, col, 'transaction')"
>
@@ -474,11 +485,16 @@ const getTotalRate = (rows) => rows.reduce((acc, cur) => acc + +taxRate(cur), 0)
/>
+