0
0
Fork 0

feat: refs #7346 formdata uses serialType

This commit is contained in:
Javi Gallego 2024-08-20 10:10:11 +02:00
parent ca3406fbc0
commit 0eb699bcbe
6 changed files with 12 additions and 10 deletions

View File

@ -689,6 +689,7 @@ invoiceOut:
chooseValidClient: Choose a valid client chooseValidClient: Choose a valid client
chooseValidCompany: Choose a valid company chooseValidCompany: Choose a valid company
chooseValidPrinter: Choose a valid printer chooseValidPrinter: Choose a valid printer
chooseValidSerialType: Choose a serial type
fillDates: Invoice date and the max date should be filled fillDates: Invoice date and the max date should be filled
invoiceDateLessThanMaxDate: Invoice date can not be less than max date invoiceDateLessThanMaxDate: Invoice date can not be less than max date
invoiceWithFutureDate: Exists an invoice with a future date invoiceWithFutureDate: Exists an invoice with a future date

View File

@ -695,6 +695,7 @@ invoiceOut:
chooseValidClient: Selecciona un cliente válido chooseValidClient: Selecciona un cliente válido
chooseValidCompany: Selecciona una empresa válida chooseValidCompany: Selecciona una empresa válida
chooseValidPrinter: Selecciona una impresora válida chooseValidPrinter: Selecciona una impresora válida
chooseValidSerialType: Selecciona una tipo de serie válida
fillDates: La fecha de la factura y la fecha máxima deben estar completas fillDates: La fecha de la factura y la fecha máxima deben estar completas
invoiceDateLessThanMaxDate: La fecha de la factura no puede ser menor que la fecha máxima invoiceDateLessThanMaxDate: La fecha de la factura no puede ser menor que la fecha máxima
invoiceWithFutureDate: Existe una factura con una fecha futura invoiceWithFutureDate: Existe una factura con una fecha futura

View File

@ -222,7 +222,7 @@ const showTransferInvoiceForm = async () => {
<QItemSection>{{ t('Generate PDF invoice') }}</QItemSection> <QItemSection>{{ t('Generate PDF invoice') }}</QItemSection>
</QItem> </QItem>
<QItem v-ripple clickable> <QItem v-ripple clickable>
<QItemSection>{{ t('Refund...') }}</QItemSection> <QItemSection>{{ t('Refund') }}</QItemSection>
<QItemSection side> <QItemSection side>
<QIcon name="keyboard_arrow_right" /> <QIcon name="keyboard_arrow_right" />
</QItemSection> </QItemSection>
@ -250,7 +250,7 @@ es:
Delete invoice: Eliminar factura Delete invoice: Eliminar factura
Book invoice: Asentar factura Book invoice: Asentar factura
Generate PDF invoice: Generar PDF factura Generate PDF invoice: Generar PDF factura
Refund...: Abono Refund: Abono
As PDF: como PDF As PDF: como PDF
As CSV: como CSV As CSV: como CSV
Send PDF: Enviar PDF Send PDF: Enviar PDF

View File

@ -110,7 +110,7 @@ onMounted(async () => {
/> />
<VnSelect <VnSelect
:label="t('invoiceOutSerialType')" :label="t('invoiceOutSerialType')"
v-model="formData.invoiceType" v-model="formData.serialType"
:options="serialTypesOptions" :options="serialTypesOptions"
option-value="type" option-value="type"
option-label="type" option-label="type"

View File

@ -244,7 +244,7 @@ const createRefund = async (withWarehouse) => {
</QItem> </QItem>
<QItem clickable v-ripple> <QItem clickable v-ripple>
<QItemSection> <QItemSection>
<QItemLabel>{{ t('Refund...') }}</QItemLabel> <QItemLabel>{{ t('Refund') }}</QItemLabel>
</QItemSection> </QItemSection>
<QItemSection side> <QItemSection side>
<QIcon name="keyboard_arrow_right" /> <QIcon name="keyboard_arrow_right" />
@ -279,7 +279,7 @@ es:
Add claim: Crear reclamación Add claim: Crear reclamación
Mark as reserved: Marcar como reservado Mark as reserved: Marcar como reservado
Unmark as reserved: Desmarcar como reservado Unmark as reserved: Desmarcar como reservado
Refund...: Abono... Refund: Abono
with warehouse: con almacén with warehouse: con almacén
without warehouse: sin almacén without warehouse: sin almacén
Claim out of time: Reclamación fuera de plazo Claim out of time: Reclamación fuera de plazo

View File

@ -19,7 +19,7 @@ export const useInvoiceOutGlobalStore = defineStore({
maxShipped: null, maxShipped: null,
clientId: null, clientId: null,
printer: null, printer: null,
invoiceType: null, serialType: null,
}, },
addresses: [], addresses: [],
minInvoicingDate: null, minInvoicingDate: null,
@ -101,7 +101,7 @@ export const useInvoiceOutGlobalStore = defineStore({
maxShipped: new Date(formData.maxShipped), maxShipped: new Date(formData.maxShipped),
clientId: formData.clientId ? formData.clientId : null, clientId: formData.clientId ? formData.clientId : null,
companyFk: formData.companyFk, companyFk: formData.companyFk,
invoiceType: formData.invoiceType, serialType: formData.serialType,
}; };
this.validateMakeInvoceParams(params, clientsToInvoice); this.validateMakeInvoceParams(params, clientsToInvoice);
@ -154,9 +154,9 @@ export const useInvoiceOutGlobalStore = defineStore({
); );
throw new Error('Invoice date in the future'); throw new Error('Invoice date in the future');
} }
if (!params.invoiceType) { if (!params.serialType) {
notify( notify(
'invoiceOut.globalInvoices.errors.chooseValidinvoiceType', 'invoiceOut.globalInvoices.errors.chooseValidSerialType',
'negative' 'negative'
); );
throw new Error('Invalid Serial Type'); throw new Error('Invalid Serial Type');
@ -188,7 +188,7 @@ export const useInvoiceOutGlobalStore = defineStore({
invoiceDate: new Date(formData.invoiceDate), invoiceDate: new Date(formData.invoiceDate),
maxShipped: new Date(formData.maxShipped), maxShipped: new Date(formData.maxShipped),
companyFk: formData.companyFk, companyFk: formData.companyFk,
invoiceType: formData.invoiceType, serialType: formData.serialType,
}; };
this.status = 'invoicing'; this.status = 'invoicing';