From dfdd8f28d41783e399123c60c6a1e9cbf8d268bd Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 23 Oct 2024 12:23:31 +0200 Subject: [PATCH] fix: refs #6389 filter --- modules/monitor/back/methods/sales-monitor/salesFilter.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/monitor/back/methods/sales-monitor/salesFilter.js b/modules/monitor/back/methods/sales-monitor/salesFilter.js index 0fa2e60e5..9bfb69b65 100644 --- a/modules/monitor/back/methods/sales-monitor/salesFilter.js +++ b/modules/monitor/back/methods/sales-monitor/salesFilter.js @@ -199,6 +199,8 @@ module.exports = Self => { z.name zoneName, z.id zoneFk, st.classColor, + d.id departmentFk, + d.name department, TIME_FORMAT(t.shipped, '%H:%i') preparationHour, TIME_FORMAT(z.hour, '%H:%i') theoreticalhour, TIME_FORMAT(zed.etc, '%H:%i') practicalHour @@ -214,6 +216,8 @@ module.exports = Self => { LEFT JOIN client c ON c.id = t.clientFk LEFT JOIN payMethod pm ON pm.id = c.payMethodFk LEFT JOIN worker wk ON wk.id = c.salesPersonFk + LEFT JOIN workerDepartment wd ON wd.workerFk = wk.id + LEFT JOIN department d ON d.id = wd.departmentFk LEFT JOIN account.user u ON u.id = wk.id LEFT JOIN ( SELECT zoneFk,