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

This commit is contained in:
Rucha Mahabal 2021-04-01 14:39:52 +05:30 committed by GitHub
parent 8617c0ab99
commit d765b21825
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",