Item ID | -+ | Description | Warehouse | -P.P.U. | -
P.P.P.
@@ -170,7 +170,7 @@
-
+
{{row.code}} |
- {{row.description}} |
+ {{row.description || $t('services') }} |
{{row.stems | number($i18n.locale)}} |
{{row.netKg | number($i18n.locale)}} |
{{row.subtotal | currency('EUR', $i18n.locale)}} |
diff --git a/print/templates/reports/invoice/invoice.js b/print/templates/reports/invoice/invoice.js
index db94a7a12..31df7f7f5 100755
--- a/print/templates/reports/invoice/invoice.js
+++ b/print/templates/reports/invoice/invoice.js
@@ -81,7 +81,7 @@ module.exports = {
return this.rawSqlFromDef(`taxes`, [reference]);
},
fetchIntrastat(reference) {
- return this.rawSqlFromDef(`intrastat`, [reference, reference, reference]);
+ return this.rawSqlFromDef(`intrastat`, [reference, reference, reference, reference]);
},
fetchRectified(reference) {
return this.rawSqlFromDef(`rectified`, [reference]);
diff --git a/print/templates/reports/invoice/locale/en.yml b/print/templates/reports/invoice/locale/en.yml
index 4e4688b55..336592f0c 100644
--- a/print/templates/reports/invoice/locale/en.yml
+++ b/print/templates/reports/invoice/locale/en.yml
@@ -33,4 +33,5 @@ issued: Issued
plantPassport: Plant passport
observations: Observations
wireTransfer: "Pay method: Transferencia"
-accountNumber: "Account number: {0}"
\ No newline at end of file
+accountNumber: "Account number: {0}"
+services: Services
\ No newline at end of file
diff --git a/print/templates/reports/invoice/locale/es.yml b/print/templates/reports/invoice/locale/es.yml
index d37e77943..32f6fc708 100644
--- a/print/templates/reports/invoice/locale/es.yml
+++ b/print/templates/reports/invoice/locale/es.yml
@@ -33,4 +33,5 @@ issued: F. emisión
plantPassport: Pasaporte fitosanitario
observations: Observaciones
wireTransfer: "Forma de pago: Transferencia"
-accountNumber: "Número de cuenta: {0}"
\ No newline at end of file
+accountNumber: "Número de cuenta: {0}"
+services: Servicios
\ No newline at end of file
diff --git a/print/templates/reports/invoice/sql/intrastat.sql b/print/templates/reports/invoice/sql/intrastat.sql
index e2ee47667..5cc3ebd7f 100644
--- a/print/templates/reports/invoice/sql/intrastat.sql
+++ b/print/templates/reports/invoice/sql/intrastat.sql
@@ -1,4 +1,4 @@
-SELECT
+(SELECT
ir.id code,
ir.description description,
CAST(SUM(IFNULL(i.stems, 1) * s.quantity) AS DECIMAL(10,2)) stems,
@@ -19,4 +19,14 @@ SELECT
WHERE t.refFk = ?
AND i.intrastatFk
GROUP BY i.intrastatFk
- ORDER BY i.intrastatFk;
\ No newline at end of file
+ ORDER BY i.intrastatFk)
+UNION ALL
+(SELECT
+ NULL AS code,
+ NULL AS description,
+ 0 AS stems,
+ 0 AS netKg,
+ CAST(SUM((ts.quantity * ts.price)) AS DECIMAL(10,2)) AS subtotal
+ FROM vn.ticketService ts
+ JOIN vn.ticket t ON ts.ticketFk = t.id
+ WHERE t.refFk = ?);
\ No newline at end of file
diff --git a/print/templates/reports/invoiceIn/assets/css/import.js b/print/templates/reports/invoiceIn/assets/css/import.js
new file mode 100644
index 000000000..37a98dfdd
--- /dev/null
+++ b/print/templates/reports/invoiceIn/assets/css/import.js
@@ -0,0 +1,12 @@
+const Stylesheet = require(`vn-print/core/stylesheet`);
+
+const path = require('path');
+const vnPrintPath = path.resolve('print');
+
+module.exports = new Stylesheet([
+ `${vnPrintPath}/common/css/spacing.css`,
+ `${vnPrintPath}/common/css/misc.css`,
+ `${vnPrintPath}/common/css/layout.css`,
+ `${vnPrintPath}/common/css/report.css`,
+ `${__dirname}/style.css`])
+ .mergeStyles();
diff --git a/print/templates/reports/invoiceIn/assets/css/style.css b/print/templates/reports/invoiceIn/assets/css/style.css
new file mode 100644
index 000000000..9fda2a613
--- /dev/null
+++ b/print/templates/reports/invoiceIn/assets/css/style.css
@@ -0,0 +1,42 @@
+h2 {
+ font-weight: 100;
+ color: #555
+}
+
+.table-title {
+ margin-bottom: 15px;
+ font-size: .8rem
+}
+
+.table-title h2 {
+ margin: 0 15px 0 0
+}
+
+.ticket-info {
+ font-size: 22px
+}
+
+
+#nickname h2 {
+ max-width: 400px;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+}
+
+#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/invoiceIn/assets/images/europe.png b/print/templates/reports/invoiceIn/assets/images/europe.png
new file mode 100644
index 000000000..673be92ae
Binary files /dev/null and b/print/templates/reports/invoiceIn/assets/images/europe.png differ
diff --git a/print/templates/reports/invoiceIn/invoiceIn.html b/print/templates/reports/invoiceIn/invoiceIn.html
new file mode 100644
index 000000000..8919403b9
--- /dev/null
+++ b/print/templates/reports/invoiceIn/invoiceIn.html
@@ -0,0 +1,214 @@
+
+
+
+
|
---|