refs #5537 change cl c
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Satorres 2023-06-20 10:22:30 +02:00
parent 5a6a18c76a
commit a7d9bbc582
1 changed files with 2 additions and 3 deletions

View File

@ -5,10 +5,9 @@ module.exports = {
name: 'report-footer',
async serverPrefetch() {
this.company = await db.findOne(`
SELECT IFNULL(ci.footnotes, cl.footnotes) as footnotes
SELECT IFNULL(ci.footnotes, c.footnotes) footnotes
FROM company c
LEFT JOIN companyL10n cl ON c.id = cl.id
LEFT JOIN companyI18n ci ON ci.companyFk = cl.id
LEFT JOIN companyI18n ci ON ci.companyFk = c.id
AND ci.lang = (SELECT lang FROM account.user where id = ?)
WHERE c.code = ?`,
[this.recipientId, this.companyCode]);