From 74383b61e738405ada1fd7f6348f9d230ab213fb Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 13 Oct 2022 09:22:53 +0200 Subject: [PATCH] hotFix(monitor): use left join in ticketState --- modules/item/front/diary/index.spec.js | 3 ++- modules/monitor/back/methods/sales-monitor/salesFilter.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/item/front/diary/index.spec.js b/modules/item/front/diary/index.spec.js index 78dae0883..a80fbfc69 100644 --- a/modules/item/front/diary/index.spec.js +++ b/modules/item/front/diary/index.spec.js @@ -19,7 +19,8 @@ describe('Item', () => { describe('set item()', () => { it('should set warehouseFk property based on itemType warehouseFk', () => { jest.spyOn(controller.$, '$applyAsync'); - controller.item = {id: 1, itemType: {warehouseFk: 1}}; + controller.vnConfig = {warehouseFk: 1}; + controller.item = {id: 1}; expect(controller.$.$applyAsync).toHaveBeenCalledWith(jasmine.any(Function)); $scope.$apply(); diff --git a/modules/monitor/back/methods/sales-monitor/salesFilter.js b/modules/monitor/back/methods/sales-monitor/salesFilter.js index ff642b088..7be130dda 100644 --- a/modules/monitor/back/methods/sales-monitor/salesFilter.js +++ b/modules/monitor/back/methods/sales-monitor/salesFilter.js @@ -211,7 +211,7 @@ module.exports = Self => { LEFT JOIN province p ON p.id = a.provinceFk LEFT JOIN warehouse w ON w.id = t.warehouseFk LEFT JOIN agencyMode am ON am.id = t.agencyModeFk - STRAIGHT_JOIN ticketState ts ON ts.ticketFk = t.id + LEFT JOIN ticketState ts ON ts.ticketFk = t.id LEFT JOIN state st ON st.id = ts.stateFk LEFT JOIN client c ON c.id = t.clientFk LEFT JOIN worker wk ON wk.id = c.salesPersonFk