-
{{ $t('title') }}
+
{{ $t('title') }} {{$i18n.locale}}
{{ $t('sections.introduction.title') }},
{{ $t('sections.introduction.description') }}
diff --git a/print/templates/email/letter-debtor-st/letter-debtor-st.js b/print/templates/email/letter-debtor-st/letter-debtor-st.js
index 61f3c01ad..51ed8b2ff 100755
--- a/print/templates/email/letter-debtor-st/letter-debtor-st.js
+++ b/print/templates/email/letter-debtor-st/letter-debtor-st.js
@@ -8,7 +8,7 @@ const attachments = require('./attachments.json');
module.exports = {
name: 'letter-debtor-st',
async serverPrefetch() {
- this.debtor = await this.fetchDebtor(this.clientId, this.companyId);
+ this.debtor = await this.fetchDebtor(this.recipientId, this.companyId);
if (!this.debtor)
throw new Error('Something went wrong');
@@ -37,10 +37,7 @@ module.exports = {
'attachment': attachment.build()
},
props: {
- authorization: {
- required: true
- },
- clientId: {
+ recipientId: {
required: true
},
companyId: {
diff --git a/print/templates/email/payment-update/payment-update.html b/print/templates/email/payment-update/payment-update.html
index 6bba77308..0838d6efb 100644
--- a/print/templates/email/payment-update/payment-update.html
+++ b/print/templates/email/payment-update/payment-update.html
@@ -1,5 +1,5 @@
-
+
diff --git a/print/templates/email/payment-update/payment-update.js b/print/templates/email/payment-update/payment-update.js
index 4479deb81..c74cf8694 100755
--- a/print/templates/email/payment-update/payment-update.js
+++ b/print/templates/email/payment-update/payment-update.js
@@ -6,7 +6,7 @@ const emailFooter = new Component('email-footer');
module.exports = {
name: 'payment-update',
async serverPrefetch() {
- this.payMethod = await this.fetchPayMethod(this.clientId);
+ this.payMethod = await this.fetchPayMethod(this.recipientId);
if (!this.payMethod)
throw new Error('Something went wrong');
@@ -34,7 +34,7 @@ module.exports = {
'email-footer': emailFooter.build()
},
props: {
- clientId: {
+ recipientId: {
required: true
}
}
diff --git a/print/templates/email/printer-setup/printer-setup.html b/print/templates/email/printer-setup/printer-setup.html
index 6b295bd8f..df0b43f0c 100644
--- a/print/templates/email/printer-setup/printer-setup.html
+++ b/print/templates/email/printer-setup/printer-setup.html
@@ -1,5 +1,5 @@
-
+
diff --git a/print/templates/email/printer-setup/printer-setup.js b/print/templates/email/printer-setup/printer-setup.js
index 86ae0044a..4aa63587f 100755
--- a/print/templates/email/printer-setup/printer-setup.js
+++ b/print/templates/email/printer-setup/printer-setup.js
@@ -8,7 +8,7 @@ const attachments = require('./attachments.json');
module.exports = {
name: 'printer-setup',
async serverPrefetch() {
- this.client = await this.fetchClient(this.clientId);
+ this.client = await this.fetchClient(this.recipientId);
},
data() {
return {attachments};
@@ -16,19 +16,19 @@ module.exports = {
methods: {
fetchClient(clientId) {
return db.findOne(`
- SELECT
- c.id,
- u.lang locale,
- u.name AS userName,
- c.email recipient,
- CONCAT(w.lastName, ' ', w.firstName) salesPersonName,
- w.phone AS salesPersonPhone,
- CONCAT(wu.name, '@verdnatura.es') AS salesPersonEmail
- FROM client c
- JOIN account.user u ON u.id = c.id
- LEFT JOIN worker w ON w.id = c.salesPersonFk
- LEFT JOIN account.user wu ON wu.id = w.userFk
- WHERE c.id = ?`, [clientId]);
+ SELECT
+ c.id,
+ u.lang locale,
+ u.name AS userName,
+ c.email recipient,
+ CONCAT(w.lastName, ' ', w.firstName) salesPersonName,
+ w.phone AS salesPersonPhone,
+ CONCAT(wu.name, '@verdnatura.es') AS salesPersonEmail
+ FROM client c
+ JOIN account.user u ON u.id = c.id
+ LEFT JOIN worker w ON w.id = c.salesPersonFk
+ LEFT JOIN account.user wu ON wu.id = w.userFk
+ WHERE c.id = ?`, [clientId]);
}
},
components: {
@@ -37,7 +37,7 @@ module.exports = {
'attachment': attachment.build()
},
props: {
- clientId: {
+ recipientId: {
required: true
}
}
diff --git a/print/templates/email/sepa-core/sepa-core.html b/print/templates/email/sepa-core/sepa-core.html
index b71c8e10f..853597bf8 100644
--- a/print/templates/email/sepa-core/sepa-core.html
+++ b/print/templates/email/sepa-core/sepa-core.html
@@ -1,5 +1,5 @@
-
+
diff --git a/print/templates/email/sepa-core/sepa-core.js b/print/templates/email/sepa-core/sepa-core.js
index 31afb1115..76f8d842f 100755
--- a/print/templates/email/sepa-core/sepa-core.js
+++ b/print/templates/email/sepa-core/sepa-core.js
@@ -15,7 +15,7 @@ module.exports = {
'attachment': attachment.build()
},
props: {
- clientId: {
+ recipientId: {
required: true
},
companyId: {
diff --git a/print/templates/reports/campaign-metrics/campaign-metrics.html b/print/templates/reports/campaign-metrics/campaign-metrics.html
index ee1908164..d125ab7e2 100644
--- a/print/templates/reports/campaign-metrics/campaign-metrics.html
+++ b/print/templates/reports/campaign-metrics/campaign-metrics.html
@@ -1,5 +1,5 @@
-
+
diff --git a/print/templates/reports/campaign-metrics/campaign-metrics.js b/print/templates/reports/campaign-metrics/campaign-metrics.js
index f72069260..ef1d735de 100755
--- a/print/templates/reports/campaign-metrics/campaign-metrics.js
+++ b/print/templates/reports/campaign-metrics/campaign-metrics.js
@@ -9,9 +9,8 @@ module.exports = {
this.to = new Date(this.to);
this.from = new Date(this.from);
- this.client = await this.fetchClient(this.clientId);
-
- this.sales = await this.fetchSales(this.clientId, this.from, this.to);
+ this.client = await this.fetchClient(this.recipientId);
+ this.sales = await this.fetchSales(this.recipientId, this.from, this.to);
if (!this.client)
throw new Error('Something went wrong');
@@ -63,7 +62,7 @@ module.exports = {
'report-footer': reportFooter.build()
},
props: {
- clientId: {
+ recipientId: {
required: true
},
from: {
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 f23ee3401..59647cf9a 100644
--- a/print/templates/reports/claim-pickup-order/claim-pickup-order.html
+++ b/print/templates/reports/claim-pickup-order/claim-pickup-order.html
@@ -1,5 +1,5 @@
-
+
diff --git a/print/templates/reports/delivery-note/delivery-note.html b/print/templates/reports/delivery-note/delivery-note.html
index 719397c08..913946196 100644
--- a/print/templates/reports/delivery-note/delivery-note.html
+++ b/print/templates/reports/delivery-note/delivery-note.html
@@ -1,5 +1,5 @@
-
+
@@ -88,10 +88,10 @@
{{sale.itemFk}} |
{{sale.quantity}} |
{{sale.concept}} |
- {{sale.price | currency('EUR', locale)}} |
+ {{sale.price | currency('EUR', $i18n.locale)}} |
{{(sale.discount / 100) | percentage}} |
{{sale.vatType}} |
- {{sale.price * sale.quantity * (1 - sale.discount / 100) | currency('EUR', locale)}} |
+ {{sale.price * sale.quantity * (1 - sale.discount / 100) | currency('EUR', $i18n.locale)}} |
@@ -125,7 +125,7 @@
|
{{$t('subtotal')}}
|
- {{getSubTotal() | currency('EUR', locale)}} |
+ {{getSubTotal() | currency('EUR', $i18n.locale)}} |
@@ -149,13 +149,13 @@
{{service.description}} |
{{service.quantity}} |
{{service.taxDescription}} |
- {{service.price | currency('EUR', locale)}} |
+ {{service.price | currency('EUR', $i18n.locale)}} |
|
- {{$t('total')}} {{serviceTotal | currency('EUR', locale)}} |
+ {{$t('total')}} {{serviceTotal | currency('EUR', $i18n.locale)}} |
@@ -180,24 +180,24 @@
{{tax.name}} |
- {{tax.Base | currency('EUR', locale)}}
+ {{tax.Base | currency('EUR', $i18n.locale)}}
|
{{tax.vatPercent | percentage}} |
- {{tax.tax | currency('EUR', locale)}} |
+ {{tax.tax | currency('EUR', $i18n.locale)}} |
{{$t('subtotal')}} |
- {{getTotalBase() | currency('EUR', locale)}}
+ {{getTotalBase() | currency('EUR', $i18n.locale)}}
|
|
- {{getTotalTax()| currency('EUR', locale)}} |
+ {{getTotalTax()| currency('EUR', $i18n.locale)}} |
{{$t('total')}} |
- {{getTotal() | currency('EUR', locale)}} |
+ {{getTotal() | currency('EUR', $i18n.locale)}} |
diff --git a/print/templates/reports/driver-route/driver-route.html b/print/templates/reports/driver-route/driver-route.html
index ba9a339da..919ed0679 100644
--- a/print/templates/reports/driver-route/driver-route.html
+++ b/print/templates/reports/driver-route/driver-route.html
@@ -1,5 +1,5 @@
-
+
@@ -141,7 +141,7 @@
{{$t('import')}} |
- {{ticket.import | currency('EUR', locale)}} |
+ {{ticket.import | currency('EUR', $i18n.locale)}} |
diff --git a/print/templates/reports/entry-order/entry-order.html b/print/templates/reports/entry-order/entry-order.html
index 5ee45787c..3c1cdbd33 100644
--- a/print/templates/reports/entry-order/entry-order.html
+++ b/print/templates/reports/entry-order/entry-order.html
@@ -1,5 +1,5 @@
-
+
@@ -77,8 +77,8 @@
{{buy.packing}} |
{{buy.itemName}} |
{{buy.quantity | number}} |
- {{buy.buyingValue | currency('EUR', locale)}} |
- {{buy.buyingValue * buy.quantity | currency('EUR', locale)}} |
+ {{buy.buyingValue | currency('EUR', $i18n.locale)}} |
+ {{buy.buyingValue * buy.quantity | currency('EUR', $i18n.locale)}} |
@@ -106,7 +106,7 @@
|
{{$t('total')}}
|
- {{getTotal() | currency('EUR', locale)}} |
+ {{getTotal() | currency('EUR', $i18n.locale)}} |
diff --git a/print/templates/reports/item-label/item-label.html b/print/templates/reports/item-label/item-label.html
index 0cb351b27..3f2d7ce69 100644
--- a/print/templates/reports/item-label/item-label.html
+++ b/print/templates/reports/item-label/item-label.html
@@ -1,5 +1,5 @@
-
+
diff --git a/print/templates/reports/letter-debtor/letter-debtor.html b/print/templates/reports/letter-debtor/letter-debtor.html
index 534798f5e..81a001765 100644
--- a/print/templates/reports/letter-debtor/letter-debtor.html
+++ b/print/templates/reports/letter-debtor/letter-debtor.html
@@ -1,5 +1,5 @@
-
+
diff --git a/print/templates/reports/letter-debtor/letter-debtor.js b/print/templates/reports/letter-debtor/letter-debtor.js
index f099c1869..7da1b438c 100755
--- a/print/templates/reports/letter-debtor/letter-debtor.js
+++ b/print/templates/reports/letter-debtor/letter-debtor.js
@@ -6,8 +6,8 @@ const reportFooter = new Component('report-footer');
module.exports = {
name: 'letter-debtor',
async serverPrefetch() {
- this.client = await this.fetchClient(this.clientId);
- this.sales = await this.fetchSales(this.clientId, this.companyId);
+ this.client = await this.fetchClient(this.recipientId);
+ this.sales = await this.fetchSales(this.recipientId, this.companyId);
if (!this.client)
throw new Error('Something went wrong');
@@ -79,7 +79,7 @@ module.exports = {
'report-footer': reportFooter.build()
},
props: {
- clientId: {
+ recipientId: {
required: true
},
companyId: {
diff --git a/print/templates/reports/receipt/receipt.html b/print/templates/reports/receipt/receipt.html
index 5538b7c3f..9a4e1964c 100644
--- a/print/templates/reports/receipt/receipt.html
+++ b/print/templates/reports/receipt/receipt.html
@@ -1,5 +1,5 @@
-
+
diff --git a/print/templates/reports/sepa-core/sepa-core.html b/print/templates/reports/sepa-core/sepa-core.html
index 720f70058..d14a3ce6e 100644
--- a/print/templates/reports/sepa-core/sepa-core.html
+++ b/print/templates/reports/sepa-core/sepa-core.html
@@ -1,5 +1,5 @@
-
+
diff --git a/print/templates/reports/sepa-core/sepa-core.js b/print/templates/reports/sepa-core/sepa-core.js
index de3a2983d..a63b5b704 100755
--- a/print/templates/reports/sepa-core/sepa-core.js
+++ b/print/templates/reports/sepa-core/sepa-core.js
@@ -6,8 +6,8 @@ const reportFooter = new Component('report-footer');
const rptSepaCore = {
name: 'sepa-core',
async serverPrefetch() {
- this.client = await this.fetchClient(this.clientId, this.companyId);
- this.supplier = await this.fetchSupplier(this.clientId, this.companyId);
+ this.client = await this.fetchClient(this.recipientId, this.companyId);
+ this.supplier = await this.fetchSupplier(this.recipientId, this.companyId);
if (!this.client)
throw new Error('Something went wrong');
@@ -67,7 +67,7 @@ const rptSepaCore = {
'report-footer': reportFooter.build()
},
props: {
- clientId: {
+ recipientId: {
required: true
},
companyId: {
@@ -76,5 +76,4 @@ const rptSepaCore = {
}
};
-
module.exports = rptSepaCore;
diff --git a/print/templates/reports/zone/zone.html b/print/templates/reports/zone/zone.html
index 8e6406ad4..c1e8d1ec1 100644
--- a/print/templates/reports/zone/zone.html
+++ b/print/templates/reports/zone/zone.html
@@ -1,5 +1,5 @@
-
+