refs #084200 arreglo lang

This commit is contained in:
Carlos Satorres 2023-03-29 12:07:45 +02:00
parent 71220c58f7
commit 9be06c6f4b
1 changed files with 4 additions and 3 deletions

View File

@ -5,9 +5,10 @@ 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 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]);