From f890ef4ba523b38c9717e6a382dc38f95e0bcd3c Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 7 Oct 2025 23:36:02 -0400 Subject: [PATCH] move final guidance to bottom --- procs/single_price_call.ms.sql | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/procs/single_price_call.ms.sql b/procs/single_price_call.ms.sql index 9628a97..7d82d35 100644 --- a/procs/single_price_call.ms.sql +++ b/procs/single_price_call.ms.sql @@ -519,22 +519,6 @@ BEGIN FOR JSON PATH ) AS details - UNION ALL - - -- Guidance Panel - SELECT - 'Guidance' AS label, - 1 AS detailLevel, - ( - SELECT - 'Price' AS label, - 1 AS detailLevel, - COALESCE(q.guidance_price,0) AS value, - 'currency' AS type, - q.guidance_reason AS note - FOR JSON PATH - ) - UNION ALL -- History Panel SELECT @@ -638,6 +622,23 @@ BEGIN '' AS note FOR JSON PATH ) AS details + + UNION ALL + + -- Guidance Panel + SELECT + 'Guidance' AS label, + 1 AS detailLevel, + ( + SELECT + 'Price' AS label, + 1 AS detailLevel, + COALESCE(q.guidance_price,0) AS value, + 'currency' AS type, + q.guidance_reason AS note + FOR JSON PATH + ) + ) AS panel FOR JSON PATH ) AS details,