refactor: refs #6739 fix redirect transferInvoice

This commit is contained in:
Jon Elias 2024-06-25 14:41:11 +02:00
parent 975c844d65
commit 31f8ab7c07
1 changed files with 6 additions and 2 deletions

View File

@ -70,13 +70,17 @@ const makeInvoice = async () => {
});
});
if (!response) {
console.log('entra cuando no checkbox');
return;
}
}
console.log('params: ', params);
const { data } = await axios.post('InvoiceOuts/transferInvoice', params);
console.log('data: ', data);
notify(t('Transferred invoice'), 'positive');
if (data.id) router.push({ name: 'InvoiceOutSummary', params: { id: data.id } });
const id = data?.[0];
if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
} catch (err) {
console.error('Error transfering invoice', err);
}
@ -204,7 +208,7 @@ const makeInvoice = async () => {
<i18n>
en:
checkInfo: New tickets from the destination customer will be generated in the consignee by default.
transferInvoiceInfo: Destination customer is marked to bill in the consignee, do you want to continue?
transferInvoiceInfo: Destination customer is marked to bill in the consignee
confirmTransferInvoice: The destination customer has selected to bill in the consignee, do you want to continue?
es:
Transfer invoice: Transferir factura