Merge pull request 'feat: refs #6714 Added businessType zone_getAddresses' (!2263) from 6714-zone_getAddresses into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2263
Reviewed-by: Robert Ferrús <robert@verdnatura.es>
This commit is contained in:
Guillermo Bonet 2024-04-08 08:42:15 +00:00
commit d442ed64c4
1 changed files with 3 additions and 2 deletions

View File

@ -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;