From 67402dfe5ee435e5f07af5f16ab485e1a40de601 Mon Sep 17 00:00:00 2001 From: alexandre Date: Tue, 25 Oct 2022 13:27:04 +0200 Subject: [PATCH] =?UTF-8?q?refs=20#4650=20observaciones=20a=C3=B1adidas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/reports/delivery-note/assets/css/style.css | 5 +++++ print/templates/reports/delivery-note/delivery-note.html | 6 ++++++ print/templates/reports/delivery-note/delivery-note.js | 4 ++++ print/templates/reports/delivery-note/locale/en.yml | 3 ++- print/templates/reports/delivery-note/locale/es.yml | 3 ++- print/templates/reports/delivery-note/locale/fr.yml | 3 ++- print/templates/reports/delivery-note/locale/pt.yml | 3 ++- print/templates/reports/delivery-note/sql/ticket.sql | 8 ++++++-- 8 files changed, 29 insertions(+), 6 deletions(-) diff --git a/print/templates/reports/delivery-note/assets/css/style.css b/print/templates/reports/delivery-note/assets/css/style.css index f99c385fa..8405ae78d 100644 --- a/print/templates/reports/delivery-note/assets/css/style.css +++ b/print/templates/reports/delivery-note/assets/css/style.css @@ -37,4 +37,9 @@ h2 { .phytosanitary-info { margin-top: 10px +} + +.observations{ + text-align: justify; + text-justify: inter-word; } \ 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 d166f3307..e34620591 100644 --- a/print/templates/reports/delivery-note/delivery-note.html +++ b/print/templates/reports/delivery-note/delivery-note.html @@ -263,6 +263,12 @@ +
+ +
+

{{$t('observations')}}

+

{{ticket.description}}

+
diff --git a/print/templates/reports/delivery-note/delivery-note.js b/print/templates/reports/delivery-note/delivery-note.js index 1037e5129..78f0f7662 100755 --- a/print/templates/reports/delivery-note/delivery-note.js +++ b/print/templates/reports/delivery-note/delivery-note.js @@ -55,6 +55,7 @@ module.exports = { const translatedType = this.$t(this.deliverNoteType); return `${translatedType} ${this.id}`; } + }, methods: { fetchClient(id) { @@ -119,6 +120,9 @@ module.exports = { return phytosanitary.filter((item, index) => phytosanitary.indexOf(item) == index ).join(', '); + }, + hasObservations() { + return this.ticket.code == 'deliveryNote' && this.ticket.description != null; } }, components: { diff --git a/print/templates/reports/delivery-note/locale/en.yml b/print/templates/reports/delivery-note/locale/en.yml index c74b87520..5902da8b3 100644 --- a/print/templates/reports/delivery-note/locale/en.yml +++ b/print/templates/reports/delivery-note/locale/en.yml @@ -46,4 +46,5 @@ taxes: fee: Fee tfoot: subtotal: Subtotal - total: Total \ No newline at end of file + total: Total +observations: Observations \ No newline at end of file diff --git a/print/templates/reports/delivery-note/locale/es.yml b/print/templates/reports/delivery-note/locale/es.yml index 5c5a6af4d..d87198f45 100644 --- a/print/templates/reports/delivery-note/locale/es.yml +++ b/print/templates/reports/delivery-note/locale/es.yml @@ -47,4 +47,5 @@ taxes: fee: Cuota tfoot: subtotal: Subtotal - total: Total \ No newline at end of file + total: Total +observations: Observaciones \ No newline at end of file diff --git a/print/templates/reports/delivery-note/locale/fr.yml b/print/templates/reports/delivery-note/locale/fr.yml index df7ca053b..603623a47 100644 --- a/print/templates/reports/delivery-note/locale/fr.yml +++ b/print/templates/reports/delivery-note/locale/fr.yml @@ -47,4 +47,5 @@ taxes: fee: Quote tfoot: subtotal: Total partiel - total: Total \ No newline at end of file + total: Total +observations: Observations \ No newline at end of file diff --git a/print/templates/reports/delivery-note/locale/pt.yml b/print/templates/reports/delivery-note/locale/pt.yml index 1f418b31f..fb49d230b 100644 --- a/print/templates/reports/delivery-note/locale/pt.yml +++ b/print/templates/reports/delivery-note/locale/pt.yml @@ -47,4 +47,5 @@ taxes: fee: Compartilhado tfoot: subtotal: Subtotal - total: Total \ No newline at end of file + total: Total +observations: Observações \ No newline at end of file diff --git a/print/templates/reports/delivery-note/sql/ticket.sql b/print/templates/reports/delivery-note/sql/ticket.sql index f78c72544..3d16b53d8 100644 --- a/print/templates/reports/delivery-note/sql/ticket.sql +++ b/print/templates/reports/delivery-note/sql/ticket.sql @@ -2,7 +2,11 @@ SELECT t.id, t.shipped, c.code companyCode, - t.packages + t.packages, + tto.description, + ot.code FROM ticket t JOIN company c ON c.id = t.companyFk -WHERE t.id = ? \ No newline at end of file + LEFT JOIN ticketObservation tto ON tto.ticketFk = t.id + LEFT JOIN observationType ot ON tto.observationTypeFk = ot.id +WHERE t.id = 1; \ No newline at end of file