<bm:fieldname="transaction_type_desc"forInsert="false"forUpdate="false"prompt="HLS.TRANSACTION_TYPE"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CSH511_TRANSACTION_TYPE' and v.code_value =t1.transaction_type)"/>
<bm:fieldname="write_off_flag_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CON_WRITE_OFF_FLAG' and v.code_value =t1.write_off_flag)"forUpdate="false"forInsert="false"/>
<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"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="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="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:fieldname="unallocate_amount"expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)-nvl((select sum(i.write_off_amount) from csh_write_off_interface i where i.trx_interface_id = t1.transaction_id and i.record_type is not null),0))"forInsert="false"forUpdate="false"/>
<bm:fieldname="status_desc"expression="(select code_value_name from sys_code_values_v where code = 'CSH_WRITE_OFF_STATUS' and code_value = nvl(t1.status,'NEW'))"/>
<bm:fieldname="ref_contract_id"/>
<bm:fieldname="csh_bp_name"/>
<bm:fieldname="receipt_type_desc"expression="(select code_value_name from sys_code_values_v where code = 'RECEIPT_TYPE' and code_value = t1.receipt_type)"/>
<bm:fieldname="contract_number"expression="(select cc.contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<!--add by chenlingfeng-->
<bm:fieldname="bank_name"expression="(select a.bank_short_name from csh_bank_account_v a where a.bank_account_id=t1.bank_account_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="review_status_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DS_CSH_REVIEW_STATUS' and v.code_value =t1.review_status)"forInsert="false"forUpdate="false"/>/>
<bm:fieldname="bank_branch_name"expression="(select a.bank_branch_name from csh_bank_account_v a where a.bank_account_id=t1.bank_account_id)"forInsert="false"forUpdate="false"prompt="CSH511.BANK_BRANCH_NAME"/>
<bm:fieldname="collection_classes"/>
<bm:fieldname="collection_classes_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DS_COLLECTION_CLASSES' and v.code_value =t1.collection_classes)"forceUpdate="false"forInsert="false"/>
<!--end-->
<!--add by lisitong-->
<bm:fieldname="approving_return_amount"datatype="java.lang.Double"expression="(select nvl(sum(ctr.this_return_amount),0) from csh_transaction_return ctr where ctr.transaction_id = t1.transaction_id and ctr.status = 'APPROVING')"forInsert="false"forUpdate="false"prompt="审批中退款金额"/>
<bm:fieldname="confirm_user_name"expression="(select description from sys_user where user_id = t1.confirmed_by)"forceUpdate="false"forInsert="false"/>
<bm:fieldname="confirmed_flag"/>
<bm:fieldname="import_source"/>
<bm:fieldname="import_source_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CSH510_IMPORT_SOURCE' and v.code_value =t1.import_source)"forInsert="false"forUpdate="false"/>
<bm:fieldname="recoi_status"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECOI_FLAG' and v.code_value =nvl(t1.recoi_status,'NEW'))"forInsert="false"forUpdate="false"/>
<bm:fieldname="recoi_status_n"expression="(select v.code_value from sys_code_values_v v where v.code = 'RECOI_FLAG' and v.code_value =t1.recoi_status)"forInsert="false"forUpdate="false"/>
<bm:fieldname="confirmed_flag_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CONFIRMED_FLAG' and v.code_value =t1.confirmed_flag)"forInsert="false"forUpdate="false"/>
<bm:query-fieldname="bank_account_code_from"queryExpression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id) >= ${@bank_account_code_from}"/>
<bm:query-fieldname="bank_account_code_to"queryExpression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id) <= ${@bank_account_code_to}"/>
<bm:query-fieldname="receipt"queryExpression="(t1.transaction_type=${@receipt} or t1.transaction_type=${@advance_receipt} or t1.transaction_type=${@deposit} or t1.transaction_type=${@risk})"/>
<!-- <bm:query-field name="bp_name" queryExpression="t1.bp_id in (select d.bp_id from hls_bp_master d where d.bp_name like '%'||${@bp_name_from}||'%')"/>-->
<bm:query-fieldname="contract_number"queryExpression="(SELECT cc.contract_number FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like '%'||upper(${@contract_number})||'%'"/>
<!--add by chenlingfeng-->
<bm:query-fieldname="full_write_off_flag"queryExpression="(t1.write_off_flag = ${@full_write_off_flag} or t1.write_off_flag = ${@partial_write_off_flag} or t1.write_off_flag = ${@not_write_off_flag})"/>
<bm:query-fieldname="full_review_status"queryExpression="(nvl(t1.review_status,'NOT') = ${@full_review_status} or nvl(t1.review_status,'NOT') = ${@partial_review_status} or nvl(t1.review_status,'NOT') = ${@not_review_status})"/>
<bm:query-fieldname="bank_slip_num"queryExpression="t1.bank_slip_num like ${@bank_slip_num}"/>
<bm:query-fieldname="transaction_num"queryExpression="t1.transaction_num like ${@transaction_num}"/>
<bm:query-fieldname="bp_bank_account_name"queryExpression="t1.bp_bank_account_name like ${@bp_bank_account_name}"/>
<bm:query-fieldname="bp_bank_account_num"queryExpression="t1.bp_bank_account_num like ${@bp_bank_account_num}"/>
<bm:query-fieldname="bank_name"queryExpression="(select a.bank_short_name from csh_bank_account_v a where a.bank_account_id=t1.bank_account_id) like ${@bank_name}"/>
<bm:query-fieldname="bank_branch_name"queryExpression="(select a.bank_branch_name from csh_bank_account_v a where a.bank_account_id=t1.bank_account_id) like ${@bank_branch_name}"/>
<!-- <bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} AND t1.reversed_flag = 'N' and t1.returned_flag != 'FULL')"/>-->
<!-- <bm:data-filter name="query" expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT','DEPOSIT',DECODE(${@cw_flag},'Y',NULL,DECODE(t1.source_type,NULL,NULL,'DEPOSIT'))) and t1.confirmed_flag in ('ACCAUDITED','APPROVED','WF_REJECTED')) "/>-->
<!-- <bm:data-filter name="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:data-filter name="write_off_flag_desc" expression="(t1.write_off_flag not in('FULL','PARTIAL'))"/>-->
<bm:data-filtername="query"expression="(t1.confirmed_flag in ('ACCAUDITED','APPROVED','WF_REJECTED'))"/>
<bm:data-filtername="query"expression="((t1.transaction_type = 'DEPOSIT' and t1.ref_contract_id is null) or (t1.collection_classes = 'REFUND' and t1.ref_contract_id is null and t1.source_csh_trx_id is null ) or (t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and nvl(t1.collection_classes,'NON') != 'REFUND'))"/>
<bm:fieldname="transaction_type_desc"forInsert="false"forUpdate="false"prompt="HLS.TRANSACTION_TYPE"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CSH511_TRANSACTION_TYPE' and v.code_value =t1.transaction_type)"/>
<bm:fieldname="write_off_flag_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CON_WRITE_OFF_FLAG' and v.code_value =t1.write_off_flag)"forUpdate="false"forInsert="false"/>
<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"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="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="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:fieldname="unallocate_amount"expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)-nvl((select sum(i.write_off_amount) from csh_write_off_interface i where i.trx_interface_id = t1.transaction_id and i.record_type is not null),0))"forInsert="false"forUpdate="false"/>
<bm:fieldname="status_desc"expression="(select code_value_name from sys_code_values_v where code = 'CSH_WRITE_OFF_STATUS' and code_value = nvl(t1.status,'NEW'))"/>
<bm:fieldname="ref_contract_id"/>
<bm:fieldname="csh_bp_name"/>
<bm:fieldname="receipt_type_desc"expression="(select code_value_name from sys_code_values_v where code = 'RECEIPT_TYPE' and code_value = t1.receipt_type)"/>
<bm:fieldname="contract_number"expression="(select cc.contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<!--add by chenlingfeng-->
<bm:fieldname="bank_name"expression="(select a.bank_short_name from csh_bank_account_v a where a.bank_account_id=t1.bank_account_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="review_status_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DS_CSH_REVIEW_STATUS' and v.code_value =t1.review_status)"forInsert="false"forUpdate="false"/>/>
<bm:fieldname="bank_branch_name"expression="(select a.bank_branch_name from csh_bank_account_v a where a.bank_account_id=t1.bank_account_id)"forInsert="false"forUpdate="false"prompt="CSH511.BANK_BRANCH_NAME"/>
<bm:fieldname="collection_classes"/>
<bm:fieldname="collection_classes_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DS_COLLECTION_CLASSES' and v.code_value =t1.collection_classes)"forceUpdate="false"forInsert="false"/>
<!--end-->
<!--add by lisitong-->
<bm:fieldname="approving_return_amount"datatype="java.lang.Double"expression="(select nvl(sum(ctr.this_return_amount),0) from csh_transaction_return ctr where ctr.transaction_id = t1.transaction_id and ctr.status = 'APPROVING')"forInsert="false"forUpdate="false"prompt="审批中退款金额"/>
<bm:fieldname="created_user_name"expression="(select description from sys_user where user_id = t1.created_by)"forceUpdate="false"forInsert="false"/>
<bm:fieldname="confirm_user_name"expression="(select description from sys_user where user_id = t1.confirmed_by)"forceUpdate="false"forInsert="false"/>
<bm:fieldname="confirmed_flag_desc"expression="(select code_value_name from sys_code_values_v where code = 'CONFIRMED_FLAG' and code_value = t1.confirmed_flag)"forceUpdate="false"forInsert="false"/>
<bm:fieldname="confirmed_flag"/>
<bm:fieldname="import_source"/>
<bm:fieldname="import_source_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CSH510_IMPORT_SOURCE' and v.code_value =t1.import_source)"forInsert="false"forUpdate="false"/>
<bm:fieldname="recoi_status"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECOI_FLAG' and v.code_value =t1.recoi_status)"forInsert="false"forUpdate="false"/>