Commit ef3989b3 authored by 38823's avatar 38823

【建机】收款核销自动匹配需适用于部分核销的现金事务

parent 43cd8670
......@@ -88,6 +88,10 @@
<bm:field name="bank_branch_name" expression="(select bank_branch_name from csh_bank_branch where bank_branch_id = (select bank_branch_id from csh_bank_account where bank_account_id = t1.bank_account_id))" forInsert="false" forUpdate="false"/>
<bm:field name="use_money_amount" expression="(select t1.transaction_amount-t1.returned_amount from dual)" forInsert="false" forUpdate="false"/>
<bm:field name="opposite_band_na"/>
<bm:field name="opposite_band_name" expression="(select a.bank_full_name from hls_bp_master_bank_account a where a.bp_id = t1.bp_id and a.enabled_flag = 'Y' and rownum=1)"/>
<bm:field name="bp_bank_account_number" expression="(select a.Bank_Account_Num from hls_bp_master_bank_account a where a.bp_id = t1.bp_id and a.enabled_flag = 'Y' and rownum=1)"/>
<bm:field name="bp_bank_branch_name" expression="(select a.Bank_Branch_Name from hls_bp_master_bank_account a where a.bp_id = t1.bp_id and a.enabled_flag = 'Y' and rownum=1)"/>
<bm:field name="bank_sum" expression="(select COUNT(*) as bank_sum from hls_bp_master_bank_account a where a.bp_id = t1.bp_id and a.enabled_flag = 'Y')"/>
<bm:field name="applying_amount" expression="(nvl((select sum(cr.return_amount) from csh_transaction_return cr where cr.transaction_id=t1.transaction_id and cr.status='APPROVING'),0))" forInsert="false" forUpdate="false"/>
<bm:field name="return_id" expression="(select cr.return_id from csh_transaction_return cr where cr.transaction_id=t1.transaction_id and cr.status='APPROVING')" forInsert="false" forUpdate="false"/>
<bm:field name="banka"/>
......
......@@ -377,18 +377,36 @@
if (res.result.record.v_flag=='Y'){
deposit_record.set('csh_return_bp_name', record.get('bp_name'));
deposit_record.set('csh_return_bp_id', record.get('bp_id'));
if(record.get('bank_sum')==1){
deposit_record.set('opposite_band_na', record.get('opposite_band_name'));
deposit_record.set('bp_bank_account_num', record.get('bp_bank_account_number'));
deposit_record.set('bp_bank_branch_name', record.get('bp_bank_branch_name'));
}else {
deposit_record.set('opposite_band_na','');
deposit_record.set('bp_bank_account_num','');
deposit_record.set('bp_bank_branch_name','');
}
}else{
deposit_record.set('csh_return_bp_name','');
deposit_record.set('csh_return_bp_id','');
deposit_record.set('opposite_band_na','');
deposit_record.set('bp_bank_account_num','');
deposit_record.set('bp_bank_branch_name','');
}
},
failure: function () {
deposit_record.set('csh_return_bp_name','');
deposit_record.set('csh_return_bp_id','');
deposit_record.set('opposite_band_na','');
deposit_record.set('bp_bank_account_num','');
deposit_record.set('bp_bank_branch_name','');
},
error: function () {
deposit_record.set('csh_return_bp_name','');
deposit_record.set('csh_return_bp_id','');
deposit_record.set('opposite_band_na','');
deposit_record.set('bp_bank_account_num','');
deposit_record.set('bp_bank_branch_name','');
},
scope: this
});
......@@ -398,7 +416,7 @@
deposit_record.set('contract_number', record.get('contract_number'));
deposit_record.set('bp_id_telnet_code', record.get('bp_id_telnet_code'));
deposit_record.set('bp_id_telnet_n', record.get('bp_id_telnet_n'));
deposit_record.set('bp_bank_branch_name', record.get('bp_bank_branch_name'));
//deposit_record.set('bp_bank_branch_name', record.get('bp_bank_branch_name'));
deposit_record.set('deposit_trans_type_desc', record.get('deposit_trans_type_desc'));
deposit_record.set('vender_contract_number', record.get('vender_contract_number'));
deposit_record.set('vender_project_number', record.get('vender_project_number'));
......
......@@ -143,8 +143,8 @@
params: {
return_id: return_id,
bp_bank_account_name: record.get('bp_bank_account_name'),
opposite_band_na: record.get('opposite_band_na'),
bp_bank_account_num: record.get('bp_bank_account_num'),
opposite_band_na: record.get('opposite_band_name'),
bp_bank_account_num: record.get('bp_bank_account_number'),
left_amount: record.get('left_amount'),
ref_contract_id: record.get('ref_contract_id'),
winId: 'csh_transaction_deposit_link_winid'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment