forked from verdnatura/salix-front
parent
85bc610298
commit
5f63a9b058
|
@ -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() {
|
|||
</QList>
|
||||
</QMenu>
|
||||
</QItem>
|
||||
<!--TODO: acabar esta parte, falta la función makeInvoice-->
|
||||
<QItem @click="makeInvoiceDialog()" v-ripple clickable v-if="isEditable">
|
||||
<QItemSection avatar>
|
||||
<QIcon name="picture_as_pdf" />
|
||||
|
@ -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
|
||||
</i18n>
|
||||
|
|
Loading…
Reference in New Issue