diff --git a/modules/invoiceOut/front/descriptor-menu/index.html b/modules/invoiceOut/front/descriptor-menu/index.html index 435db3612..face46293 100644 --- a/modules/invoiceOut/front/descriptor-menu/index.html +++ b/modules/invoiceOut/front/descriptor-menu/index.html @@ -102,7 +102,7 @@ diff --git a/modules/invoiceOut/front/descriptor-menu/index.js b/modules/invoiceOut/front/descriptor-menu/index.js index 2c28599e7..5184c137e 100644 --- a/modules/invoiceOut/front/descriptor-menu/index.js +++ b/modules/invoiceOut/front/descriptor-menu/index.js @@ -118,11 +118,14 @@ class Controller extends Section { const query = 'InvoiceOuts/refund'; const params = {ref: this.invoiceOut.ref, withWarehouse: withWarehouse}; this.$http.post(query, params).then(res => { - const refundTicket = res.data; - this.vnApp.showSuccess(this.$t('The following refund ticket have been created', { - ticketId: refundTicket.id + const tickets = res.data; + const refundTickets = tickets.map(ticket => ticket.id); + + this.vnApp.showSuccess(this.$t('The following refund tickets have been created', { + ticketId: refundTickets.join(',') })); - this.$state.go('ticket.card.sale', {id: refundTicket.id}); + if (refundTickets.length == 1) + this.$state.go('ticket.card.sale', {id: refundTickets[0]}); }); } diff --git a/modules/invoiceOut/front/descriptor-menu/locale/es.yml b/modules/invoiceOut/front/descriptor-menu/locale/es.yml index aaeefd9cc..9285fafa7 100644 --- a/modules/invoiceOut/front/descriptor-menu/locale/es.yml +++ b/modules/invoiceOut/front/descriptor-menu/locale/es.yml @@ -15,7 +15,7 @@ Are you sure you want to clone this invoice?: Estas seguro de clonar esta factur InvoiceOut booked: Factura asentada Are you sure you want to book this invoice?: Estas seguro de querer asentar esta factura? Are you sure you want to refund this invoice?: Estas seguro de querer abonar esta factura? -Create a single ticket with all the content of the current invoice: Crear un ticket unico con todo el contenido de la factura actual +Create a refund ticket for each ticket on the current invoice: Crear un ticket abono por cada ticket de la factura actual Regenerate PDF invoice: Regenerar PDF factura The invoice PDF document has been regenerated: El documento PDF de la factura ha sido regenerado The email can't be empty: El correo no puede estar vacío diff --git a/modules/ticket/front/descriptor-menu/locale/es.yml b/modules/ticket/front/descriptor-menu/locale/es.yml index 3181a753c..d0802fc4d 100644 --- a/modules/ticket/front/descriptor-menu/locale/es.yml +++ b/modules/ticket/front/descriptor-menu/locale/es.yml @@ -15,6 +15,7 @@ with warehouse: con almacén without warehouse: sin almacén Invoice sent: Factura enviada The following refund ticket have been created: "Se ha creado siguiente ticket de abono: {{ticketId}}" +The following refund tickets have been created: "Se ha creado los siguientes tickets de abono: {{ticketId}}" Transfer client: Transferir cliente Send SMS...: Enviar SMS... Notify changes: Notificar cambios