Commit 6a5de11a authored by 18083's avatar 18083

营业月结前跨月核销的保证金调整逻辑

parent bc0e2928
...@@ -793,31 +793,32 @@ ...@@ -793,31 +793,32 @@
var transaction_type = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('transaction_type'); var transaction_type = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('transaction_type');
//核销为融租保证金 //核销为融租保证金
for(var j=0;j<depositRs.length;j++){ for(var j=0;j<depositRs.length;j++){
if((depositRs[j].get('write_off_date').getFullYear() !=transaction_date.getFullYear()) if(!get_period_closed(transaction_date)
||(depositRs[j].get('write_off_date').getMonth()+1 !=transaction_date.getMonth()+1)){ &&(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); depositRs_date_count = plus(depositRs_date_count, 1);
} }
} }
//核销为经租保证金 //核销为经租保证金
for(var j=0;j<operatRs.length;j++){ for(var j=0;j<operatRs.length;j++){
if((operatRs[j].get('write_off_date').getFullYear() !=transaction_date.getFullYear()) if(!get_period_closed(transaction_date)
||(operatRs[j].get('write_off_date').getMonth()+1 !=transaction_date.getMonth()+1)){ &&(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); operatRs_date_count = plus(operatRs_date_count, 1);
} }
} }
//保证金抵扣为债券
//保证金抵扣为债券
if(transaction_type == 'DEPOSIT'){ if(transaction_type == 'DEPOSIT'){
for(var j=0;j<interfaceRs.length;j++){ for(var j=0;j<interfaceRs.length;j++){
var Rs_write_date = Leaf.formatDate(interfaceRs[j].get('write_off_date'));
var interfaceRs_date = getPreMonth(Leaf.formatDate(interfaceRs[j].get('write_off_date'))); var interfaceRs_date = getPreMonth(Leaf.formatDate(interfaceRs[j].get('write_off_date')));
if(!get_period_closed(interfaceRs_date)){ if(!get_period_closed(interfaceRs_date)
&&(Rs_write_date.split('-')[0] !=transaction_date.getFullYear() || Rs_write_date.split('-')[1]!=transaction_date.getMonth()+1)){
interfaceRs_date_count = plus(interfaceRs_date_count, 1); interfaceRs_date_count = plus(interfaceRs_date_count, 1);
break; break;
} }
} }
} }
var promt; var promt;
if(!get_period_closed(transaction_date) && (depositRs_date_count>0 ||operatRs_date_count>0)){ if(depositRs_date_count>0 ||operatRs_date_count>0){
promt =transaction_date.getFullYear()+'-'+(transaction_date.getMonth()+1)+'月营业月结未确认,收款日期为'+Leaf.formatDate(transaction_date)+',与当前选择保证金的核销日期存在跨月,会影响会计凭证日期,确认要提交吗?' promt =transaction_date.getFullYear()+'-'+(transaction_date.getMonth()+1)+'月营业月结未确认,收款日期为'+Leaf.formatDate(transaction_date)+',与当前选择保证金的核销日期存在跨月,会影响会计凭证日期,确认要提交吗?'
}else if(interfaceRs_date_count>0){ }else if(interfaceRs_date_count>0){
promt = interfaceRs_date.split('-')[0]+'-'+interfaceRs_date.split('-')[1]+'月营业月结未确认,与当前选择的核销日期存在跨月,会影响会计凭证日期,确认要提交吗?' promt = interfaceRs_date.split('-')[0]+'-'+interfaceRs_date.split('-')[1]+'月营业月结未确认,与当前选择的核销日期存在跨月,会影响会计凭证日期,确认要提交吗?'
......
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