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
chooseValidCompany: Choose a valid company
chooseValidPrinter: Choose a valid printer
chooseValidSerialType: Choose a serial type
fillDates: Invoice date and the max date should be filled
invoiceDateLessThanMaxDate: Invoice date can not be less than max date
invoiceWithFutureDate: Exists an invoice with a future date

View File

@ -695,6 +695,7 @@ invoiceOut:
chooseValidClient: Selecciona un cliente válido
chooseValidCompany: Selecciona una empresa 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
invoiceDateLessThanMaxDate: La fecha de la factura no puede ser menor que la fecha máxima
invoiceWithFutureDate: Existe una factura con una fecha futura

View File

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

View File

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

View File

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

View File

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