Commit ed67fd0d authored by 18083's avatar 18083

营业月结前跨月核销提示调整

parent 912672f9
......@@ -217,6 +217,7 @@
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="审批中退款金额"/>
<!--end-->
<bm:field name="guarantor_name_duty"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......
......@@ -709,6 +709,7 @@
//获取月结期间是否关闭
function get_period_closed(date){
debugger;
var csh_confirm_flag;
$L.request({
url: '${/request/@context_path}/autocrud/csh.CSH531N.csh_data_confirm/query',
......@@ -728,12 +729,26 @@
scope: this,
sync: true,
});
if(csh_confirm_flag='N'){
if(csh_confirm_flag=='N'){
return false;
}
return true;
}
function check_transaction(){
debugger;
var transaction_ds = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var paid_byother_flag=transaction_ds.get('paid_byother_flag');
var collection_classes=transaction_ds.get('collection_classes');
var guarantor_name_duty=transaction_ds.get('guarantor_name_duty');
var transaction_type=transaction_ds.get('transaction_type');
if(paid_byother_flag=='T' && collection_classes=='COMBINED'
&& Ext.isEmpty(guarantor_name_duty) && transaction_type=='ADVANCE_RECEIPT'){
return false;
}
return true;
}
function csh531n_write_off_submit() {
var returning_amount = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('returning_amount') || 0;
if (returning_amount > 0) {
......@@ -793,14 +808,14 @@
var transaction_type = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('transaction_type');
//核销为融租保证金
for(var j=0;j<depositRs.length;j++){
if(!get_period_closed(transaction_date)
if(!get_period_closed(transaction_date) &&!check_transaction()
&&(depositRs[j].get('write_off_date').getFullYear() !=transaction_date.getFullYear()||depositRs[j].get('write_off_date').getMonth()+1 !=transaction_date.getMonth()+1)){
depositRs_date_count = plus(depositRs_date_count, 1);
}
}
//核销为经租保证金
for(var j=0;j<operatRs.length;j++){
if(!get_period_closed(transaction_date)
if(!get_period_closed(transaction_date) &&!check_transaction()
&&(operatRs[j].get('write_off_date').getFullYear() !=transaction_date.getFullYear()||operatRs[j].get('write_off_date').getMonth()+1 !=transaction_date.getMonth()+1)){
operatRs_date_count = plus(operatRs_date_count, 1);
}
......@@ -819,9 +834,9 @@
}
var promt;
if(depositRs_date_count>0 ||operatRs_date_count>0){
promt =transaction_date.getFullYear()+'-'+(transaction_date.getMonth()+1)+'月营业月结未确认,收款日期为'+Leaf.formatDate(transaction_date)+',与当前选择保证金的核销日期存在跨月,会影响会计凭证日期,确认要提交吗?'
promt =(transaction_date.getMonth()+1)+'月营业月结未确认,收款日期为'+Leaf.formatDate(transaction_date)+',与当前选择<br/>保证金的核销日期存在跨月,会影响会计凭证日期,确认<br/>要提交吗?'
}else if(interfaceRs_date_count>0){
promt = interfaceRs_date.split('-')[0]+'-'+interfaceRs_date.split('-')[1]+'月营业月结未确认,与当前选择的核销日期存在跨月,会影响会计凭证日期,确认要提交吗?'
promt = interfaceRs_date.split('-')[0]+'-'+interfaceRs_date.split('-')[1]+'月营业月结未确认,与当前选择的核销日期存在<br/>跨月,会影响会计凭证日期,确认要提交吗?'
}else{
promt = '确认提交复核吗?'
}
......@@ -885,6 +900,7 @@
<!-- <a:field name="write_off_date" defaultValue="${/model/sys_default_value/record/@now_time}" required="true"/> -->
<a:field name="write_off_date" readOnly="true"/>
<a:field name="paid_byother_flag_n" readOnly="true"/>
<a:field name="guarantor_name_duty" readOnly="true"/>
<a:field name="ref_contract_num" readOnly="true"/>
<a:field name="bank_slip_num" readOnly="true"/>
<a:field name="bp_code" readOnly="true"/>
......
......@@ -167,7 +167,7 @@
if(!check_extend_month()){
var je_date_year = getPreMonth(deposit_records[0].get('je_date').format('yyyy-mm-dd')).split('-')[0];
var je_date_month = getPreMonth(deposit_records[0].get('je_date').format('yyyy-mm-dd')).split('-')[1];
var promt =je_date_year+'-'+je_date_month+'月营业月结未确认,与当前选择的经济业务发生日存在跨月,会影响会计凭证日期,确认要提交吗?';
var promt =je_date_year+'-'+je_date_month+'月营业月结未确认,与当前选择的经济业务发生日<br/>存在跨月,会影响会计凭证日期,确认要提交吗?';
}else{
var promt ='确定提交保证金划转?'
}
......@@ -199,7 +199,7 @@
if(!check_extend_month()){
var je_date_year = getPreMonth(deposit_records[0].get('je_date').format('yyyy-mm-dd')).split('-')[0];
var je_date_month = getPreMonth(deposit_records[0].get('je_date').format('yyyy-mm-dd')).split('-')[1];
var promt =je_date_year+'-'+je_date_month+'月营业月结未确认,与当前选择的经济业务发生日存在跨月,会影响会计凭证日期,确认要提交吗?';
var promt =je_date_year+'-'+je_date_month+'月营业月结未确认,与当前选择的经济业务发生<br/>日存在跨月,会影响会计凭证日期,确认要提交吗?';
}else{
var promt ='确定提交保证金划转?'
}
......
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