From 0b96471c7de81e81b932a63ac8d141e38c350f33 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 8 Apr 2024 09:27:07 +0200 Subject: [PATCH] feat: refs #6714 Added businessType zone_getAddresses --- db/routines/vn/procedures/zone_getAddresses.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/zone_getAddresses.sql b/db/routines/vn/procedures/zone_getAddresses.sql index 1412c7ab3..ce7b0204e 100644 --- a/db/routines/vn/procedures/zone_getAddresses.sql +++ b/db/routines/vn/procedures/zone_getAddresses.sql @@ -28,7 +28,7 @@ BEGIN SELECT c.id clientFk, c.name, c.phone, - c.mobile, + bt.description, c.salesPersonFk, u.name username, aai.invoiced, @@ -44,10 +44,11 @@ BEGIN LEFT JOIN bs.clientNewBorn cnb ON cnb.clientFk = c.id LEFT JOIN vn.annualAverageInvoiced aai ON aai.clientFk = c.id JOIN vn.clientType ct ON ct.code = c.typeFk + JOIN vn.businessType bt ON bt.code = c.businessTypeFk WHERE a.isActive AND c.isActive AND ct.code = 'normal' - AND c.businessTypeFk <> 'worker' + AND bt.code <> 'worker' GROUP BY c.id; DROP TEMPORARY TABLE tmp.zoneNodes;