From 85db8616e54bab58bd5115fc3b225e3d9be30add Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 18 Mar 2020 15:32:04 -0400 Subject: [PATCH] shipto incorrectly referencing billto --- route_sql/new_basket.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route_sql/new_basket.sql b/route_sql/new_basket.sql index 721f5f4..29671b0 100644 --- a/route_sql/new_basket.sql +++ b/route_sql/new_basket.sql @@ -288,7 +288,7 @@ SELECT ,log.doc->'scenario'->>'quota_rep_descr' quota_rep_descr ,(SELECT max(director) FROM repc WHERE rname = log.doc->'scenario'->>'quota_rep_descr') director ,COALESCE(CASE bc.BVADR6 WHEN '' THEN bc.BVNAME ELSE bc.BVADR6 END,b.bill_cust_descr) billto_group - ,COALESCE(CASE sc.BVADR6 WHEN '' THEN sc.BVNAME ELSE bc.BVADR6 END,b.ship_cust_descr) shipto_group + ,COALESCE(CASE sc.BVADR6 WHEN '' THEN sc.BVNAME ELSE sc.BVADR6 END,b.ship_cust_descr) shipto_group ,CASE SUBSTRING(bc.bvclas,2,3) --if the bill to class is ditsributor, then it's either warehouse or drop WHEN 'DIS' THEN