FHM09062601IBL - get_vaccines: tambah harga (bruto, discountpersen, discountrp, total)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
sas.fajri
2026-06-11 15:24:15 +07:00
parent 520c77484b
commit f1bbb2a932

View File

@@ -3195,10 +3195,18 @@ function get_data_order_anamnesis($orderID){
$mou_id = intval($order_row['orderM_MouID']);
$search_esc = $this->db_onedev->escape_str($search);
$sql = "SELECT DISTINCT
$sql = "SELECT
spm.T_TestID as id,
t.T_TestSasCode as code,
t.T_TestName as name
t.T_TestName as name,
JSON_UNQUOTE(JSON_EXTRACT(one_json_sum(spm.Ss_PriceMouID),'$.T_PriceAmount')) as bruto,
JSON_UNQUOTE(JSON_EXTRACT(one_json_sum(spm.Ss_PriceMouID),'$.T_PriceDisc')) as discountpersen,
JSON_UNQUOTE(JSON_EXTRACT(one_json_sum(spm.Ss_PriceMouID),'$.T_PriceDiscRp')) as discountrp,
( JSON_UNQUOTE(JSON_EXTRACT(one_json_sum(spm.Ss_PriceMouID),'$.T_PriceAmount'))
- ((JSON_UNQUOTE(JSON_EXTRACT(one_json_sum(spm.Ss_PriceMouID),'$.T_PriceDisc')) / 100)
* JSON_UNQUOTE(JSON_EXTRACT(one_json_sum(spm.Ss_PriceMouID),'$.T_PriceAmount')))
- JSON_UNQUOTE(JSON_EXTRACT(one_json_sum(spm.Ss_PriceMouID),'$.T_PriceDiscRp'))
) as total
FROM one_lab.ss_price_mou spm
JOIN one_lab.t_test t ON spm.T_TestID = t.T_TestID AND t.T_TestIsActive = 'Y'
WHERE spm.Ss_PriceMouM_MouID = {$mou_id}