history should be in an array

This commit is contained in:
Paul Trowbridge 2025-08-11 11:00:40 -04:00
parent 310f1dc8f9
commit d37aded2c9
4 changed files with 6 additions and 4 deletions

View File

@ -6,6 +6,8 @@ EXEC pricing.single_price_call
@v1ds = 'v1:T..BDL..', @v1ds = 'v1:T..BDL..',
@vol = 50000; @vol = 50000;
SELECT * FROM pricing.lastpricedetail l WHERE customer = 'HYBELS' AND l.partgroup = 'HZP3E100'
EXEC pricing.single_price_call EXEC pricing.single_price_call
@bill = 'GRIF0001', @bill = 'GRIF0001',
@ship = 'GRIF0001', @ship = 'GRIF0001',

View File

@ -1,5 +1,5 @@
SELECT SELECT
* ui_json->'details'
FROM pricequote.single_price_call( FROM pricequote.single_price_call(
'FARM0001', 'FARM0001',
'KEYB0001', 'KEYB0001',
@ -8,3 +8,4 @@ FROM pricequote.single_price_call(
50000 50000
) f ) f
SELECT * FROM pricequote.lastpricedetail l WHERE customer = 'HYBELS' AND l.partgroup = 'HZP3E100'

View File

@ -455,7 +455,7 @@ BEGIN
' | Dataseg: ', ISNULL(q.last_dataseg, 'N/A'), ' | Dataseg: ', ISNULL(q.last_dataseg, 'N/A'),
' | Qty: ', ISNULL(CAST(q.last_qty AS varchar(32)), 'N/A') ' | Qty: ', ISNULL(CAST(q.last_qty AS varchar(32)), 'N/A')
) AS note ) AS note
FOR JSON PATH, WITHOUT_ARRAY_WRAPPER FOR JSON PATH
) AS details ) AS details
UNION ALL UNION ALL

View File

@ -105,7 +105,7 @@ lq AS MATERIALIZED (
-- ,jsonb_pretty(pricing) pricing -- ,jsonb_pretty(pricing) pricing
,p.guidance_price ,p.guidance_price
,p.guidance_reason ,p.guidance_reason
,jsonb_pretty(p.expl) expl ,jsonb_pretty(p.ui_json->'details') expl
FROM FROM
lq lq
LEFT OUTER JOIN "CMS.CUSLG".itemm i ON LEFT OUTER JOIN "CMS.CUSLG".itemm i ON
@ -131,7 +131,6 @@ lq AS MATERIALIZED (
lq.billto lq.billto
,lq.shipto ,lq.shipto
,lq.part ,lq.part
,substring(lq.part,1,8)
,lq.v1ds ,lq.v1ds
,lq.units_each ,lq.units_each
) p ON TRUE ) p ON TRUE