forked from verdnatura/salix-front
parent
85bc610298
commit
5f63a9b058
|
@ -194,23 +194,26 @@ async function createPdfInvoice() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeInvoiceDialog() {
|
function makeInvoiceDialog() {
|
||||||
//TODO: lo de abajo?
|
|
||||||
// if (ticket.value.address?.incotermsFk && !ticket.value.weight && !force)
|
|
||||||
dialog({
|
dialog({
|
||||||
component: VnConfirm,
|
component: VnConfirm,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
title: t('Are you sure you want to invoice this ticket?'),
|
||||||
|
message: t('You are going to invoice this ticket'),
|
||||||
promise: makeInvoice,
|
promise: makeInvoice,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
async function makeInvoice() {
|
async function makeInvoice() {
|
||||||
console.log(ticket.value);
|
|
||||||
const params = {
|
const params = {
|
||||||
ticketsIds: [parseInt(ticketId)],
|
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) {
|
async function transferClient(client) {
|
||||||
|
@ -515,7 +518,6 @@ async function handleInvoiceOutData() {
|
||||||
</QList>
|
</QList>
|
||||||
</QMenu>
|
</QMenu>
|
||||||
</QItem>
|
</QItem>
|
||||||
<!--TODO: acabar esta parte, falta la función makeInvoice-->
|
|
||||||
<QItem @click="makeInvoiceDialog()" v-ripple clickable v-if="isEditable">
|
<QItem @click="makeInvoiceDialog()" v-ripple clickable v-if="isEditable">
|
||||||
<QItemSection avatar>
|
<QItemSection avatar>
|
||||||
<QIcon name="picture_as_pdf" />
|
<QIcon name="picture_as_pdf" />
|
||||||
|
@ -628,4 +630,7 @@ es:
|
||||||
Recalculate components: Recalcular componentes
|
Recalculate components: Recalcular componentes
|
||||||
Are you sure you want to recalculate components?: ¿Seguro que quieres recalcular los componentes?
|
Are you sure you want to recalculate components?: ¿Seguro que quieres recalcular los componentes?
|
||||||
Data saved: Datos guardados
|
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>
|
</i18n>
|
||||||
|
|
Loading…
Reference in New Issue