fixes #4457 hasInvoiceElectronic-para-cliente #1116

Merged
pau merged 18 commits from 4457-hasInvoiceElectronic-para-cliente into dev 2022-11-24 09:45:45 +00:00
2 changed files with 8 additions and 10 deletions
Showing only changes of commit 31a0aae8e9 - Show all commits

View File

@ -65,7 +65,8 @@ class Controller extends Section {
'credit',
'email',
'phone',
'mobile'
'mobile',
'hasInvoiceElectronic',
],
include: {
relation: 'salesPersonUser',
@ -241,26 +242,22 @@ class Controller extends Section {
this.$.sms.open();
}
async makeInvoice() {
makeInvoice() {
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
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
}*/
*/
const client = this.ticket.client;
if (client.hasInvoiceElectronic) {
this.$http.post(`NotificationQueues`, {
notificationFk: 'invoiceElectronic',
authorFk: client.id,
}).then(a => {
this.vnApp.showSuccess(this.$t('Invoice sent'));
});
}

View File

@ -9,5 +9,6 @@ Send CSV Delivery Note: Enviar albarán en CSV
Send PDF Delivery Note: Enviar albarán en PDF
Show Proforma: Ver proforma
Refund all: Abonar todo
Invoice sent: Factura enviada
The following refund ticket have been created: "Se ha creado siguiente ticket de abono: {{ticketId}}"
Transfer client: Transferir cliente