From 229291f9bcc6e8b78b6128a4eaf3e3d5c60a125b Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 8 Dec 2023 12:32:18 -0500 Subject: [PATCH] pull channel from customer object --- sql/get_guidance_dseg.pg.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/get_guidance_dseg.pg.sql b/sql/get_guidance_dseg.pg.sql index 55f59f8..d48d8f7 100644 --- a/sql/get_guidance_dseg.pg.sql +++ b/sql/get_guidance_dseg.pg.sql @@ -234,7 +234,7 @@ BEGIN --RAISE NOTICE 'add list: %', jsonb_pretty(_pricing); ----------------get premium for quote hist gap-------------- - SELECT coalesce(rlarp.get_premium(_stlc, _seas, (SELECT xchan FROM _chx WHERE chan = _chan),_hist->'hist'->'cust'->>'ds', _v1ds),'{}'::jsonb) INTO _prem; + SELECT coalesce(rlarp.get_premium(_stlc, _seas, _customer->'customer'->>'chantp',_hist->'hist'->'cust'->>'ds', _v1ds),'{}'::jsonb) INTO _prem; _pricing := jsonb_build_object('pricing',_pricing||_prem); --RAISE NOTICE 'add bridge: %', jsonb_pretty(_pricing);