Merge pull request #16092 from deepeshgarg007/salary_slip

Salary slip earnings and deductions table bug fix
This commit is contained in:
Nabin Hait 2018-11-27 11:39:10 +05:30 committed by GitHub
commit dde952d591
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,7 @@ var calculate_earning_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) {
} else if(reset_amount && tbl[i].default_amount) {
tbl[i].amount = tbl[i].default_amount;
}
if(!tbl[i].do_not_include_in_total) {
@ -198,7 +198,7 @@ var calculate_ded_total = function(doc, dt, dn, reset_amount) {
for(var i = 0; i < tbl.length; i++){
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) {
} else if(reset_amount && tbl[i].default_amount) {
tbl[i].amount = tbl[i].default_amount;
}
if(!tbl[i].do_not_include_in_total) {