diff --git a/print/templates/email/campaign-metrics/campaign-metrics.js b/print/templates/email/campaign-metrics/campaign-metrics.js index 0ace0fc25..2bd93b725 100755 --- a/print/templates/email/campaign-metrics/campaign-metrics.js +++ b/print/templates/email/campaign-metrics/campaign-metrics.js @@ -21,6 +21,7 @@ module.exports = { }, props: { recipientId: { + type: [Number, String], required: true }, from: { diff --git a/print/templates/email/claim-pickup-order/claim-pickup-order.js b/print/templates/email/claim-pickup-order/claim-pickup-order.js index 4396b144a..cf4ba7d12 100755 --- a/print/templates/email/claim-pickup-order/claim-pickup-order.js +++ b/print/templates/email/claim-pickup-order/claim-pickup-order.js @@ -10,6 +10,7 @@ module.exports = { }, props: { claimId: { + type: [Number, String], required: true } } diff --git a/print/templates/email/client-debt-statement/client-debt-statement.js b/print/templates/email/client-debt-statement/client-debt-statement.js index c32e68943..f32f9e239 100755 --- a/print/templates/email/client-debt-statement/client-debt-statement.js +++ b/print/templates/email/client-debt-statement/client-debt-statement.js @@ -16,6 +16,7 @@ module.exports = { }, props: { recipientId: { + type: [Number, String], required: true }, from: { diff --git a/print/templates/email/client-welcome/client-welcome.js b/print/templates/email/client-welcome/client-welcome.js index f562339cc..eeb11bb78 100755 --- a/print/templates/email/client-welcome/client-welcome.js +++ b/print/templates/email/client-welcome/client-welcome.js @@ -18,6 +18,7 @@ module.exports = { }, props: { recipientId: { + type: [Number, String], required: true } } diff --git a/print/templates/email/delivery-note-link/delivery-note-link.js b/print/templates/email/delivery-note-link/delivery-note-link.js index 009fe7b5b..471b370d9 100755 --- a/print/templates/email/delivery-note-link/delivery-note-link.js +++ b/print/templates/email/delivery-note-link/delivery-note-link.js @@ -10,6 +10,7 @@ module.exports = { }, props: { ticketId: { + type: [Number, String], required: true } } diff --git a/print/templates/email/delivery-note/delivery-note.js b/print/templates/email/delivery-note/delivery-note.js index 64839b8e0..ffd2fe202 100755 --- a/print/templates/email/delivery-note/delivery-note.js +++ b/print/templates/email/delivery-note/delivery-note.js @@ -10,7 +10,7 @@ module.exports = { }, props: { ticketId: { - type: String, + type: [Number, String], required: true } } diff --git a/print/templates/email/driver-route/driver-route.js b/print/templates/email/driver-route/driver-route.js index de1dd9c39..378cd82ce 100755 --- a/print/templates/email/driver-route/driver-route.js +++ b/print/templates/email/driver-route/driver-route.js @@ -10,7 +10,7 @@ module.exports = { }, props: { routeId: { - type: String, + type: [Number, String], required: true } } diff --git a/print/templates/email/invoice/invoice.js b/print/templates/email/invoice/invoice.js index 10aeca7cc..d92b65cb3 100755 --- a/print/templates/email/invoice/invoice.js +++ b/print/templates/email/invoice/invoice.js @@ -18,7 +18,7 @@ module.exports = { }, props: { invoiceId: { - type: Number, + type: [Number, String], required: true } } diff --git a/print/templates/email/letter-debtor-nd/letter-debtor-nd.js b/print/templates/email/letter-debtor-nd/letter-debtor-nd.js index ba9f7957d..5e010d1ba 100755 --- a/print/templates/email/letter-debtor-nd/letter-debtor-nd.js +++ b/print/templates/email/letter-debtor-nd/letter-debtor-nd.js @@ -30,9 +30,11 @@ module.exports = { required: true }, recipientId: { + type: [Number, String], required: true }, companyId: { + type: [Number, String], required: true } } 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 56fc7c8a8..a514097cf 100755 --- a/print/templates/email/letter-debtor-st/letter-debtor-st.js +++ b/print/templates/email/letter-debtor-st/letter-debtor-st.js @@ -1,5 +1,4 @@ const Component = require(`${appPath}/core/component`); -const db = require(`${appPath}/core/database`); const emailHeader = new Component('email-header'); const emailFooter = new Component('email-footer'); const attachment = new Component('attachment'); @@ -28,9 +27,11 @@ module.exports = { }, props: { recipientId: { + type: [Number, String], required: true }, companyId: { + type: [Number, String], required: true }, } diff --git a/print/templates/email/payment-update/payment-update.js b/print/templates/email/payment-update/payment-update.js index eb6690c02..2b92976a3 100755 --- a/print/templates/email/payment-update/payment-update.js +++ b/print/templates/email/payment-update/payment-update.js @@ -26,6 +26,7 @@ module.exports = { }, props: { recipientId: { + type: [Number, String], required: true } } diff --git a/print/templates/email/printer-setup/printer-setup.js b/print/templates/email/printer-setup/printer-setup.js index f6f168163..95dff8ebb 100755 --- a/print/templates/email/printer-setup/printer-setup.js +++ b/print/templates/email/printer-setup/printer-setup.js @@ -24,6 +24,7 @@ module.exports = { }, props: { recipientId: { + type: [Number, String], required: true } } diff --git a/print/templates/email/sepa-core/sepa-core.js b/print/templates/email/sepa-core/sepa-core.js index 76f8d842f..743c6719c 100755 --- a/print/templates/email/sepa-core/sepa-core.js +++ b/print/templates/email/sepa-core/sepa-core.js @@ -16,9 +16,11 @@ module.exports = { }, props: { recipientId: { + type: [Number, String], required: true }, companyId: { + type: [Number, String], required: true } } diff --git a/print/templates/email/supplier-campaign-metrics/supplier-campaign-metrics.js b/print/templates/email/supplier-campaign-metrics/supplier-campaign-metrics.js index 20113d8ea..3cf290e4d 100755 --- a/print/templates/email/supplier-campaign-metrics/supplier-campaign-metrics.js +++ b/print/templates/email/supplier-campaign-metrics/supplier-campaign-metrics.js @@ -21,6 +21,7 @@ module.exports = { }, props: { recipientId: { + type: [Number, String], required: true }, from: { diff --git a/print/templates/reports/campaign-metrics/campaign-metrics.js b/print/templates/reports/campaign-metrics/campaign-metrics.js index 07d261a61..6669ce067 100755 --- a/print/templates/reports/campaign-metrics/campaign-metrics.js +++ b/print/templates/reports/campaign-metrics/campaign-metrics.js @@ -25,6 +25,7 @@ module.exports = { }, props: { recipientId: { + type: [Number, String], required: true }, from: { diff --git a/print/templates/reports/claim-pickup-order/claim-pickup-order.js b/print/templates/reports/claim-pickup-order/claim-pickup-order.js index 0d1228a4e..fa2124057 100755 --- a/print/templates/reports/claim-pickup-order/claim-pickup-order.js +++ b/print/templates/reports/claim-pickup-order/claim-pickup-order.js @@ -32,6 +32,7 @@ module.exports = { }, props: { claimId: { + type: [Number, String], required: true } } diff --git a/print/templates/reports/client-debt-statement/client-debt-statement.js b/print/templates/reports/client-debt-statement/client-debt-statement.js index 09b99590b..f006b0a92 100755 --- a/print/templates/reports/client-debt-statement/client-debt-statement.js +++ b/print/templates/reports/client-debt-statement/client-debt-statement.js @@ -69,6 +69,7 @@ module.exports = { }, props: { recipientId: { + type: [Number, String], required: true }, from: { diff --git a/print/templates/reports/cmr-authorization/cmr-authorization.js b/print/templates/reports/cmr-authorization/cmr-authorization.js index da08b6ec8..1adc75fa6 100755 --- a/print/templates/reports/cmr-authorization/cmr-authorization.js +++ b/print/templates/reports/cmr-authorization/cmr-authorization.js @@ -8,9 +8,8 @@ module.exports = { this.ticket = await this.findOneFromDef('ticket', [this.ticketId]); if (!this.ticket) throw new Error('Something went wrong'); - - this.client = await this.findOneFromDef('client', [this.ticket.clientFk]); + this.client = await this.findOneFromDef('client', [this.ticket.clientFk]); }, computed: { issued: function() { @@ -23,6 +22,7 @@ module.exports = { }, props: { ticketId: { + type: [Number, String], required: true } } diff --git a/print/templates/reports/delivery-note/delivery-note.js b/print/templates/reports/delivery-note/delivery-note.js index 9b3328d05..0ee7c8c91 100755 --- a/print/templates/reports/delivery-note/delivery-note.js +++ b/print/templates/reports/delivery-note/delivery-note.js @@ -117,7 +117,7 @@ module.exports = { }, props: { ticketId: { - type: String, + type: [Number, String], required: true } } diff --git a/print/templates/reports/driver-route/driver-route.js b/print/templates/reports/driver-route/driver-route.js index cd0b0dfdd..c34de37cc 100755 --- a/print/templates/reports/driver-route/driver-route.js +++ b/print/templates/reports/driver-route/driver-route.js @@ -39,7 +39,7 @@ module.exports = { }, props: { routeId: { - type: Number, + type: [Number, String], required: true } } diff --git a/print/templates/reports/entry-order/entry-order.js b/print/templates/reports/entry-order/entry-order.js index de396df2c..52a56bf03 100755 --- a/print/templates/reports/entry-order/entry-order.js +++ b/print/templates/reports/entry-order/entry-order.js @@ -40,7 +40,7 @@ module.exports = { }, props: { entryId: { - type: String, + type: [Number, String], required: true } } diff --git a/print/templates/reports/exportation/exportation.js b/print/templates/reports/exportation/exportation.js index 4487bbed9..fbf663249 100755 --- a/print/templates/reports/exportation/exportation.js +++ b/print/templates/reports/exportation/exportation.js @@ -28,7 +28,7 @@ module.exports = { }, props: { invoiceId: { - type: Number, + type: [Number, String], required: true } } diff --git a/print/templates/reports/invoice-incoterms/invoice-incoterms.js b/print/templates/reports/invoice-incoterms/invoice-incoterms.js index 022385643..99e23e15f 100755 --- a/print/templates/reports/invoice-incoterms/invoice-incoterms.js +++ b/print/templates/reports/invoice-incoterms/invoice-incoterms.js @@ -32,7 +32,7 @@ module.exports = { }, props: { invoiceId: { - type: Number, + type: [Number, String], required: true } } diff --git a/print/templates/reports/invoice/invoice.js b/print/templates/reports/invoice/invoice.js index 706b23bec..bd85a812c 100755 --- a/print/templates/reports/invoice/invoice.js +++ b/print/templates/reports/invoice/invoice.js @@ -115,7 +115,7 @@ module.exports = { }, props: { invoiceId: { - type: Number, + type: [Number, String], required: true } } diff --git a/print/templates/reports/letter-debtor/letter-debtor.js b/print/templates/reports/letter-debtor/letter-debtor.js index bdb3a504a..354b1d8d8 100755 --- a/print/templates/reports/letter-debtor/letter-debtor.js +++ b/print/templates/reports/letter-debtor/letter-debtor.js @@ -63,9 +63,11 @@ module.exports = { }, props: { recipientId: { + type: [Number, String], required: true }, companyId: { + type: [Number, String], required: true } } diff --git a/print/templates/reports/receipt/receipt.js b/print/templates/reports/receipt/receipt.js index d34735bb7..d7f4dd6da 100755 --- a/print/templates/reports/receipt/receipt.js +++ b/print/templates/reports/receipt/receipt.js @@ -25,6 +25,7 @@ module.exports = { }, props: { receiptId: { + type: [Number, String], required: true } } diff --git a/print/templates/reports/sepa-core/sepa-core.js b/print/templates/reports/sepa-core/sepa-core.js index 55487d829..7e3dd3566 100755 --- a/print/templates/reports/sepa-core/sepa-core.js +++ b/print/templates/reports/sepa-core/sepa-core.js @@ -40,9 +40,11 @@ const rptSepaCore = { }, props: { recipientId: { + type: [Number, String], required: true }, companyId: { + type: [Number, String], required: true } } diff --git a/print/templates/reports/supplier-campaign-metrics/supplier-campaign-metrics.js b/print/templates/reports/supplier-campaign-metrics/supplier-campaign-metrics.js index c37155556..1a460daa9 100755 --- a/print/templates/reports/supplier-campaign-metrics/supplier-campaign-metrics.js +++ b/print/templates/reports/supplier-campaign-metrics/supplier-campaign-metrics.js @@ -49,6 +49,7 @@ module.exports = { }, props: { recipientId: { + type: [Number, String], required: true }, from: { diff --git a/print/templates/reports/zone/zone.js b/print/templates/reports/zone/zone.js index 61c6cddfe..d611e1e53 100755 --- a/print/templates/reports/zone/zone.js +++ b/print/templates/reports/zone/zone.js @@ -13,6 +13,7 @@ module.exports = { }, props: { routeId: { + type: [Number, String], required: true } }