diff --git a/modules/ticket/front/descriptor-menu/index.html b/modules/ticket/front/descriptor-menu/index.html index d613fb5de..faa8eedfe 100644 --- a/modules/ticket/front/descriptor-menu/index.html +++ b/modules/ticket/front/descriptor-menu/index.html @@ -21,7 +21,7 @@ as PDF @@ -44,7 +44,6 @@ vn-click-stop="sendDeliveryNoteMenu.show($event, 'left')" translate> Send Delivery Note... - + + Show Proforma + { describe('showPdfDeliveryNote()', () => { it('should open a new window showing a delivery note PDF document', () => { jest.spyOn(window, 'open').mockReturnThis(); - + const type = 'deliveryNote'; const expectedParams = { ticketId: ticket.id, - recipientId: ticket.client.id + recipientId: ticket.client.id, + type: type }; const serializedParams = $httpParamSerializer(expectedParams); const expectedPath = `api/report/delivery-note?${serializedParams}`; - controller.showPdfDeliveryNote(); + controller.showPdfDeliveryNote(type); expect(window.open).toHaveBeenCalledWith(expectedPath); }); diff --git a/modules/ticket/front/descriptor-menu/locale/es.yml b/modules/ticket/front/descriptor-menu/locale/es.yml index 4a61556db..56fa1a973 100644 --- a/modules/ticket/front/descriptor-menu/locale/es.yml +++ b/modules/ticket/front/descriptor-menu/locale/es.yml @@ -5,4 +5,5 @@ as CSV: como CSV Send PDF: Enviar PDF Send CSV: Enviar CSV Send CSV Delivery Note: Enviar albarán en CSV -Send PDF Delivery Note: Enviar albarán en PDF \ No newline at end of file +Send PDF Delivery Note: Enviar albarán en PDF +Show Proforma: Ver proforma \ No newline at end of file diff --git a/print/templates/reports/delivery-note/delivery-note.html b/print/templates/reports/delivery-note/delivery-note.html index 36d9abde1..644e0cf04 100644 --- a/print/templates/reports/delivery-note/delivery-note.html +++ b/print/templates/reports/delivery-note/delivery-note.html @@ -15,7 +15,7 @@
-

{{$t('title')}}

+

{{$t(type)}}

@@ -23,7 +23,7 @@ - + @@ -281,7 +281,7 @@ diff --git a/print/templates/reports/delivery-note/delivery-note.js b/print/templates/reports/delivery-note/delivery-note.js index 0ee7c8c91..dbfedae8f 100755 --- a/print/templates/reports/delivery-note/delivery-note.js +++ b/print/templates/reports/delivery-note/delivery-note.js @@ -44,6 +44,10 @@ module.exports = { }); return total; + }, + footerType() { + const translatedType = this.$t(this.type); + return `${translatedType} ${this.ticketId}`; } }, methods: { @@ -119,6 +123,10 @@ module.exports = { ticketId: { type: [Number, String], required: true + }, + type: { + type: String, + required: true } } }; diff --git a/print/templates/reports/delivery-note/locale/en.yml b/print/templates/reports/delivery-note/locale/en.yml index 16d0954e2..93c09d98c 100644 --- a/print/templates/reports/delivery-note/locale/en.yml +++ b/print/templates/reports/delivery-note/locale/en.yml @@ -1,6 +1,6 @@ reportName: delivery-note -title: Delivery note -ticketId: Delivery note +deliveryNote: Delivery note +proforma: Proforma clientId: Client deliveryAddress: Delivery address fiscalData: Fiscal data @@ -17,7 +17,6 @@ total: Total subtotal: Subtotal vatType: VAT Type digitalSignature: Digital signature -ticket: Delivery note {0} plantPassport: Plant passport packages: Packages services: diff --git a/print/templates/reports/delivery-note/locale/es.yml b/print/templates/reports/delivery-note/locale/es.yml index ca670ad59..b33b376fd 100644 --- a/print/templates/reports/delivery-note/locale/es.yml +++ b/print/templates/reports/delivery-note/locale/es.yml @@ -1,6 +1,6 @@ reportName: albaran -title: Albarán -ticketId: Albarán +deliveryNote: Albarán +proforma: Proforma clientId: Cliente deliveryAddress: Dirección de entrega fiscalData: Datos fiscales diff --git a/print/templates/reports/delivery-note/locale/fr.yml b/print/templates/reports/delivery-note/locale/fr.yml index 6b3779a5b..74d52471d 100644 --- a/print/templates/reports/delivery-note/locale/fr.yml +++ b/print/templates/reports/delivery-note/locale/fr.yml @@ -1,6 +1,6 @@ reportName: bon-de-livraison -title: Bon de livraison -ticketId: BL +deliveryNote: Bon de livraison +proforma: Proforma clientId: Client deliveryAddress: Adresse de livraison fiscalData: Coordonnées diff --git a/print/templates/reports/delivery-note/locale/pt.yml b/print/templates/reports/delivery-note/locale/pt.yml index 1a9c1fbd1..93554f74b 100644 --- a/print/templates/reports/delivery-note/locale/pt.yml +++ b/print/templates/reports/delivery-note/locale/pt.yml @@ -1,6 +1,6 @@ reportName: nota-de-entrega -title: Nota de Entrega -ticketId: Nota de Entrega +deliveryNote: Nota de Entrega +proforma: Proforma clientId: Cliente deliveryAddress: Morada de Entrega fiscalData: Dados Fiscais
{{client.id}}
{{$t('ticketId')}}{{$t(type)}} {{ticket.id}}