From 31f8ab7c07a95a6127838de72c0dafd86366bf24 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 25 Jun 2024 14:41:11 +0200 Subject: [PATCH] refactor: refs #6739 fix redirect transferInvoice --- src/components/TransferInvoiceForm.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/TransferInvoiceForm.vue b/src/components/TransferInvoiceForm.vue index b4f89fa746..1af23583d6 100644 --- a/src/components/TransferInvoiceForm.vue +++ b/src/components/TransferInvoiceForm.vue @@ -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 () => { 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