Commit c02e856e authored by stone's avatar stone

【fix】修改罚息减免计算逻辑

parent 0228ec61
...@@ -148,9 +148,6 @@ ...@@ -148,9 +148,6 @@
return; return;
} }
} }
//判断所有的单据是否已经进行测算过 //判断所有的单据是否已经进行测算过
Leaf.request({ Leaf.request({
url: $('con_contract_penalty_reduction_link').getUrl(), url: $('con_contract_penalty_reduction_link').getUrl(),
......
...@@ -35,7 +35,9 @@ ...@@ -35,7 +35,9 @@
if (res.result.header_result == 'success') { if (res.result.header_result == 'success') {
var ds_id2 = 'CON_PENALTY_REDUCTION_MAINTAIN_G_PENALTY_DETAIL_con_contract_cashflow_ds'; var ds_id2 = 'CON_PENALTY_REDUCTION_MAINTAIN_G_PENALTY_DETAIL_con_contract_cashflow_ds';
$(ds_id2).setQueryParameter('copy_contract_id',record1.get('copy_contract_id')); $(ds_id2).setQueryParameter('copy_contract_id',record1.get('copy_contract_id'));
$(ds_id2).setQueryParameter('copy_contract_id',record1.get('copy_contract_id'));
$(ds_id2).query(); $(ds_id2).query();
debugger
var records2 = $(ds_id2).getAll(); var records2 = $(ds_id2).getAll();
if (records2 && records2.length != 0) { if (records2 && records2.length != 0) {
var param_list = []; var param_list = [];
...@@ -222,17 +224,26 @@ ...@@ -222,17 +224,26 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
if (value != old_value) { if (value != old_value) {
if (update_falg != 'Y') { if (update_falg != 'Y') {
if (name == 'reduce_amount_total') { if (name == 'reduce_amount_total') {
var ratio = parseFloat(Leaf.formatNumber(div(record.get('reduce_amount_total'), record.get('unreceived_overdue_amount')), 4));
update_falg = 'Y'; // record.set('reduce_amount_total',value>record.get('unreceived_overdue_amount') ?record.get('unreceived_overdue_amount'):value);
if(value>record.get('unreceived_overdue_amount')){
$L.showErrorMessage('提示','减免金额不能大于最大减免金额!');
record.set('reduce_amount_total',record.get('unreceived_overdue_amount'));
$(ds).getAt(0).set('reduce_amount_total','');
return;
}
var ratio = parseFloat(Leaf.formatNumber(div(record.get('reduce_amount_total'), record.get('total_overdue_amount')), 4));
// update_falg = 'Y';
record.set('reduce_amount_total_ratio', ratio); record.set('reduce_amount_total_ratio', ratio);
} }
if (name == 'reduce_amount_total_ratio') { if (name == 'reduce_amount_total_ratio') {
var amount = parseFloat(mul(record.get('reduce_amount_total_ratio'), record.get('unreceived_overdue_amount')), 2); var amount = parseFloat(mul(record.get('reduce_amount_total_ratio'), record.get('total_overdue_amount')), 2);
update_falg = 'Y'; // update_falg = 'Y';
record.set('reduce_amount_total', amount); record.set('reduce_amount_total', amount);
} }
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
var mb = new HlMailBean(); var mb = new HlMailBean();
mb.setHost(mail_server_result[0].mail_smtp_host); // 设置SMTP主机(163),若用126,则设为:smtp.126.com mb.setHost(mail_server_result[0].mail_smtp_host); // 设置SMTP主机(163),若用126,则设为:smtp.126.com
mb.setPort(mail_server_result[0].mail_port_number); //设置端口号 mb.setPort(mail_server_result[0].mail_port_number); //设置端口号
println(mail_server_result[0].mail_port_number);
mb.setUsername(mail_server_result[0].mail_username); // 设置发件人邮箱的用户名 mb.setUsername(mail_server_result[0].mail_username); // 设置发件人邮箱的用户名
mb.setPassword(mail_server_result[0].mail_password); // 设置发件人邮箱的密码,需将*号改成正确的密码 mb.setPassword(mail_server_result[0].mail_password); // 设置发件人邮箱的密码,需将*号改成正确的密码
mb.setFrom(mail_server_result[0].mail_address); // 设置发件人的邮箱 mb.setFrom(mail_server_result[0].mail_address); // 设置发件人的邮箱
......
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