<!-- <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-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.returned_flag != 'FULL' 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,NULL,'DEPOSIT'))) and t1.returned_flag != 'FULL' 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-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="((${@position_code} = '009' and (t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'F' and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1)) or (${@position_code} = '014' and ((t1.bp_category != 'TENANT' or t1.paid_byother_flag != 'F') 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.bp_category = 'TENANT' and t1.paid_byother_flag = 'F' and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1)) or (${@position_code} = '014' and ((t1.bp_category != 'TENANT' or t1.paid_byother_flag != 'F') and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1)))"/>
<bm:fieldname="dd_bank_branch_name"databaseType="VARCHAR2"datatype="java.lang.String"expression="(select dd_bank_branch_name from con_contract t where t.data_class='NORMAL' and t.dd_bank_account_num=t1.dd_bank_account_num and rownum=1)"physicalName="DD_BANK_BRANCH_NAME"/>
<bm:field name="bank_name" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select e.ebank_name from con_contract t ,csh_ebank e where t.direct_debit_bank_id = e.ebank_id and t.data_class='NORMAL' and t.dd_bank_account_num=t1.dd_bank_account_num and rownum=1)" physicalName="BANK_NAME"/> -->
<bm:fieldname="dd_bank_branch_name"databaseType="VARCHAR2"datatype="java.lang.String"expression="(select dd_bank_branch_name from con_contract t where t.data_class='NORMAL' and t.dd_bank_account_num=t1.dd_bank_account_num and rownum=1)"physicalName="DD_BANK_BRANCH_NAME"/>
var record = $('hls_acr_ebank_output_ds').getCurrentRecord();
var sql;
if (record.get('payment_method')=='04'){
sql = "select '工行导出格式尚待确认' from dual";
}else if(record.get('payment_method')=='CCB'){
//sql = "SELECT rpad(nvl(t.customer_account_number, ' '), 20, ' '),rpad(nvl(t.customer_name, ' '), 40, ' '), lpad(to_number(t.receivable_amount, '99999999999999.99'), 16, ' '),rpad(nvl(t.identity_no, ' '), 60, ' '),'','','' FROM hls_acr_ebank_output_temp t WHERE t.session_id = ${/session/@session_id} ORDER BY t.sequence_no";
sql = "SELECT nvl(t.sequence_no,''),nvl(t.dd_bank_account_num, ''),nvl(t.bp_name, ''),trim(TO_CHAR(t.due_amount, '99999999999999.99')),nvl(t.id_card_no, '') FROM hls_acr_ebank_output_temp t WHERE t.session_id = ${/session/@session_id} and t.due_amount > 0 ORDER BY t.sequence_no";
}else{
sql = "select '其他导出格式尚待确认' from dual";
}
var url = 'hls_acr_ebank_export_txt.lsc?fileName='+getNowFormatDate() + '&separator=|&sql='+sql;
<a:model-querydefaultWhereClause="header_id=${/model/header/record/@header_id} and TEMPLATE_CODE = 'HLS_EBANK'"model="basic.hls_fnd_attribute_status"rootPath="status"/>