combine panels
This commit is contained in:
parent
3f56f04f8b
commit
a649924c86
@ -499,6 +499,7 @@ BEGIN
|
||||
SELECT
|
||||
'Target Calculation' AS label,
|
||||
(
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
----------------------label------------------------------------------------
|
||||
CASE WHEN value <> '' THEN RTRIM(SUBSTRING(value,1,18)) ELSE 'No Target' END AS label,
|
||||
@ -518,16 +519,7 @@ BEGIN
|
||||
FROM @queue q
|
||||
OUTER APPLY OPENJSON(q.expl, '$.target_math')
|
||||
WITH (value NVARCHAR(MAX) '$')
|
||||
FOR JSON PATH
|
||||
) AS details
|
||||
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- Target Price
|
||||
SELECT
|
||||
'Target Total' AS label,
|
||||
(
|
||||
SELECT
|
||||
----------------------label------------------------------------------------
|
||||
'Price' AS label,
|
||||
@ -536,8 +528,9 @@ BEGIN
|
||||
----------------------type-------------------------------------------------
|
||||
'currency' AS type,
|
||||
----------------------note-------------------------------------------------
|
||||
'' AS note
|
||||
'Total' AS note
|
||||
FROM @queue q
|
||||
) x
|
||||
FOR JSON PATH
|
||||
) AS details
|
||||
|
||||
|
@ -485,6 +485,7 @@ BEGIN
|
||||
jsonb_build_object(
|
||||
'label', 'Target Calculation',
|
||||
'details',
|
||||
-- jsonb_build_array(
|
||||
(
|
||||
SELECT
|
||||
jsonb_agg(
|
||||
@ -516,11 +517,8 @@ BEGIN
|
||||
)
|
||||
FROM jsonb_array_elements_text(COALESCE(_tmath,'{}'::jsonb)) ae
|
||||
)
|
||||
),
|
||||
jsonb_build_object(
|
||||
'label', 'Target Total',
|
||||
'details',
|
||||
jsonb_build_object('label','Price','value',_tprice,'type','currency','note','')
|
||||
||jsonb_build_object('label','Price','value',_tprice,'type','currency','note','Total')
|
||||
-- )
|
||||
),
|
||||
------------------------------------------
|
||||
-- history
|
||||
|
Loading…
Reference in New Issue
Block a user