From 8ee68d9fae1fdb44682eaa17268c9d79dab998b9 Mon Sep 17 00:00:00 2001 From: joan Date: Wed, 16 Dec 2020 12:21:15 +0100 Subject: [PATCH] Added unit test & updated translation --- print/core/filters/specs/zerofill.spec.js | 9 +++++++++ print/templates/reports/delivery-note/delivery-note.html | 3 +-- 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 ++- 6 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 print/core/filters/specs/zerofill.spec.js diff --git a/print/core/filters/specs/zerofill.spec.js b/print/core/filters/specs/zerofill.spec.js new file mode 100644 index 000000000..1c00ff4a7 --- /dev/null +++ b/print/core/filters/specs/zerofill.spec.js @@ -0,0 +1,9 @@ +import zerofill from '../zerofill.js'; + +describe('zerofill filter', () => { + const superDuperNumber = 1984; + + it('should filter the number filling it with zeros up to 6 characters length', () => { + expect(zerofill(superDuperNumber, '000000')).toEqual('001984'); + }); +}); diff --git a/print/templates/reports/delivery-note/delivery-note.html b/print/templates/reports/delivery-note/delivery-note.html index 5d02a60be..b6529dbe3 100644 --- a/print/templates/reports/delivery-note/delivery-note.html +++ b/print/templates/reports/delivery-note/delivery-note.html @@ -234,8 +234,7 @@
- Pasaporte fitosanitario
- Plant passport + {{$t('plantPassport')}}
diff --git a/print/templates/reports/delivery-note/locale/en.yml b/print/templates/reports/delivery-note/locale/en.yml index 8810a7595..74caa0eb6 100644 --- a/print/templates/reports/delivery-note/locale/en.yml +++ b/print/templates/reports/delivery-note/locale/en.yml @@ -23,4 +23,5 @@ packagings: Buckets and packaging services: Services vatType: VAT Type digitalSignature: Digital signature -ticket: Delivery note {0} \ No newline at end of file +ticket: Delivery note {0} +plantPassport: Plant passport \ 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 4dc7d4ff9..d9890d924 100644 --- a/print/templates/reports/delivery-note/locale/es.yml +++ b/print/templates/reports/delivery-note/locale/es.yml @@ -23,4 +23,5 @@ packagings: Cubos y embalajes services: Servicios vatType: Tipo de IVA digitalSignature: Firma digital -ticket: Albarán {0} \ No newline at end of file +ticket: Albarán {0} +plantPassport: Pasaporte fitosanitario \ 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 820a1f589..22d77012a 100644 --- a/print/templates/reports/delivery-note/locale/fr.yml +++ b/print/templates/reports/delivery-note/locale/fr.yml @@ -23,4 +23,5 @@ packagings: Bacs et emballages services: Service vatType: Type de TVA digitalSignature: Signature numérique -ticket: BL {0} \ No newline at end of file +ticket: BL {0} +plantPassport: Passeport phytosanitaire \ 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 29d94c0cd..a1f93550c 100644 --- a/print/templates/reports/delivery-note/locale/pt.yml +++ b/print/templates/reports/delivery-note/locale/pt.yml @@ -23,4 +23,5 @@ packagings: Baldes e Embalagens services: Serviços vatType: Tipo de IVA digitalSignature: Assinatura digital -ticket: Nota de Entrega {0} \ No newline at end of file +ticket: Nota de Entrega {0} +plantPassport: Passaporte vegetal \ No newline at end of file