Merge pull request #24192 from AfshanKhan/sal-slip-pop-up-error

fix: sal slip popup error
This commit is contained in:
Afshan 2020-12-23 14:34:37 +05:30 committed by GitHub
commit 7b385046b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,14 +214,16 @@ frappe.ui.form.on('Salary Slip Timesheet', {
});
var calculate_totals = function(frm) {
if (frm.doc.earnings || frm.doc.deductions) {
frappe.call({
method: "set_totals",
doc: frm.doc,
callback: function() {
frm.refresh_fields();
}
});
if (frm.doc.docstatus === 0) {
if (frm.doc.earnings || frm.doc.deductions) {
frappe.call({
method: "set_totals",
doc: frm.doc,
callback: function() {
frm.refresh_fields();
}
});
}
}
};