feat(ibl-registration): tambah order_total di get_tests_by_order, '-' jika M_MouIsBill = 'Y'

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
sas.fajri
2026-05-19 14:18:48 +07:00
parent 5783a4d2ac
commit 04fc1a2b72

View File

@@ -4363,7 +4363,8 @@ GROUP BY T_SampleStationID ";
T_OrderDetailID,
T_TestName as test_name,
T_TestCode as test_code,
CASE WHEN M_MouIsBill = 'Y' THEN '-' ELSE CAST(T_OrderDetailPrice AS CHAR) END as price
CASE WHEN M_MouIsBill = 'Y' THEN '-' ELSE CAST(T_OrderDetailPrice AS CHAR) END as price,
CASE WHEN M_MouIsBill = 'Y' THEN '-' ELSE CAST(T_OrderHeaderTotal AS CHAR) END as order_total
FROM t_orderdetail
JOIN t_test ON T_OrderDetailT_TestID = T_TestID AND T_TestIsPrice = 'Y'
JOIN t_orderheader ON T_OrderDetailT_OrderHeaderID = T_OrderHeaderID