1.修改手工扣款bug(精度问题)
This commit is contained in:
parent
f76226f82b
commit
e607a560d7
@ -83,14 +83,17 @@
|
||||
if(ids.length == 0 ||i==0){
|
||||
ids = sParm_id[0];
|
||||
collect_moneys = sParm_money[0];
|
||||
rent_moneys = sParm_rent[0];
|
||||
penalty_moneys = sParm_penalty[0];
|
||||
var rent_moneys = sParm_rent[0];
|
||||
var penalty_moneys = sParm_penalty[0];
|
||||
rent_moneys.split(".")[1].length
|
||||
var sum_moneys = eval(rent_moneys+"+"+penalty_moneys);
|
||||
if(collect_moneys==""||collect_moneys==0){
|
||||
alert("所选扣款金额不能为空或者为0!");
|
||||
return;
|
||||
}
|
||||
if(rent_moneys+penalty_moneys<collect_moneys){
|
||||
alter("扣款金额不能大于租金加罚息金额");
|
||||
if(sum_moneys*100<collect_moneys*100){
|
||||
alert("扣款金额不能大于租金加罚息金额");
|
||||
return;
|
||||
}
|
||||
json[sParm_id[0]] = sParm_money[0];
|
||||
}else{
|
||||
@ -100,8 +103,10 @@
|
||||
alert("所选扣款金额不能为空或者为0!");
|
||||
return;
|
||||
}
|
||||
if(sParm_rent[i]+sParm_penalty[i]<sParm_money[i]){
|
||||
alter("扣款金额不能大于租金加罚息金额");
|
||||
var sum_moneyi = eval(sParm_rent[i]+"+"+sParm_penalty[i])
|
||||
if(sum_moneyi*100<sParm_money[i]*100){
|
||||
alert("扣款金额不能大于租金加罚息金额");
|
||||
return;
|
||||
}
|
||||
json[sParm_id[i]] = sParm_money[i];
|
||||
}
|
||||
@ -198,7 +203,6 @@
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
Loading…
x
Reference in New Issue
Block a user