Salary slip bug fix

This commit is contained in:
deepeshgarg007 2018-11-26 15:04:21 +05:30
parent 64b4d98778
commit 533066eb87

View File

@ -178,7 +178,7 @@ var calculate_earning_total = function(doc, dt, dn, reset_amount) {
tbl[i].amount = Math.round(tbl[i].default_amount)*(flt(doc.payment_days) /
cint(doc.total_working_days)*100)/100;
} else if(reset_amount) {
tbl[i].amount = tbl[i].default_amount;
tbl[i].amount = tbl[i].amount;
}
if(!tbl[i].do_not_include_in_total) {
total_earn += flt(tbl[i].amount);
@ -199,7 +199,7 @@ var calculate_ded_total = function(doc, dt, dn, reset_amount) {
if(cint(tbl[i].depends_on_lwp) == 1) {
tbl[i].amount = Math.round(tbl[i].default_amount)*(flt(doc.payment_days)/cint(doc.total_working_days)*100)/100;
} else if(reset_amount) {
tbl[i].amount = tbl[i].default_amount;
tbl[i].amount = tbl[i].amount;
}
if(!tbl[i].do_not_include_in_total) {
total_ded += flt(tbl[i].amount);