This commit is contained in:
parent
f8c3bfe2cd
commit
5383df6946
|
@ -182,8 +182,8 @@ const col = computed(() => {
|
||||||
if ($props.default && !newColumn.component) newColumn.component = $props.default;
|
if ($props.default && !newColumn.component) newColumn.component = $props.default;
|
||||||
|
|
||||||
if (typeof newColumn.component !== 'string') {
|
if (typeof newColumn.component !== 'string') {
|
||||||
newColumn.attrs = { ...newColumn.component.attrs, autofocus: $props.autofocus };
|
newColumn.attrs = { ...newColumn.attrs, autofocus: $props.autofocus };
|
||||||
newColumn.event = { ...newColumn.component.event, ...$props?.eventHandlers };
|
newColumn.event = { ...newColumn.event, ...$props?.eventHandlers };
|
||||||
}
|
}
|
||||||
|
|
||||||
return newColumn;
|
return newColumn;
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, markRaw, useTemplateRef, onBeforeMount, watch } from 'vue';
|
import {
|
||||||
|
ref,
|
||||||
|
computed,
|
||||||
|
markRaw,
|
||||||
|
useTemplateRef,
|
||||||
|
onBeforeMount,
|
||||||
|
watch,
|
||||||
|
onUnmounted,
|
||||||
|
} from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { toDate, toCurrency } from 'src/filters';
|
import { toDate, toCurrency } from 'src/filters';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
|
@ -229,6 +237,8 @@ onBeforeMount(async () => {
|
||||||
stateStore.leftDrawer = false;
|
stateStore.leftDrawer = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => (stateStore.leftDrawer = true));
|
||||||
|
|
||||||
watch(selectedRows, async (nVal, oVal) => {
|
watch(selectedRows, async (nVal, oVal) => {
|
||||||
if (nVal.length > oVal.length && nVal.at(-1).invoiceInFk)
|
if (nVal.length > oVal.length && nVal.at(-1).invoiceInFk)
|
||||||
quasar.dialog({
|
quasar.dialog({
|
||||||
|
|
|
@ -84,9 +84,8 @@ const columns = computed(() => [
|
||||||
tabIndex: 4,
|
tabIndex: 4,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
component: 'number',
|
component: 'number',
|
||||||
isEditable: true,
|
isEditable: isNotEuro(currency.value),
|
||||||
create: true,
|
create: true,
|
||||||
disable: true,
|
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -132,7 +131,6 @@ onBeforeMount(async () => await setTaxableBase());
|
||||||
:column-search="false"
|
:column-search="false"
|
||||||
:disable-option="{ card: true }"
|
:disable-option="{ card: true }"
|
||||||
class="q-pa-none"
|
class="q-pa-none"
|
||||||
|
|
||||||
>
|
>
|
||||||
<template #column-footer-amount>
|
<template #column-footer-amount>
|
||||||
<QChip
|
<QChip
|
||||||
|
|
|
@ -103,9 +103,9 @@ const columns = computed(() => [
|
||||||
filterOptions: ['id', 'vat'],
|
filterOptions: ['id', 'vat'],
|
||||||
'data-cy': 'vat-sageiva',
|
'data-cy': 'vat-sageiva',
|
||||||
},
|
},
|
||||||
format: (row) => {
|
format: ({ taxTypeSageFk }, dashIfEmpty) => {
|
||||||
const taxType = sageTaxTypes.value.find((t) => t.id === row.taxTypeSageFk);
|
const taxType = sageTaxTypes.value.find((t) => t.id === taxTypeSageFk);
|
||||||
return taxType ? `${taxType.id}: ${taxType.vat}` : row.taxTypeSageFk;
|
return taxType ? `${taxType.id}: ${taxType.vat}` : dashIfEmpty(taxTypeSageFk);
|
||||||
},
|
},
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -122,13 +122,13 @@ const columns = computed(() => [
|
||||||
optionLabel: (row) => `${row.id}: ${row.transaction}`,
|
optionLabel: (row) => `${row.id}: ${row.transaction}`,
|
||||||
filterOptions: ['id', 'transaction'],
|
filterOptions: ['id', 'transaction'],
|
||||||
},
|
},
|
||||||
format: (row, dashIfEmpty) => {
|
format: ({ transactionTypeSageFk }, dashIfEmpty) => {
|
||||||
const transType = sageTransactionTypes.value.find(
|
const transType = sageTransactionTypes.value.find(
|
||||||
(t) => t.id === row.transactionTypeSageFk,
|
(t) => t.id === transactionTypeSageFk,
|
||||||
);
|
);
|
||||||
return transType
|
return transType
|
||||||
? `${transType.id}: ${transType.transaction}`
|
? `${transType.id}: ${transType.transaction}`
|
||||||
: dashIfEmpty(row.transactionTypeSageFk);
|
: dashIfEmpty(transactionTypeSageFk);
|
||||||
},
|
},
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -149,7 +149,11 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
create: true,
|
create: true,
|
||||||
disable: !isNotEuro(currency.value),
|
isEditable: isNotEuro(currency.value),
|
||||||
|
cellEvent: {
|
||||||
|
'update:modelValue': async (value, oldValue, row) =>
|
||||||
|
await handleForeignValueUpdate(value, row),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'total',
|
name: 'total',
|
||||||
|
|
|
@ -69,4 +69,5 @@ invoiceIn:
|
||||||
isBooked: Is booked
|
isBooked: Is booked
|
||||||
account: Ledger account
|
account: Ledger account
|
||||||
correctingFk: Rectificative
|
correctingFk: Rectificative
|
||||||
|
issued: Issued
|
||||||
noMatch: No match with the vat({totalTaxableBase})
|
noMatch: No match with the vat({totalTaxableBase})
|
||||||
|
|
|
@ -67,4 +67,5 @@ invoiceIn:
|
||||||
isBooked: Contabilizada
|
isBooked: Contabilizada
|
||||||
account: Cuenta contable
|
account: Cuenta contable
|
||||||
correctingFk: Rectificativa
|
correctingFk: Rectificativa
|
||||||
|
issued: Fecha de emisión
|
||||||
noMatch: No cuadra con el iva({totalTaxableBase})
|
noMatch: No cuadra con el iva({totalTaxableBase})
|
||||||
|
|
Loading…
Reference in New Issue