From 150b3a276eb8f1b575ffd7b570c561e83d66f22f Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 18 Jul 2024 10:51:24 +0200 Subject: [PATCH] feat: refs #7356 new parameters in sql for Weekly tickets front --- .../ticket/back/methods/ticket-weekly/filter.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/ticket/back/methods/ticket-weekly/filter.js b/modules/ticket/back/methods/ticket-weekly/filter.js index 0bf92d542..a43b5e270 100644 --- a/modules/ticket/back/methods/ticket-weekly/filter.js +++ b/modules/ticket/back/methods/ticket-weekly/filter.js @@ -53,13 +53,22 @@ module.exports = Self => { const stmts = []; const stmt = new ParameterizedSQL( - `SELECT t.id AS ticketFk, c.id AS clientFk, c.name AS clientName, tw.weekDay, - wh.name AS warehouseName, u.id AS workerFk, u.name AS userName, u.nickName, tw.agencyModeFk + `SELECT t.id AS ticketFk, + c.id AS clientFk, + c.name AS clientName, + tw.weekDay, + wh.name AS warehouseName, + u.id AS workerFk, + u.name AS userName, + u.nickName, + tw.agencyModeFk, + am.name agencyModeName FROM ticketWeekly tw JOIN ticket t ON t.id = tw.ticketFk JOIN client c ON c.id = t.clientFk JOIN account.user u ON u.id = c.salesPersonFk - JOIN warehouse wh ON wh.id = t.warehouseFk` + JOIN warehouse wh ON wh.id = t.warehouseFk + LEFT JOIN agencyMode am ON am.id = tw.agencyModeFk` ); stmt.merge(conn.makeSuffix(filter));