diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql
index 1e4595aa3..879c4c6ee 100644
--- a/db/dump/fixtures.sql
+++ b/db/dump/fixtures.sql
@@ -442,13 +442,13 @@ INSERT INTO `vn`.`supplierAccount`(`id`, `supplierFk`, `iban`, `bankEntityFk`)
VALUES
(241, 442, 'ES111122333344111122221111', 128);
-INSERT INTO `vn`.`company`(`id`, `code`, `supplierAccountFk`, `workerManagerFk`, `companyCode`, `sage200Company`, `expired`)
+INSERT INTO `vn`.`company`(`id`, `code`, `supplierAccountFk`, `workerManagerFk`, `companyCode`, `sage200Company`, `expired`, `phytosanitary`)
VALUES
- (69 , 'CCs', NULL, 30, NULL, 0, NULL),
- (442 , 'VNL', 241, 30, 2 , 1, NULL),
- (567 , 'VNH', NULL, 30, NULL, 4, NULL),
- (791 , 'FTH', NULL, 30, NULL, 3, '2015-11-30'),
- (1381, 'ORN', NULL, 30, NULL, 7, NULL);
+ (69 , 'CCs', NULL, 30, NULL, 0, NULL, NULL),
+ (442 , 'VNL', 241, 30, 2 , 1, NULL, 'VNL Company - Plant passport'),
+ (567 , 'VNH', NULL, 30, NULL, 4, NULL, 'VNH Company - Plant passport'),
+ (791 , 'FTH', NULL, 30, NULL, 3, '2015-11-30', NULL),
+ (1381, 'ORN', NULL, 30, NULL, 7, NULL, 'ORN Company - Plant passport');
INSERT INTO `vn`.`invoiceOut`(`id`, `serial`, `amount`, `issued`,`clientFk`, `created`, `companyFk`, `dued`, `booked`, `bankFk`, `hasPdf`)
VALUES
diff --git a/print/common/css/layout.css b/print/common/css/layout.css
index 3b2643dc9..c709191bb 100644
--- a/print/common/css/layout.css
+++ b/print/common/css/layout.css
@@ -4,7 +4,7 @@
*/
.grid {
- font-family: Arial, sans-serif;
+ font-family: Arial, Helvetica, sans-serif;
font-size: 16px !important;
width: 100%
}
@@ -63,7 +63,6 @@
.panel {
position: relative;
margin-bottom: 15px;
- padding-top: 10px;
break-inside: avoid;
break-before: always;
break-after: always;
@@ -72,10 +71,11 @@
.panel .header {
background-color: #FFF;
padding: 2.5px 10px;
- position: absolute;
+ position: relative;
font-weight: bold;
- top: 0px;
+ display: inline-block;
left: 17.5px;
+ top: 10px;
}
.panel .body {
@@ -168,18 +168,22 @@ table {
.column-oriented td,
.column-oriented th {
- padding: 5px 10px
+ padding: 10px
}
.column-oriented thead {
- display: table-header-group;
- background-color: #e5e5e5
+ display: table-header-group
}
.column-oriented thead tr {
- border-bottom: 1px solid #808080;
- border-top: 1px solid #808080;
- background-color: #e5e5e5
+ border-top: 1px solid #AFB1B2;
+ background-color: #BABDBD;
+ border-bottom: 1px solid #AFB1B2;
+}
+
+.column-oriented thead.light tr {
+ background-color: #FFF;
+ color: #AFB1B2
}
.column-oriented tfoot {
@@ -193,13 +197,10 @@ table {
}
.column-oriented tfoot tr:first-child td {
+ border-top: 2px solid #AFB1B2;
padding-top: 20px !important;
}
-.column-oriented tfoot tr:first-child {
- border-top: 2px solid #808080;
-}
-
.column-oriented .description {
font-size: 0.8em
}
diff --git a/print/common/css/report.css b/print/common/css/report.css
index 796b99c4f..9331481f4 100644
--- a/print/common/css/report.css
+++ b/print/common/css/report.css
@@ -9,6 +9,6 @@ body {
.title {
margin-bottom: 20px;
font-weight: 100;
- font-size: 2em;
+ font-size: 3em;
margin-top: 0
}
\ No newline at end of file
diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html
index 85395559b..1af8df4d4 100644
--- a/print/core/components/report-footer/report-footer.html
+++ b/print/core/components/report-footer/report-footer.html
@@ -5,7 +5,6 @@
{{centerText}}
- {{phytosanitary}}
diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js
index 749170a0a..1ba36b1d7 100755
--- a/print/core/components/report-footer/report-footer.js
+++ b/print/core/components/report-footer/report-footer.js
@@ -1,18 +1,4 @@
-const db = require('../../database');
-
module.exports = {
name: 'report-footer',
- async serverPrefetch() {
- const companyCode = this.companyCode || 'VNL';
-
- this.phytosanitary = await this.getPhytosanitary(companyCode);
- },
- methods: {
- getPhytosanitary(code) {
- return db.findValue(`
- SELECT phytosanitary FROM company c
- WHERE c.code = :code`, {code});
- }
- },
- props: ['companyCode', 'showPhytosanitary', 'leftText', 'centerText']
+ props: ['leftText', 'centerText']
};
diff --git a/print/core/filters/index.js b/print/core/filters/index.js
index bfd99c504..efc398508 100644
--- a/print/core/filters/index.js
+++ b/print/core/filters/index.js
@@ -4,4 +4,5 @@ require('./uppercase');
require('./currency');
require('./percentage');
require('./number');
+require('./zerofill');
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/core/filters/zerofill.js b/print/core/filters/zerofill.js
new file mode 100644
index 000000000..c7df519b0
--- /dev/null
+++ b/print/core/filters/zerofill.js
@@ -0,0 +1,11 @@
+const {KeyValueModel} = require('loopback');
+const Vue = require('vue');
+
+const zerofill = function(value, pad) {
+ const valueStr = String(value);
+ return pad.substring(0, pad.length - valueStr.length) + valueStr;
+};
+
+Vue.filter('zerofill', zerofill);
+
+module.exports = zerofill;
diff --git a/print/templates/reports/campaign-metrics/assets/css/style.css b/print/templates/reports/campaign-metrics/assets/css/style.css
index 6e730869e..1b6428d3c 100644
--- a/print/templates/reports/campaign-metrics/assets/css/style.css
+++ b/print/templates/reports/campaign-metrics/assets/css/style.css
@@ -9,3 +9,11 @@
.bottom-line tr:nth-last-child() {
border-bottom: none;
}
+
+.report-info {
+ font-size: 20px
+}
+
+.description strong {
+ text-transform: uppercase;
+}
\ No newline at end of file
diff --git a/print/templates/reports/campaign-metrics/campaign-metrics.html b/print/templates/reports/campaign-metrics/campaign-metrics.html
index 536c7c5d2..725c03e4d 100644
--- a/print/templates/reports/campaign-metrics/campaign-metrics.html
+++ b/print/templates/reports/campaign-metrics/campaign-metrics.html
@@ -14,7 +14,7 @@
{{$t('title')}}
-
+
{{$t('Client')}} |
@@ -59,29 +59,22 @@
-
- {{sale.itemFk}} |
+
+ {{sale.itemFk | zerofill('000000')}} |
{{Math.trunc(sale.subtotal)}} |
{{sale.concept}} |
-
-
-
- {{sale.tag5}}
- {{sale.value5}}
-
- |
-
-
- {{sale.tag6}}
- {{sale.value6}}
-
- |
-
-
- {{sale.tag7}}
- {{sale.value7}}
-
+ |
+
+
+ {{sale.tag5}} {{sale.value5}}
+
+
+ {{sale.tag6}} {{sale.value6}}
+
+
+ {{sale.tag7}} {{sale.value7}}
+
|
diff --git a/print/templates/reports/claim-pickup-order/assets/css/style.css b/print/templates/reports/claim-pickup-order/assets/css/style.css
index c3b21a257..fb55cc5cd 100644
--- a/print/templates/reports/claim-pickup-order/assets/css/style.css
+++ b/print/templates/reports/claim-pickup-order/assets/css/style.css
@@ -1,7 +1,3 @@
-table.column-oriented {
- margin-top: 50px !important
-}
-
.sign {
margin: 150px auto;
width: 300px
diff --git a/print/templates/reports/claim-pickup-order/claim-pickup-order.html b/print/templates/reports/claim-pickup-order/claim-pickup-order.html
index 2fdea5291..3cc335887 100644
--- a/print/templates/reports/claim-pickup-order/claim-pickup-order.html
+++ b/print/templates/reports/claim-pickup-order/claim-pickup-order.html
@@ -12,25 +12,23 @@
-
-
{{$t('title')}}
-
-
-
- {{$t('claimId')}} |
- {{claimId}} |
-
-
- {{$t('clientId')}} |
- {{client.id}} |
-
-
- {{$t('date')}} |
- {{dated}} |
-
-
-
-
+
{{$t('title')}}
+
+
+
+ {{$t('claimId')}} |
+ {{claimId}} |
+
+
+ {{$t('clientId')}} |
+ {{client.id}} |
+
+
+ {{$t('date')}} |
+ {{dated}} |
+
+
+
-
+
{{$t('reference')}} |
diff --git a/print/templates/reports/delivery-note/assets/css/style.css b/print/templates/reports/delivery-note/assets/css/style.css
index c6d2ab2bf..cbe894097 100644
--- a/print/templates/reports/delivery-note/assets/css/style.css
+++ b/print/templates/reports/delivery-note/assets/css/style.css
@@ -9,15 +9,32 @@
max-width: 150px
}
-.description.phytosanitary {
- background-color: #e5e5e5
+.description strong {
+ text-transform: uppercase;
}
-h3 {
+h2 {
font-weight: 100;
color: #555
}
.ticket-info {
- font-size: 20px
+ font-size: 26px
+}
+
+#phytosanitary {
+ padding-right: 10px
+}
+
+#phytosanitary .flag img {
+ width: 100%
+}
+
+#phytosanitary .flag .flag-text {
+ padding-left: 10px;
+ box-sizing: border-box;
+}
+
+.phytosanitary-info {
+ margin-top: 10px
}
\ No newline at end of file
diff --git a/print/templates/reports/delivery-note/assets/images/europe.png b/print/templates/reports/delivery-note/assets/images/europe.png
new file mode 100644
index 000000000..673be92ae
Binary files /dev/null and b/print/templates/reports/delivery-note/assets/images/europe.png differ
diff --git a/print/templates/reports/delivery-note/delivery-note.html b/print/templates/reports/delivery-note/delivery-note.html
index 22ce0eaa8..b6529dbe3 100644
--- a/print/templates/reports/delivery-note/delivery-note.html
+++ b/print/templates/reports/delivery-note/delivery-note.html
@@ -14,7 +14,7 @@
-
+
{{$t('title')}}
@@ -66,59 +66,46 @@
- {{$t('saleLines')}}
+ {{$t('saleLines')}}
- {{$t('reference')}} |
- {{$t('quantity')}} |
- {{$t('concept')}} |
- {{$t('price')}} |
- {{$t('discount')}} |
- {{$t('vat')}} |
- {{$t('amount')}} |
+ {{$t('reference')}} |
+ {{$t('quantity')}} |
+ {{$t('concept')}} |
+ {{$t('price')}} |
+ {{$t('discount')}} |
+ {{$t('vat')}} |
+ {{$t('amount')}} |
-
-
- {{sale.itemFk}} |
+
+
+ {{sale.itemFk | zerofill('000000')}} |
{{sale.quantity}} |
{{sale.concept}} |
{{sale.price | currency('EUR', $i18n.locale)}} |
- {{(sale.discount / 100) | percentage}} |
+ {{(sale.discount / 100) | percentage}} |
{{sale.vatType}} |
{{sale.price * sale.quantity * (1 - sale.discount / 100) | currency('EUR', $i18n.locale)}} |
-
-
-
- {{sale.tag5}}
- {{sale.value5}}
-
- |
-
-
- {{sale.tag6}}
- {{sale.value6}}
-
- |
-
-
- {{sale.tag7}}
- {{sale.value7}}
-
- |
-
-
+
- {{sale.ediBotanic}} {{sale.denomination}} {{sale.countryCode}}-{{sale.passportNumber}}
- ZP
+
+ {{sale.tag5}} {{sale.value5}}
+
+
+ {{sale.tag6}} {{sale.value6}}
+
+
+ {{sale.tag7}} {{sale.value7}}
+
|
-
+ |
{{$t('subtotal')}}
|
{{getSubTotal() | currency('EUR', $i18n.locale)}} |
@@ -130,52 +117,89 @@
-
{{$t('services')}}
+
{{$t('services')}}
- {{$t('concept')}} |
- {{$t('quantity')}} |
- {{$t('vatType')}} |
- {{$t('amount')}} |
+ |
+ {{$t('quantity')}} |
+ {{$t('concept')}} |
+ {{$t('price')}} |
+ |
+ {{$t('vat')}} |
+ {{$t('amount')}} |
- {{service.description}} |
+ |
{{service.quantity}} |
- {{service.taxDescription}} |
+ {{service.description}} |
+ {{service.price | currency('EUR', $i18n.locale)}} |
+ |
+ {{service.taxDescription}} |
{{service.price | currency('EUR', $i18n.locale)}} |
- |
- {{$t('total')}} {{serviceTotal | currency('EUR', $i18n.locale)}} |
+
+ {{$t('subtotal')}}
+ |
+ {{serviceTotal | currency('EUR', $i18n.locale)}} |
-
-
-
-
{{$t('taxBreakdown')}}
+
+
+
+
+
{{$t('packagings')}}
- {{$t('type')}} |
-
+ | {{$t('reference')}} |
+ {{$t('quantity')}} |
+ {{$t('concept')}} |
+
+
+
+
+ {{packaging.itemFk | zerofill('000000')}} |
+ {{packaging.quantity}} |
+ {{packaging.name}} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{$t('taxBreakdown')}} |
+
+
+
+
+ {{$t('type')}} |
+
{{$t('taxBase')}}
-
- | {{$t('tax')}} |
- {{$t('fee')}} |
+
+ {{$t('tax')}} |
+ {{$t('fee')}} |
{{tax.name}} |
-
+ |
{{tax.Base | currency('EUR', $i18n.locale)}}
|
{{tax.vatPercent | percentage}} |
@@ -199,29 +223,45 @@
-
-
-
-
{{$t('packagings')}}
-
-
-
- Id |
- {{$t('concept')}} |
- {{$t('quantity')}} |
-
-
-
-
- {{packaging.itemFk}} |
- {{packaging.name}} |
- {{packaging.quantity}} |
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ {{$t('plantPassport')}}
+
+
+
+
+
+ A
+ {{getBotanical()}}
+
+
+ B
+ ES17462130
+
+
+ C
+ {{ticket.id}}
+
+
+ D
+ ES
+
+
+
+
-
-
+
+
+