<bm:data-filtername="query"expression="(t1.company_id=${/session/@company_id} AND t1.reversed_flag = 'N' and t1.returned_flag != 'FULL')"/>
<!-- <bm:data-filter name="query" expression="(not exists(select 1 from csh_transaction t where t.transaction_type = 'RECEIPT' and t.paid_byother_flag = 'T' and t.write_off_flag = 'FULL' and t.transaction_id = t1.transaction_id))"/>-->
<!-- <bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and t1.reversed_flag = 'N' and nvl(t1.deposit_flag,'N')='N' "/>-->
<bm:data-filtername="query"expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(${@cw_flag},'Y',NULL,DECODE(t1.source_type,NULL,NULL,'DEPOSIT'))) and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED')) "/>
<bm:data-filtername="query"expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(${@cw_flag},'Y',NULL,DECODE(t1.source_type,NULL,'DEPOSIT','DEPOSIT'))) and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED')) "/>
<!-- <bm:data-filter name="position_code" expression="(((${@position_code} = '009' and t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'N') or ((${@position_code} = '014' and t1.bp_category != 'TENANT') or (${@position_code} = '014' and t1.paid_byother_flag != 'N')) and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1))" />-->
<bm:data-filtername="position_code"expression="(((${@cw_flag} = 'Y') or (${@position_code} = '009' and t1.created_by != ${/session/@user_id} and (t1.paid_byother_flag = 'F' and t1.bp_category = 'TENANT' and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1)) or (${@position_code} = '014' and t1.created_by != ${/session/@user_id} and ((((t1.paid_byother_flag != 'F' or t1.bp_category != 'TENANT')) or t1.transaction_type = 'DEPOSIT') and t1.confirmed_flag != 'ACCAUDITED' and t1.created_by != ${/session/@user_id}) or (${/session/@user_id} = 1))))"/>
<bm:fieldname="bp_code"expression="(select d.bp_code from hls_bp_master d where d.bp_id=t1.bp_id)"forInsert="false"forUpdate="false"prompt="HLS.BP_CODE"/>
<bm:fieldname="bp_name"forDisplay="true"forQuery="true"expression="(select d.bp_name from hls_bp_master d where d.bp_id=t1.bp_id)"forInsert="false"forUpdate="false"prompt="HLS.BP_NAME"/>
<bm:fieldname="bp_id_agent_level1_n"expression="(select u.bp_name FROM hls_bp_master u,hls_bp_master hbm WHERE u.unit_id = hbm.unit_id and u.bp_category='AGENT' and hbm.bp_id=t1.bp_id)"forInsert="false"forUpdate="false"prompt="代理店"/>
<bm:fieldname="payment_method_display"expression="(select cp.description from csh_payment_method cp where cp.payment_method_id=t1.payment_method_id)"forInsert="false"forUpdate="false"prompt="HLS.PAYMENT_METHOD"/>
<bm:fieldname="currency_name"expression="(select gc.currency_name from gld_currency_vl gc where gc.currency_code=t1.currency_code)"forInsert="false"forUpdate="false"prompt="HLS.CURRENCY"/>
<bm:fieldname="bp_category_display"expression="(select b.description from hls_bp_category b where b.bp_category=t1.bp_category)"forInsert="false"forUpdate="false"prompt="CSH511.CSH_TRANSACTION.BP_CATEGORY"/>
<bm:fieldname="exchange_rate_type_display"expression="(select tv.type_name from gld_exchangerate_types_vl tv where tv.type_code=t1.exchange_rate_type)"forInsert="false"forUpdate="false"prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
<bm:fieldname="bank_account_code"expression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id)"forInsert="false"forUpdate="false"prompt="CSH511.BANK_ACCOUNT_CODE"/>
<bm:fieldname="bank_account_name"expression="(select a.bank_account_name from csh_bank_account a where a.bank_account_id=t1.bank_account_id)"forInsert="false"forUpdate="false"prompt="CSH511.BANK_ACCOUNT_NAME"/>
<bm:fieldname="bank_account_num"expression="(select a.bank_account_num from csh_bank_account a where a.bank_account_id=t1.bank_account_id)"forInsert="false"forUpdate="false"prompt="CSH511.BANK_ACCOUNT_NUM"/>
<bm:fieldname="bp_bank_account_code"expression="(select a.bank_account_code from hls_bp_master_bank_account a where a.bank_account_id = t1.bp_bank_account_id)"forInsert="false"forUpdate="false"prompt="CSH511.BP_BANK_ACCOUNT_CODE"/>
<bm:fieldname="bp_bank_account_name"expression="(select a.bank_account_name from hls_bp_master_bank_account a where a.bank_account_id = t1.bp_bank_account_id)"forInsert="false"forUpdate="false"prompt="CSH511.BANK_ACCOUNT_NAME"/>
<bm:fieldname="functional_currency_code"expression="(select gb.functional_currency_code from fnd_companies fc, gld_set_of_books gb where fc.company_id = ${/session/@company_id} and fc.set_of_books_id = gb.set_of_books_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="rate_method_code"expression="(select t.rate_method_code from gld_exchangerate_types t where t.type_code=t1.exchange_rate_type)"forInsert="false"forUpdate="false"/>
<bm:fieldname="zero_amounts_allowed"expression="(select d.zero_amounts_allowed from csh_bank_account_v d where d.bank_account_id=t1.bank_account_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="precision"expression="(select g.precision from gld_currency g where g.currency_code =t1.currency_code)"forInsert="false"forUpdate="false"/>
<bm:query-fieldname="bp_name"queryExpression="t1.bp_id in (select d.bp_id from hls_bp_master d where d.bp_name like '%'||${@bp_name}||'%')"/>
AND sc.code_value = v.trans_review_status) trans_review_status_n,
cc.contract_number,
'' transaction_num,
cc.contract_name,
cc.bp_id_agent_level1,
(SELECT t.bp_name
...
...
@@ -67,7 +69,52 @@
and ct.batch_id is not null
) v
where cc.contract_id = v.source_contract_id
and cc.data_class = 'NORMAL') t1
and cc.data_class = 'NORMAL'
union all
select null source_contract_id,
v.source_transaction_id,
v.batch_id,
v.trans_review_status,
to_char(v.je_date,'yyyy-MM-dd') je_date,
v.source_trans_type,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'DEPOSIT_TRANS_TYPE'
AND sc.code_value = v.source_trans_type) deposit_trans_type_n,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'TRANS_REVIEW_STATUS'
AND sc.code_value = v.trans_review_status) trans_review_status_n,
'' contract_number,
cc.transaction_num,
'' contract_name,
(select u.bp_id from hls_bp_master u,hls_bp_master hbm where u.unit_id= hbm.unit_id and u.bp_category='AGENT' and hbm.bp_id=cc.bp_id) bp_id_agent_level1,
(select u.bp_name from hls_bp_master u,hls_bp_master hbm where u.unit_id= hbm.unit_id and u.bp_category='AGENT' and hbm.bp_id=cc.bp_id) bp_id_agent_level1,
<bm:data-filterenforceOperations="query"expression="(t1.source_contract_id is null or(t1.source_contract_id is not null and t1.source_contract_id=${@source_contract_id})) "/>
<bm:data-filtername="query"expression="(t1.ref_contract_id is not null)"/>
<bm:data-filtername="query"expression="(t1.ref_contract_id is not null or (t1.ref_contract_id is null and nvl(t1.reversed_flag, 'N') = 'N' and t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED')))"/>
<bm:fieldname="bp_name_n"expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)"forInsert="false"forUpdate="false"/>
<bm:fieldname="deposit_trans_type_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)"forInsert="false"forUpdate="false"/>
<bm:data-filtername="query"expression="(t1.ref_contract_id is not null)"/>
<bm:data-filtername="query"expression="(t1.ref_contract_id is not null or (t1.ref_contract_id is null and nvl(t1.reversed_flag, 'N') = 'N' and t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED')))"/>
<bm:fieldname="bp_name_n"expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_tenant)"forInsert="false"forUpdate="false"/>
<bm:fieldname="bp_id_telnet_n"expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)"forInsert="false"forUpdate="false"/>
<bm:fieldname="deposit_trans_type_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)"forInsert="false"forUpdate="false"/>
<bm:fieldname="approval_status"expression="decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'))"/>
<bm:fieldname="approval_status_desc"expression="(Select v.code_value_name From sys_code_values_v v Where v.code = 'WFL_STATUS' And v.code_value = decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW')))"/>