From 91b309bde491d827962a2bd1418d4e3499f029ff Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 8 Nov 2023 09:00:12 -0500 Subject: [PATCH] vault backup: 2023-11-08 09:00:12 --- sql/get_guidance.pg.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/get_guidance.pg.sql b/sql/get_guidance.pg.sql index 4ae1b0c..3b90d31 100644 --- a/sql/get_guidance.pg.sql +++ b/sql/get_guidance.pg.sql @@ -35,7 +35,7 @@ BEGIN ----------------base product-------------------------------- SELECT - m.part_group, i.stlc, i.v1ds,i.v0ds,jsonb_build_object('assc',i.assc,'majg',i.majg::int,'coltier',i.coltier) idxk + m.part_group, i.stlc, i.v1ds,i.v0ds,jsonb_strip_nulls(jsonb_build_object('assc',CASE WHEN i.assc <> '' THEN i.assc ELSE null::text END,'majg',i.majg::int,'coltier',i.coltier)) idxk INTO _mold,_stlc,_v1ds , _v0ds, _iidx FROM @@ -103,6 +103,7 @@ BEGIN _rslt := _rslt||COALESCE(_v1tp,'{}'::jsonb); ----------------inflation index----------------------------- + RAISE NOTICE 'infaltion : %', jsonb_pretty(_iidx); SELECT jsonb_build_object( 'iidx' @@ -123,7 +124,6 @@ BEGIN ) GROUP BY priority; - --RAISE NOTICE 'target: %', jsonb_pretty(_targ); _rslt := _rslt||COALESCE(_iidx,'{}'::jsonb); ----------------list ppricing------------------------------- SELECT coalesce(rlarp.get_list(_bill, _ship, _item, _qty),'{}'::jsonb) INTO _list;