<bm:data-filterenforceOperations="query"expression="exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 WHERE a1.trx_category = 'CONTRACT' and a1.trx_id = t.contract_id AND trunc(sysdate) between a1.start_date AND nvl(a1.end_date, trunc(sysdate)) and a1.user_id = a2.owner_user_id AND a1.trx_category = a2.trx_category AND a2.authorized_user_id = ${/session/@user_id} AND trunc(sysdate) between a2.start_date and nvl(a2.end_date, trunc(sysdate)))"/>
<bm:data-filterenforceOperations="query"expression="exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 WHERE a1.trx_category = 'CONTRACT' and a1.trx_id = t.contract_id AND trunc(sysdate) between a1.start_date AND nvl(a1.end_date, trunc(sysdate)) and a1.user_id = a2.owner_user_id AND a1.trx_category = a2.trx_category AND a2.authorized_user_id = ${/session/@user_id} AND trunc(sysdate) between a2.start_date and nvl(a2.end_date, trunc(sysdate)))"/>
and exists (select 1 from hls_bp_master hb where hb.bp_code = t.bp_code_tenant
and exists (select 1 from con_contract c, hls_bp_master hb where c.contract_id = t.contract_id
and hb.bp_code in ('C00010186',
and hb.bp_id = c.bp_id_agent_level1
'C00010185',
and hb.bp_code in ('D00000028','D00000035','D00000016','D00000021','D00000039','D00000025','D00000034','D00000017','D00000018','D00000024','D00000032','D00000009','D00000012','D00000014','D00000015','D00000023')) )
'C00010181',
or (decode(${/session/@user_id}, 10600, 1, 2) = 2) )"/>
'C00010174',
'C00010184',
'C00010182',
'C00010168',
'C00010191',
'C00010170',
'C00010188',
'C00010169',
'C00010197',
'C00010193',
'C00010189',
'C00010194',
'C00010171'))
or decode(${/session/@user_id}, 10620, 1, 2) = 2)"/>
FROM aut_trx_user_authorize a1, aut_owner_user_authorize a2
FROM aut_trx_user_authorize a1, aut_owner_user_authorize a2
...
@@ -176,25 +190,10 @@
...
@@ -176,25 +190,10 @@
AND a2.authorized_user_id = ${/session/@user_id}
AND a2.authorized_user_id = ${/session/@user_id}
AND trunc(SYSDATE) BETWEEN a2.start_date AND
AND trunc(SYSDATE) BETWEEN a2.start_date AND
nvl(a2.end_date, trunc(SYSDATE))))
nvl(a2.end_date, trunc(SYSDATE))))
And ( (decode(${/session/@user_id}, 10620, 1, 2) = 1
And ( (decode(${/session/@user_id}, 10600, 1, 2) = 1
And exists (select 1 from hls_bp_master hb where hb.bp_id = cc.bp_id_agent_level1
And exists (select 1 from hls_bp_master hb where hb.bp_id = cc.bp_id_agent_level1
And hb.bp_code in ('C00010186',
And hb.bp_code in ('D00000028','D00000035','D00000016','D00000021','D00000039','D00000025','D00000034','D00000017','D00000018','D00000024','D00000032','D00000009','D00000012','D00000014','D00000015','D00000023')) )
'C00010185',
or (decode(${/session/@user_id}, 10600, 1, 2) = 2) ) ) t1
'C00010181',
'C00010174',
'C00010184',
'C00010182',
'C00010168',
'C00010191',
'C00010170',
'C00010188',
'C00010169',
'C00010197',
'C00010193',
'C00010189',
'C00010194',
'C00010171')) )
or decode(${/session/@user_id}, 10620, 1, 2) = 2) ) t1
and exists (select 1 from hls_bp_master hb where hb.bp_id = t1.bp_id
and exists (select 1 from hls_bp_master hb where hb.bp_id = t1.bp_id
and hb.bp_code in ('C00010186',
and hb.bp_code in ('D00000028','D00000035','D00000016','D00000021','D00000039','D00000025','D00000034','D00000017','D00000018','D00000024','D00000032','D00000009','D00000012','D00000014','D00000015','D00000023')) )
'C00010185',
or (decode(${/session/@user_id}, 10600, 1, 2) = 2) )"/>
'C00010181',
'C00010174',
'C00010184',
'C00010182',
'C00010168',
'C00010191',
'C00010170',
'C00010188',
'C00010169',
'C00010197',
'C00010193',
'C00010189',
'C00010194',
'C00010171')) )
or decode(${/session/@user_id}, 10620, 1, 2) = 2)"/>
</bm:data-filters>
</bm:data-filters>
<bm:query-fields>
<bm:query-fields>
<bm:query-fieldname="query_amount_flag"queryExpression="((${@query_amount_flag}='1' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0) )or(${@query_amount_flag}='2' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) =0) )or (${@query_amount_flag}='3' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >=0)))"/>
<bm:query-fieldname="query_amount_flag"queryExpression="((${@query_amount_flag}='1' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0) )or(${@query_amount_flag}='2' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) =0) )or (${@query_amount_flag}='3' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >=0)))"/>