This commit is contained in:
parent
2ff346ec25
commit
8678d2b1e0
|
@ -45,4 +45,4 @@
|
|||
</attachment>
|
||||
</div>
|
||||
</div>
|
||||
</email-body>
|
||||
</email-body>
|
||||
|
|
|
@ -7,11 +7,10 @@ module.exports = {
|
|||
name: 'letter-debtor-st',
|
||||
async serverPrefetch() {
|
||||
this.debtor = await db.findOne(`
|
||||
SELECT sa.iban, be.name bankName
|
||||
FROM supplierAccount sa
|
||||
LEFT JOIN bankEntity be ON sa.bankEntityFk = be.id
|
||||
LEFT JOIN client c ON c.countryFk = sa.countryFk
|
||||
WHERE c.id = ? OR (c.id IS NULL AND c.countryFk = sa.countryFk)`,
|
||||
SELECT sa.iban FROM client c
|
||||
LEFT JOIN supplierAccount sa ON c.countryFk = sa.countryFk
|
||||
WHERE c.id = ?
|
||||
OR (c.id IS NULL AND c.countryFk = sa.countryFk)`,
|
||||
[this.id]);
|
||||
},
|
||||
data() {
|
||||
|
|
Loading…
Reference in New Issue