diff --git a/src/pages/Ticket/Card/TicketDescriptorMenu.vue b/src/pages/Ticket/Card/TicketDescriptorMenu.vue index 4c1cfad76..aec920002 100644 --- a/src/pages/Ticket/Card/TicketDescriptorMenu.vue +++ b/src/pages/Ticket/Card/TicketDescriptorMenu.vue @@ -194,23 +194,26 @@ async function createPdfInvoice() { } function makeInvoiceDialog() { - //TODO: lo de abajo? - // if (ticket.value.address?.incotermsFk && !ticket.value.weight && !force) dialog({ component: VnConfirm, componentProps: { + title: t('Are you sure you want to invoice this ticket?'), + message: t('You are going to invoice this ticket'), promise: makeInvoice, }, }); } async function makeInvoice() { - console.log(ticket.value); const params = { ticketsIds: [parseInt(ticketId)], }; - const { data } = await axios.post(`Tickets/invoiceTicketsAndPdf`, params); + await axios.post(`Tickets/invoiceTicketsAndPdf`, params); - if (data) window.location.reload(); + notify({ + message: t('Ticket invoiced'), + type: 'positive', + }); + window.location.reload(); } async function transferClient(client) { @@ -515,7 +518,6 @@ async function handleInvoiceOutData() { - @@ -628,4 +630,7 @@ es: Recalculate components: Recalcular componentes Are you sure you want to recalculate components?: ¿Seguro que quieres recalcular los componentes? Data saved: Datos guardados + Are you sure you want to invoice this ticket?: ¿Seguro que quieres facturar este ticket? + You are going to invoice this ticket: Vas a facturar este ticket + Ticket invoiced: Ticket facturado