queryExpression="(t.bp_id_tenant = ${@bp_id} or t.bp_id_agent_level1 = ${@bp_id} or ((select bp_category from hls_bp_master where bp_id = ${@bp_id}) = 'VENDER'))"/>-->
<bm:query-fieldname="bp_id"
queryExpression="(t.bp_id_tenant = ${@bp_id} or t.bp_id_agent_level1 = ${@bp_id} or ((select bp_category from hls_bp_master where bp_id = ${@bp_id}) = 'VENDER'))"/>
queryExpression="( (t.bp_id_tenant In
decode((Select h.bp_category
From hls_bp_master h
Where h.bp_id = ${@bp_id}),
'TENANT',
decode(decode((Select h.bp_class
From hls_bp_master h
Where h.bp_id = ${@bp_id}),
'NP',
(Select Count(1)
From hls_bp_master hb
Where Trim(hb.bp_name) =
(Select Trim(hbm.bp_name)
From hls_bp_master hbm
Where hbm.bp_id = ${@bp_id})
Group By Trim(hb.bp_name), Trim(hb.id_card_no)),
'ORG',
(Select Count(1)
From hls_bp_master hb
Where Trim(hb.bp_name) =
(Select Trim(hbm.bp_name)
From hls_bp_master hbm
Where hbm.bp_id = ${@bp_id})
Group By Trim(hb.bp_name),
Trim(nvl(hb.social_code, 'N')))),
1,
${@bp_id},
(Select hbm.bp_id
From hls_bp_master hbm
Where hbm.bp_name =
(Select hbm.bp_name
From hls_bp_master hbm
Where hbm.bp_id = ${@bp_id})))))
Or (t.bp_id_agent_level1 In
decode((Select h.bp_category
From hls_bp_master h
Where h.bp_id = ${@bp_id}),
'AGENT',
decode(decode((Select h.bp_class
From hls_bp_master h
Where h.bp_id = ${@bp_id}),
'NP',
(Select Count(1)
From hls_bp_master hb
Where Trim(hb.bp_name) =
(Select Trim(hbm.bp_name)
From hls_bp_master hbm
Where hbm.bp_id = ${@bp_id})
Group By Trim(hb.bp_name), Trim(hb.id_card_no)),
'ORG',
(Select Count(1)
From hls_bp_master hb
Where Trim(hb.bp_name) =
(Select Trim(hbm.bp_name)
From hls_bp_master hbm
Where hbm.bp_id = ${@bp_id})
Group By Trim(hb.bp_name),
Trim(nvl(hb.social_code, 'N')))),
1,
${@bp_id},
(Select hbm.bp_id
From hls_bp_master hbm
Where hbm.bp_name =
(Select hbm.bp_name
From hls_bp_master hbm
Where hbm.bp_id = ${@bp_id})))))
Or ((Select bp_category From hls_bp_master Where bp_id = ${@bp_id}) =
'VENDER') )"/>
<bm:query-fieldname="bp_name"queryExpression="t.bp_name like '%' || ${@bp_name} || '%'"/>
<bm:query-fieldname="bp_id_agent_level1"queryExpression="((t1.bp_id_agent_level1=${@bp_id_agent_level1}) or exists (select 1 from con_contract_lease_item ccli,hls_lease_item hli where ccli.lease_item_id=hli.lease_item_id and hli.vender_id=${@bp_id_agent_level1} and t1.contract_id=ccli.contract_id))"/>
<bm:query-fieldname="contract_name"queryExpression="t1.contract_name like '%'||${@contract_name}||'%'"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filterenforceOperations="query"expression="t1.contract_status not in ('TERMINATE', 'CANCEL', 'REPUR', 'ET', 'INCEPT_RETURN')"/>