Commit 6c287993 authored by Darming's avatar Darming

[refactor]核销确认改动

parent b6c1695b
......@@ -5,7 +5,7 @@
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.transaction_date desc" needAccessControl="false">
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.transaction_id desc" needAccessControl="false">
<bm:fields>
<bm:field name="transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TRANSACTION_ID" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_ID"/>
<bm:field name="transaction_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRANSACTION_NUM" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_NUM"/>
......@@ -68,7 +68,7 @@
<bm:field name="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:field name="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:field name="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:field name="transaction_type_desc" forInsert="false" forUpdate="false" prompt="HLS.TRANSACTION_TYPE"/>
<!-- <bm:field name="transaction_type_desc" forInsert="false" forUpdate="false" prompt="HLS.TRANSACTION_TYPE"/>-->
<bm:field name="unwrite_off_amount" expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0))" forInsert="false" forUpdate="false" prompt="HLS.UNWRITEOFF_AMOUNT"/>
<bm:field name="precision" expression="(select g.precision from gld_currency g where g.currency_code =t1.currency_code)" forInsert="false" forUpdate="false"/>
<bm:field name="reverse_amount" expression="(-1*t1.transaction_amount)" forInsert="false" forUpdate="false" prompt="CSH511.REVERSE_AMOUNT"/>
......@@ -93,6 +93,7 @@
<bm:field name="sus_belnr"/>
<bm:field name="bp_virtual_bank_account"/>
<bm:field name="confirmed_flag" />
<bm:field name="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:field name="debt_confirmed_by"/>
<bm:field name="debt_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.debt_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="acc_confirmed_by"/>
......
......@@ -84,13 +84,17 @@
$('csh509_csh_trx_bank_drop').enable();
}, failure: function () {
unlock_current_window();
$('csh509_csh_trx_bank_business_confirm').enable();
},
error: function () {
unlock_current_window();
$('csh509_csh_trx_bank_business_confirm').enable();
},
scope: this
});
},function(){$('csh509_csh_trx_bank_business_confirm').enable();})
}, function () {
$('csh509_csh_trx_bank_business_confirm').enable();
})
}
......@@ -100,8 +104,8 @@
$('csh509_csh_trx_bank_business_confirm').disable();
//根据身份判断所选择的数据是否可以确认
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
if(datas.length == 0){
Leaf.showInfoMessage("提示","请先选择数据");
if (datas.length == 0) {
Leaf.showInfoMessage("提示", "请先选择数据");
$('csh509_csh_trx_bank_business_confirm').enable();
return;
}
......@@ -678,7 +682,7 @@
<a:field name="transaction_amount_to"/>
<a:field name="posted_flag_display" displayField="code_value_name" options="posted_flag_ds"
returnField="posted_flag" valueField="code_value"/>
<!-- <a:field name="posted_flag" defaultValue="N"/>-->
<!-- <a:field name="posted_flag" defaultValue="N"/>-->
<a:field name="returned_flag_display" displayField="code_value_name" options="returned_flag_ds"
returnField="returned_flag" valueField="code_value"/>
<a:field name="reversed_flag_display" displayField="code_value_name" options="reversed_flag_ds"
......@@ -706,7 +710,7 @@
<a:field name="currency_name_to_display" displayField="currency_name" options="currency_ds"
returnField="currency_code_to" valueField="currency_code"/>
<a:field name="currency_code_to"/>
<!-- <a:field name="transaction_type" defaultValue="RECEIPT"/>-->
<!-- <a:field name="transaction_type" defaultValue="RECEIPT"/>-->
<a:field name="transaction_category" defaultValue="BUSINESS"/>
<a:field name="write_off_flag_desc" displayField="code_value_name" options="write_off_flag_ds"
returnField="write_off_flag" valueField="code_value"/>
......@@ -856,8 +860,8 @@
<a:column name="description" prompt="CSH510.CSH_TRANSACTION.DESCRIPTION" align="center"/>
<a:column name="confirmed_flag_desc" prompt="单据审批状态"
align="center"/>
<!-- <a:column name="written_off_flag_desc" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"-->
<!-- align="center"/>-->
<!-- <a:column name="written_off_flag_desc" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"-->
<!-- align="center"/>-->
<a:column prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT" align="center">
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NAME" name="bank_account_name"
align="center"/>
......@@ -875,8 +879,8 @@
align="center"/>
</a:column>
<a:column name="user_desc" prompt="HLS.DOCUMENT_CREATED_BY" align="center"/>
<!-- <a:column name="debt_confirmed_by_desc" prompt="CSH510.CSH_TRANSACTION.DEPT_CONFIRMER"-->
<!-- align="center"/>-->
<!-- <a:column name="debt_confirmed_by_desc" prompt="CSH510.CSH_TRANSACTION.DEPT_CONFIRMER"-->
<!-- align="center"/>-->
<a:column name="acc_confirmed_by_desc" prompt="收款确认人"
align="center"/>
</a:columns>
......
......@@ -193,6 +193,18 @@
if (record.get('zero_amounts_allowed') == 'N' && record.get('transaction_amount') === 0) {
Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
}
} else if (name == 'collection_classes') {
if (value == 'DEPOSIT') {
record.set('paid_byother_flag', 'F');
record.set('paid_byother_flag_n', '否');
record.set('transaction_type', 'DEPOSIT');
record.set('deposit_flag', 'Y');
record.set('transaction_type', 'DEPOSIT');
record.getField('paid_byother_flag_n').setReadOnly(true);
} else {
record.getField('paid_byother_flag_n').setReadOnly(false);
record.set('transaction_type', 'RECEIPT');
}
}
}
......@@ -430,8 +442,8 @@
<a:field name="paid_byother_flag_n" required="true" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value"/>
</a:fields>
<a:events>
<!--<a:event name="update" handler="onUpdate_csh511_receipt"/>
<a:event name="add" handler="onAdd_csh511_receipt"/>
<a:event name="update" handler="onUpdate_csh511_receipt"/>
<!--<a:event name="add" handler="onAdd_csh511_receipt"/>
<a:event name="load" handler="onAdd_csh511_receipt"/>-->
</a:events>
</a:dataSet>
......
......@@ -233,24 +233,11 @@
record.set('paid_byother_flag_n', '否');
record.set('transaction_type', 'DEPOSIT');
record.set('deposit_flag', 'Y');
record.set('transaction_type', 'DEPOSIT');
record.getField('paid_byother_flag_n').setReadOnly(true);
} else {
record.getField('paid_byother_flag_n').setReadOnly(false);
}
} else if (name == 'paid_byother_flag') {
if (value == 'T') {
//代付非保证金类 --> 直接从银行过账到预收科目
if (record.get('collection_classes') == 'DEPOSIT') {
record.set('transaction_type', 'DEPOSIT');
} else {
record.set('transaction_type', 'ADVANCE_RECEIPT');
}
} else if (value == 'F') {
if (record.get('collection_classes') == 'DEPOSIT') {
record.set('transaction_type', 'DEPOSIT');
} else {
record.set('transaction_type', 'RECEIPT');
}
record.set('transaction_type', 'RECEIPT');
}
}
}
......
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