From b7309bb3f31024af8b7cd593b192549d59b31537 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 14 May 2024 09:06:24 -0400 Subject: [PATCH] use the pounds from pool in case of fake parts --- build/convert_pool_all.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/convert_pool_all.sql b/build/convert_pool_all.sql index 3913565..7b1c7e6 100644 --- a/build/convert_pool_all.sql +++ b/build/convert_pool_all.sql @@ -92,7 +92,7 @@ SELECT null::text, null::text, null::text, - null::numeric, + CASE WHEN COALESCE(units,0) <> 0 THEN ROUND(pounds/units,5) ELSE null::numeric END, --use pounds from pool by default to accomodate fake parts null::numeric, ------------fiscal info----------------------- null::text, @@ -154,7 +154,7 @@ SET ,clss = m.clss ,brand = m.brand ,assc = m.assc - ,lbs = CASE m.nwun WHEN 'KG' THEN 2.2046 ELSE 1 END*m.nwht + ,lbs = COALESCE(CASE m.nwun WHEN 'KG' THEN 2.2046 ELSE 1 END*m.nwht,lbs) --if there is not item master, use the pounds that were in there ,unti = m.unti FROM "CMS.CUSLG".itemm m