diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index d8bc9ea3d..be40d376e 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -5,11 +5,12 @@ module.exports = { async serverPrefetch() { const company = await db.findOne(` SELECT - (SELECT ci.footnotes FROM companyI18n ci WHERE ci.companyFk = c.id) AS footnotes, + ci.footnotes, c.code FROM company c - JOIN companyGroup cg ON cg.id = c.companyGroupFk - JOIN supplier s ON s.id = c.id + JOIN companyI18n ci ON ci.companyFk = c.id AND ci.lang = ? + JOIN companyGroup cg ON cg.id = c.companyGroupFk + JOIN supplier s ON s.id = c.id WHERE c.code = ?`, [this.companyCode]); this.company = company;