diff --git a/print/report/rpt-sepa-core/index.html b/print/report/rpt-sepa-core/index.html
index bc53c305c2..459cd89eed 100644
--- a/print/report/rpt-sepa-core/index.html
+++ b/print/report/rpt-sepa-core/index.html
@@ -17,7 +17,7 @@
{{$t('supplier.orderReference')}} |
- {{mandateCode}}
+ | {{mandateCode}} |
{{$t('supplier.identifier')}} |
@@ -62,19 +62,19 @@
{{$t('client.name')}}
{{$t('client.accountHolder')}}
- {{clientName}}
+ | {{clientName}} |
{{$t('client.street')}} |
- {{clientStreet}}
+ | {{clientStreet}} |
{{$t('client.location')}} |
- {{clientPostCode}}, {{clientCity}} ({{clientProvince}})
+ | {{clientPostCode}}, {{clientCity}} ({{clientProvince}}) |
{{$t('client.country')}} |
- {{clientCountry}}
+ | {{clientCountry}} |
{{$t('client.swift')}} |
@@ -82,7 +82,7 @@
-
+
{{$t('client.accountNumber')}} |
@@ -123,15 +123,15 @@
{{$t('client.unique')}} |
-
+
{{$t('client.signLocation')}} |
- {{dated()}}, {{supplierProvince}}
+ | {{dated()}}, {{supplierProvince}} |
{{$t('client.sign')}} |
-
+ | |
diff --git a/print/report/rpt-sepa-core/index.js b/print/report/rpt-sepa-core/index.js
index 66b60cf3e3..e1fe668c71 100755
--- a/print/report/rpt-sepa-core/index.js
+++ b/print/report/rpt-sepa-core/index.js
@@ -1,10 +1,19 @@
+const fs = require('fs');
const strftime = require('strftime');
const database = require(`${appPath}/lib/database`);
+
+const template = fs.readFileSync(__dirname + '/index.html').toString();
+const lang = require('./locale.js');
+
const UserException = require(`${appPath}/lib/exceptions/userException`);
-module.exports = {
+const rptSepaCore = {
name: 'rpt-sepa-core',
- async asyncData(ctx, params) {
+ serverPrefetch() {
+ this.clientName = 'Name123';
+ },
+
+ /* async asyncData(ctx, params) {
if (!params.clientFk)
throw new UserException('No client id specified');
@@ -18,8 +27,9 @@ module.exports = {
return client;
});
- },
+ }, */
created() {
+ this.clientId = 101;
if (this.locale)
this.$i18n.locale = this.locale;
},
@@ -46,13 +56,13 @@ module.exports = {
FROM client c
JOIN account.user u ON u.id = c.id
JOIN country ct ON ct.id = c.countryFk
- JOIN mandate m ON m.clientFk = c.id
+ LEFT JOIN mandate m ON m.clientFk = c.id
AND m.companyFk = ? AND m.finished IS NULL
- JOIN supplier s ON s.id = m.companyFk
- JOIN country sc ON sc.id = s.countryFk
- JOIN province sp ON sp.id = s.provinceFk
+ LEFT JOIN supplier s ON s.id = m.companyFk
+ LEFT JOIN country sc ON sc.id = s.countryFk
+ LEFT JOIN province sp ON sp.id = s.provinceFk
LEFT JOIN province p ON p.id = c.provinceFk
- WHERE m.companyFk = ? AND c.id = ?
+ WHERE (m.companyFk = ? OR m.companyFk IS NULL) AND c.id = ?
ORDER BY m.created DESC LIMIT 1`, [companyFk, companyFk, clientFk]);
},
dated: () => {
@@ -66,4 +76,10 @@ module.exports = {
'report-header': require('../report-header'),
'report-footer': require('../report-footer'),
},
+ template: template,
+ i18n: lang,
+ props: ['test']
};
+
+
+module.exports = rptSepaCore;