fix: Salary Structure object has no attribute set_totals (#25113)

This commit is contained in:
Rucha Mahabal 2021-04-01 14:40:15 +05:30 committed by GitHub
parent 56bd4d71a9
commit 53a1aaf33d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,7 +216,7 @@ frappe.ui.form.on('Salary Slip Timesheet', {
});
var set_totals = function(frm) {
if (frm.doc.docstatus === 0) {
if (frm.doc.docstatus === 0 && frm.doc.doctype === "Salary Slip") {
if (frm.doc.earnings || frm.doc.deductions) {
frappe.call({
method: "set_totals",