fixes #4457 hasInvoiceElectronic-para-cliente #1116
|
@ -65,7 +65,8 @@ class Controller extends Section {
|
||||||
'credit',
|
'credit',
|
||||||
'email',
|
'email',
|
||||||
'phone',
|
'phone',
|
||||||
'mobile'
|
'mobile',
|
||||||
|
'hasInvoiceElectronic',
|
||||||
],
|
],
|
||||||
include: {
|
include: {
|
||||||
relation: 'salesPersonUser',
|
relation: 'salesPersonUser',
|
||||||
|
@ -241,26 +242,22 @@ class Controller extends Section {
|
||||||
this.$.sms.open();
|
this.$.sms.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
async makeInvoice() {
|
makeInvoice() {
|
||||||
const params = {ticketsIds: [this.id]};
|
const params = {ticketsIds: [this.id]};
|
||||||
/* const clientData = await this.$http.get(`Clients/${this.ticket.client.id}`);
|
/*
|
||||||
if (clientData.data.hasInvoiceElectronic) {
|
|
||||||
this.$http.post(`NotificationQueues`, {
|
|
||||||
notificationFk: 'invoiceElectronic',
|
|
||||||
authorFk: this.ticket.client.id,
|
|
||||||
});
|
|
||||||
/*
|
|
||||||
This should call the notification sistem to insert a new notification
|
This should call the notification sistem to insert a new notification
|
||||||
in te queue, yet to check how to handle user permissions,
|
in te queue, yet to check how to handle user permissions,
|
||||||
as of 08-11-2022 every employee can insert a new notification in the queue
|
as of 08-11-2022 every employee can insert a new notification in the queue
|
||||||
|
|
||||||
}*/
|
*/
|
||||||
const client = this.ticket.client;
|
const client = this.ticket.client;
|
||||||
|
|
||||||
if (client.hasInvoiceElectronic) {
|
if (client.hasInvoiceElectronic) {
|
||||||
this.$http.post(`NotificationQueues`, {
|
this.$http.post(`NotificationQueues`, {
|
||||||
notificationFk: 'invoiceElectronic',
|
notificationFk: 'invoiceElectronic',
|
||||||
authorFk: client.id,
|
authorFk: client.id,
|
||||||
|
}).then(a => {
|
||||||
|
this.vnApp.showSuccess(this.$t('Invoice sent'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,5 +9,6 @@ Send CSV Delivery Note: Enviar albarán en CSV
|
||||||
Send PDF Delivery Note: Enviar albarán en PDF
|
Send PDF Delivery Note: Enviar albarán en PDF
|
||||||
Show Proforma: Ver proforma
|
Show Proforma: Ver proforma
|
||||||
Refund all: Abonar todo
|
Refund all: Abonar todo
|
||||||
|
Invoice sent: Factura enviada
|
||||||
The following refund ticket have been created: "Se ha creado siguiente ticket de abono: {{ticketId}}"
|
The following refund ticket have been created: "Se ha creado siguiente ticket de abono: {{ticketId}}"
|
||||||
Transfer client: Transferir cliente
|
Transfer client: Transferir cliente
|
Loading…
Reference in New Issue