#8623: Fixed module errors #1426

Merged
jon merged 4 commits from 8623-FixInvoiceOutModule into dev 2025-02-19 08:13:24 +00:00
8 changed files with 123 additions and 97 deletions

View File

@ -164,7 +164,6 @@ const app = inject('app');
const editingRow = ref(null); const editingRow = ref(null);
const editingField = ref(null); const editingField = ref(null);
const isTableMode = computed(() => mode.value == TABLE_MODE); const isTableMode = computed(() => mode.value == TABLE_MODE);
const showRightIcon = computed(() => $props.rightSearch || $props.rightSearchIcon);
const selectRegex = /select/; const selectRegex = /select/;
const emit = defineEmits(['onFetch', 'update:selected', 'saveChanges']); const emit = defineEmits(['onFetch', 'update:selected', 'saveChanges']);
const tableModes = [ const tableModes = [
@ -618,14 +617,6 @@ function cardClick(_, row) {
dense dense
:options="tableModes.filter((mode) => !mode.disable)" :options="tableModes.filter((mode) => !mode.disable)"
/> />
<QBtn
v-if="showRightIcon"
icon="filter_alt"
class="bg-vn-section-color q-ml-sm"
dense
@click="stateStore.toggleRightDrawer()"
/>
</template> </template>
<template #header-cell="{ col }"> <template #header-cell="{ col }">
<QTh <QTh

View File

@ -103,7 +103,7 @@ const refundInvoice = async (withWarehouse) => {
t('refundInvoiceSuccessMessage', { t('refundInvoiceSuccessMessage', {
refundTicket: data[0].id, refundTicket: data[0].id,
}), }),
'positive' 'positive',
); );
}; };
@ -124,6 +124,13 @@ const showRefundInvoiceForm = () => {
}, },
}); });
}; };
const showExportationLetter = () => {
Review

no estaba creada?

no estaba creada?
Review

No se hizo en la migración

No se hizo en la migración
openReport(`InvoiceOuts/${$props.invoiceOutData.ref}/exportation-pdf`, {
recipientId: $props.invoiceOutData.client.id,
refFk: $props.invoiceOutData.ref,
});
};
</script> </script>
<template> <template>
@ -172,7 +179,7 @@ const showRefundInvoiceForm = () => {
t('Confirm deletion'), t('Confirm deletion'),
t('Are you sure you want to delete this invoice?'), t('Are you sure you want to delete this invoice?'),
deleteInvoice, deleteInvoice,
redirectToInvoiceOutList redirectToInvoiceOutList,
) )
" "
> >
@ -185,7 +192,7 @@ const showRefundInvoiceForm = () => {
openConfirmationModal( openConfirmationModal(
'', '',
t('Are you sure you want to book this invoice?'), t('Are you sure you want to book this invoice?'),
bookInvoice bookInvoice,
) )
" "
> >
@ -198,7 +205,7 @@ const showRefundInvoiceForm = () => {
openConfirmationModal( openConfirmationModal(
t('Generate PDF invoice document'), t('Generate PDF invoice document'),
t('Are you sure you want to generate/regenerate the PDF invoice?'), t('Are you sure you want to generate/regenerate the PDF invoice?'),
generateInvoicePdf generateInvoicePdf,
) )
" "
> >
@ -226,6 +233,14 @@ const showRefundInvoiceForm = () => {
{{ t('Create a single ticket with all the content of the current invoice') }} {{ t('Create a single ticket with all the content of the current invoice') }}
</QTooltip> </QTooltip>
</QItem> </QItem>
<QItem
v-if="$props.invoiceOutData.serial === 'E'"
v-ripple
clickable
@click="showExportationLetter()"
>
<QItemSection>{{ t('Show CITES letter') }}</QItemSection>
</QItem>
</template> </template>
<i18n> <i18n>
@ -255,7 +270,7 @@ es:
Create a single ticket with all the content of the current invoice: Crear un ticket único con todo el contenido de la factura actual Create a single ticket with all the content of the current invoice: Crear un ticket único con todo el contenido de la factura actual
refundInvoiceSuccessMessage: Se ha creado el siguiente ticket de abono {refundTicket} refundInvoiceSuccessMessage: Se ha creado el siguiente ticket de abono {refundTicket}
The email can't be empty: El email no puede estar vacío The email can't be empty: El email no puede estar vacío
Show CITES letter: Ver carta CITES
en: en:
refundInvoiceSuccessMessage: The following refund ticket have been created {refundTicket} refundInvoiceSuccessMessage: The following refund ticket have been created {refundTicket}
</i18n> </i18n>

View File

@ -22,7 +22,7 @@ const states = ref();
<VnFilterPanel :data-key="props.dataKey" :search-button="true"> <VnFilterPanel :data-key="props.dataKey" :search-button="true">
<template #tags="{ tag, formatFn }"> <template #tags="{ tag, formatFn }">
<div class="q-gutter-x-xs"> <div class="q-gutter-x-xs">
<strong>{{ t(`params.${tag.label}`) }}: </strong> <strong>{{ t(`invoiceOut.params.${tag.label}`) }}: </strong>
<span>{{ formatFn(tag.value) }}</span> <span>{{ formatFn(tag.value) }}</span>
</div> </div>
</template> </template>
@ -84,15 +84,6 @@ const states = ref();
/> />
</QItemSection> </QItemSection>
</QItem> </QItem>
<QItem>
<QItemSection>
<VnInputDate
v-model="params.issued"
:label="t('Issued')"
is-outlined
/>
</QItemSection>
</QItem>
<QItem> <QItem>
<QItemSection> <QItemSection>
<VnInputDate <VnInputDate
@ -110,37 +101,3 @@ const states = ref();
</template> </template>
</VnFilterPanel> </VnFilterPanel>
</template> </template>
<i18n>
en:
params:
search: Contains
clientFk: Customer
fi: FI
amount: Amount
min: Min
max: Max
hasPdf: Has PDF
issued: Issued
created: Created
dued: Dued
es:
params:
search: Contiene
clientFk: Cliente
fi: CIF
amount: Importe
min: Min
max: Max
hasPdf: Tiene PDF
issued: Emitida
created: Creada
dued: Vencida
Customer ID: ID cliente
FI: CIF
Amount: Importe
Has PDF: Tiene PDF
Issued: Fecha emisión
Created: Fecha creación
Dued: Fecha vencimiento
</i18n>

View File

@ -71,14 +71,6 @@ const columns = computed(() => [
inWhere: true, inWhere: true,
}, },
}, },
{
align: 'left',
name: 'issued',
label: t('invoiceOut.summary.issued'),
component: 'date',
format: (row) => toDate(row.issued),
columnField: { component: null },
},
{ {
align: 'left', align: 'left',
name: 'clientFk', name: 'clientFk',

View File

@ -10,6 +10,8 @@ import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vu
import TicketDescriptorProxy from '../Ticket/Card/TicketDescriptorProxy.vue'; import TicketDescriptorProxy from '../Ticket/Card/TicketDescriptorProxy.vue';
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue'; import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
import VnInputDate from 'components/common/VnInputDate.vue'; import VnInputDate from 'components/common/VnInputDate.vue';
import InvoiceOutNegativeBasesFilter from './InvoiceOutNegativeBasesFilter.vue';
import RightMenu from 'src/components/common/RightMenu.vue';
const { t } = useI18n(); const { t } = useI18n();
const tableRef = ref(); const tableRef = ref();
@ -97,16 +99,19 @@ const columns = computed(() => [
align: 'left', align: 'left',
name: 'isActive', name: 'isActive',
label: t('invoiceOut.negativeBases.active'), label: t('invoiceOut.negativeBases.active'),
component: 'checkbox',
}, },
{ {
align: 'left', align: 'left',
name: 'hasToInvoice', name: 'hasToInvoice',
label: t('invoiceOut.negativeBases.hasToInvoice'), label: t('invoiceOut.negativeBases.hasToInvoice'),
component: 'checkbox',
}, },
{ {
align: 'left', align: 'left',
name: 'hasVerifiedData', name: 'isTaxDataChecked',
label: t('invoiceOut.negativeBases.verifiedData'), label: t('invoiceOut.negativeBases.verifiedData'),
component: 'checkbox',
}, },
{ {
align: 'left', align: 'left',
@ -142,7 +147,7 @@ const downloadCSV = async () => {
await invoiceOutGlobalStore.getNegativeBasesCsv( await invoiceOutGlobalStore.getNegativeBasesCsv(
userParams.from, userParams.from,
userParams.to, userParams.to,
filterParams filterParams,
); );
}; };
</script> </script>
@ -154,6 +159,11 @@ const downloadCSV = async () => {
</QBtn> </QBtn>
</template> </template>
</VnSubToolbar> </VnSubToolbar>
<RightMenu>
<template #right-panel>
<InvoiceOutNegativeBasesFilter data-key="negativeFilter" />
</template>
</RightMenu>
<VnTable <VnTable
ref="tableRef" ref="tableRef"
data-key="negativeFilter" data-key="negativeFilter"
@ -174,6 +184,7 @@ const downloadCSV = async () => {
auto-load auto-load
:is-editable="false" :is-editable="false"
:use-model="true" :use-model="true"
:right-search="false"
> >
<template #column-clientId="{ row }"> <template #column-clientId="{ row }">
<span class="link" @click.stop> <span class="link" @click.stop>

View File

@ -2,9 +2,10 @@
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnInputDate from 'components/common/VnInputDate.vue'; import VnInputDate from 'components/common/VnInputDate.vue';
import VnInputNumber from 'src/components/common/VnInputNumber.vue'; import VnInputNumber from 'src/components/common/VnInputNumber.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
const { t } = useI18n(); const { t } = useI18n();
const props = defineProps({ const props = defineProps({
@ -24,11 +25,11 @@ const props = defineProps({
> >
<template #tags="{ tag, formatFn }"> <template #tags="{ tag, formatFn }">
<div class="q-gutter-x-xs"> <div class="q-gutter-x-xs">
<strong>{{ t(`params.${tag.label}`) }}: </strong> <strong>{{ t(`invoiceOut.params.${tag.label}`) }}: </strong>
<span>{{ formatFn(tag.value) }}</span> <span>{{ formatFn(tag.value) }}</span>
</div> </div>
</template> </template>
<template #body="{ params }"> <template #body="{ params, searchFn }">
<QItem> <QItem>
<QItemSection> <QItemSection>
<VnInputDate <VnInputDate
@ -49,38 +50,70 @@ const props = defineProps({
</QItem> </QItem>
<QItem> <QItem>
<QItemSection> <QItemSection>
<VnInput <VnSelect
v-model="params.company" url="Companies"
:label="t('globals.company')" :label="t('globals.company')"
is-outlined v-model="params.company"
/> option-label="code"
option-value="code"
dense
outlined
rounded
@update:model-value="searchFn()"
>
<template #option="scope">
Review

hace falta esto?

hace falta esto?
Review

Había creado un panel de filtrado propio pero no se estaba usando. Este panel utilizaba todos los campos a modo de input, cuando lo correcto sería utilizar selects(para el comercial, cliente, etc...)

Había creado un panel de filtrado propio pero no se estaba usando. Este panel utilizaba todos los campos a modo de input, cuando lo correcto sería utilizar selects(para el comercial, cliente, etc...)
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>
{{ scope.opt?.code }}
</QItemLabel>
<QItemLabel caption>
{{ `#${scope.opt?.id}` }}
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
</QItemSection> </QItemSection>
</QItem> </QItem>
<QItem> <QItem>
<QItemSection> <QItemSection>
<VnInput <VnSelect
url="Countries"
:label="t('globals.params.countryFk')"
v-model="params.country" v-model="params.country"
:label="t('globals.country')" option-label="name"
is-outlined option-value="name"
/> outlined
</QItemSection> dense
</QItem> rounded
@update:model-value="searchFn()"
<QItem> >
<QItemSection> <template #option="scope">
<VnInput <QItem v-bind="scope.itemProps">
v-model="params.clientId" <QItemSection>
:label="t('invoiceOut.negativeBases.clientId')" <QItemLabel>
is-outlined {{ scope.opt?.name }}
/> </QItemLabel>
<QItemLabel caption>
{{ `#${scope.opt?.id}` }}
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
</QItemSection> </QItemSection>
</QItem> </QItem>
<QItem> <QItem>
<QItemSection> <QItemSection>
<VnInput <VnSelect
v-model="params.clientSocialName" url="Clients"
:label="t('globals.client')" :label="t('globals.client')"
is-outlined v-model="params.clientId"
outlined
dense
rounded
@update:model-value="searchFn()"
/> />
</QItemSection> </QItemSection>
</QItem> </QItem>
@ -90,15 +123,18 @@ const props = defineProps({
v-model="params.amount" v-model="params.amount"
:label="t('globals.amount')" :label="t('globals.amount')"
is-outlined is-outlined
:positive="false"
/> />
</QItemSection> </QItemSection>
</QItem> </QItem>
<QItem> <QItem>
<QItemSection> <QItemSection>
<VnInput <VnSelectWorker
v-model="params.comercialName"
:label="t('invoiceOut.negativeBases.comercial')" :label="t('invoiceOut.negativeBases.comercial')"
v-model="params.workerName"
option-value="name"
is-outlined is-outlined
@update:model-value="searchFn()"
/> />
</QItemSection> </QItemSection>
</QItem> </QItem>

View File

@ -4,7 +4,7 @@ invoiceOut:
params: params:
company: Company company: Company
country: Country country: Country
clientId: Client ID clientId: Client
clientSocialName: Client clientSocialName: Client
taxableBase: Base taxableBase: Base
ticketFk: Ticket ticketFk: Ticket
@ -12,6 +12,18 @@ invoiceOut:
hasToInvoice: Has to invoice hasToInvoice: Has to invoice
hasVerifiedData: Verified data hasVerifiedData: Verified data
workerName: Worker workerName: Worker
isTaxDataChecked: Verified data
amount: Amount
clientFk: Client
companyFk: Company
created: Created
dued: Dued
customsAgentFk: Custom Agent
ref: Reference
fi: FI
min: Min
max: Max
hasPdf: Has PDF
card: card:
issued: Issued issued: Issued
customerCard: Customer card customerCard: Customer card
@ -53,7 +65,7 @@ invoiceOut:
active: Active active: Active
hasToInvoice: Has to Invoice hasToInvoice: Has to Invoice
verifiedData: Verified Data verifiedData: Verified Data
comercial: Commercial comercial: Sales person
errors: errors:
downloadCsvFailed: CSV download failed downloadCsvFailed: CSV download failed
invoiceOutModule: invoiceOutModule:

View File

@ -4,7 +4,7 @@ invoiceOut:
params: params:
company: Empresa company: Empresa
country: País country: País
clientId: ID del cliente clientId: Cliente
clientSocialName: Cliente clientSocialName: Cliente
taxableBase: Base taxableBase: Base
ticketFk: Ticket ticketFk: Ticket
@ -12,6 +12,18 @@ invoiceOut:
hasToInvoice: Debe facturar hasToInvoice: Debe facturar
hasVerifiedData: Datos verificados hasVerifiedData: Datos verificados
workerName: Comercial workerName: Comercial
isTaxDataChecked: Datos comprobados
amount: Importe
clientFk: Cliente
companyFk: Empresa
created: Creada
dued: Vencida
customsAgentFk: Agente aduanas
ref: Referencia
fi: CIF
min: Min
max: Max
hasPdf: Tiene PDF
card: card:
issued: Fecha emisión issued: Fecha emisión
customerCard: Ficha del cliente customerCard: Ficha del cliente