diff --git a/procs/single_price_call.ms.sql b/procs/single_price_call.ms.sql index ff28118..df39171 100644 --- a/procs/single_price_call.ms.sql +++ b/procs/single_price_call.ms.sql @@ -534,19 +534,6 @@ BEGIN q.guidance_reason AS note FOR JSON PATH ) - -- Cost - SELECT - 'Cost' AS label, - 5 AS detailLevel, - ( - SELECT - 'Current Std' AS label, - 5 AS detailLevel, - COALESCE(q.curstd,0) AS value, - 'currency' AS type, - '' AS note - FOR JSON PATH - ) AS details UNION ALL -- History Panel @@ -620,6 +607,22 @@ BEGIN COALESCE('List Min Qty: ' + format(q.list_from,'#,###'),'') + CASE WHEN q.list_relevance = '' THEN '' ELSE ' (' + q.list_relevance + ')' END AS note FOR JSON PATH ) AS details + + UNION ALL + + -- Cost + SELECT + 'Cost' AS label, + 5 AS detailLevel, + ( + SELECT + 'Current Std' AS label, + 5 AS detailLevel, + COALESCE(q.curstd,0) AS value, + 'currency' AS type, + '' AS note + FOR JSON PATH + ) AS details ) AS panel FOR JSON PATH ) AS details,