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