Commit 912672f9 authored by 18083's avatar 18083

预收款跨月收款确认反冲

parent 4aeaa9fa
......@@ -105,6 +105,7 @@
<bm:field name="extra_nam" expression="(Select u.unit_name From exp_org_unit_v u Where u.unit_id = (select v.unit_id from hls_bp_master v where v.enabled_flag = 'Y' and v.bp_id = t1.bp_id))" forInsert="false" forUpdate="false"/>
<bm:field name="import_source"/>
<bm:field name="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:field name="extend_receipt_pre_flag"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......
......@@ -84,6 +84,7 @@
<bm:field name="transaction_wfl_id"/>
<bm:field name="import_source"/>
<bm:field name="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:field name="extend_receipt_pre_flag"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......@@ -95,7 +96,22 @@
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<!-- <bm:data-filter name="query" expression="(t1.posted_flag=&apos;Y&apos;)"/>-->
<bm:data-filter name="approval_status" enforceOperations="query" expression="('APPROVED' != 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:data-filters>
<bm:data-filter name="query" expression=" not exists (select 1 from csh_transaction ct where ct.source_csh_trx_id = t1.transaction_id and ct.reversed_flag = 'N' and ct.transaction_amount = t1.transaction_amount and ct.transaction_type = 'ADVANCE_RECEIPT' and ct.write_off_flag = 'NOT' and t1.write_off_flag='FULL' and t1.transaction_type = 'RECEIPT')"/>
<!--<bm:data-filter name="query" expression="not (t1.transaction_amount =
(select sum(cwo.csh_write_off_amount)
from csh_write_off cwo
where cwo.csh_transaction_id = t1.transaction_id
and cwo.reversed_flag = 'N'
and cwo.write_off_type = 'RECEIPT_ADVANCE_RECEIPT') and
t1.transaction_type = 'RECEIPT' and exists
(select 1
from csh_transaction ct
where ct.source_csh_trx_id = t1.transaction_id
and ct.reversed_flag = 'N'
and ct.transaction_amount = t1.transaction_amount
and ct.transaction_type = 'ADVANCE_RECEIPT'
and ct.write_off_flag = 'NOT'))"/>-->
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="receipt_type" queryOperator="="/>
<bm:query-field name="transaction_num_from" queryExpression="t1.transaction_num &gt;= ${@transaction_num_from}"/>
......
......@@ -180,6 +180,6 @@
<bm:data-filter name="query" expression="(t1.returned_flag = 'NOT')"/>
<bm:data-filter name="query" expression="(t1.write_off_flag = 'NOT')"/>
<bm:data-filter name="query" expression="(t1.confirmed_flag in ('ACCAUDITED','APPROVED','WF_REJECTED'))"/>
<bm:data-filter name="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 ('RECEIPT') and nvl(t1.collection_classes,'NON') != 'REFUND'))"/>
<bm:data-filter name="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 ('RECEIPT') and nvl(t1.collection_classes,'NON') != 'REFUND') or (t1.transaction_type = 'ADVANCE_RECEIPT' and t1.transaction_amount = (select sum(cwo.csh_write_off_amount) from csh_write_off cwo where cwo.subsequent_csh_trx_id = t1.transaction_id and cwo.reversed_flag = 'N' and cwo.write_off_type = 'RECEIPT_ADVANCE_RECEIPT')))"/>
</bm:data-filters>
</bm:model>
\ No newline at end of file
......@@ -127,7 +127,7 @@
}
function onUpdate_csh511_receipt(ds, record, name, value, oldvalue) {
if (name == 'bp_id'&& '${/parameter/@import_source}' != 'HSBC_ADD'&&'${/parameter/@import_source}' != 'EXCEL_ADD') {
if (name == 'bp_id'&& '${/parameter/@import_source}' != 'HSBC_ADD'&&'${/parameter/@import_source}' != 'EXCEL_ADD' && '${/parameter/@extend_receipt_pre_flag}' != 'Y') {
if (value != oldvalue) {
record.set('bp_bank_account_id', '');
record.set('bp_bank_account_code', '');
......@@ -855,6 +855,24 @@
record.getField('bank_account_name').setReadOnly(true);
record.getField('bp_bank_account_name').setReadOnly(true);
}
if('${/parameter/@extend_receipt_pre_flag}' == 'Y'){
var record = $('csh_transaction_receipt_head_ds').getAt(0);
record.getField('transaction_date').setReadOnly(true);
record.getField('transaction_amount').setReadOnly(true);
record.getField('bank_slip_num').setReadOnly(true);
record.getField('collection_classes_desc').setReadOnly(true);
record.getField('description').setReadOnly(true);
record.getField('extra_nam').setReadOnly(true);
record.getField('ref_v05').setReadOnly(true);
record.getField('guarantor_name_duty_desc').setReadOnly(true);
//银行账户信息
record.getField('bank_account_name').setReadOnly(true);
record.getField('bank_branch_name').setReadOnly(true);
record.getField('bank_account_num').setReadOnly(true);
record.getField('bp_bank_account_name').setReadOnly(true);
record.getField('opposite_band_na').setReadOnly(true);
record.getField('bp_bank_account_num').setReadOnly(true);
}
}
]]></script>
</a:view>
......
......@@ -243,7 +243,7 @@
}
function seedetail_transaction_num(value, record, name) {
/* console.log(record.get('receipt_type'));
/* console.log(record.get('receipt_type'));
console.log( record.get('bp_name'));
console.log( record.get('confirmed_flag'));*/
if (record.get('transaction_id')) {
......@@ -256,7 +256,7 @@
return value;
}*/
if(record.get('confirmed_flag')=='NEW' || record.get('confirmed_flag') == 'CT_REJECTED' || record.get('confirmed_flag')=='ACCAUDITED_RECOI'){
url = $('csh_transaction_receipt_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id')+'&update_flag=true'+'&import_source='+ record.get('import_source');
url = $('csh_transaction_receipt_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id')+'&update_flag=true'+'&import_source='+ record.get('import_source')+'&extend_receipt_pre_flag='+ record.get('extend_receipt_pre_flag');
}else{
url = $('csh_transaction_receipt_maintain_readonly_link').getUrl() + '?transaction_id=' + record.get('transaction_id')+'&update_flag=false';
}
......
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