Skip to content

Commit

Permalink
fix: get_taxes condition
Browse files Browse the repository at this point in the history
(cherry picked from commit 1a74f41)
  • Loading branch information
krantheman authored and mergify[bot] committed Aug 14, 2024
1 parent 89b2cfa commit cac8610
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions hrms/hr/doctype/expense_claim/expense_claim.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,17 +282,18 @@ frappe.ui.form.on("Expense Claim", {
}
});
},

get_taxes: function (frm) {
if (frm.doc.taxes) {
frappe.call({
method: "calculate_taxes",
doc: frm.doc,
callback: () => {
refresh_field("taxes");
frm.trigger("update_employee_advance_claimed_amount");
},
});
}
if (!frm.doc.taxes.length) return;

frappe.call({
method: "calculate_taxes",
doc: frm.doc,
callback: () => {
refresh_field("taxes");
frm.trigger("update_employee_advance_claimed_amount");
},
});
},

get_advances: function (frm) {
Expand Down

0 comments on commit cac8610

Please sign in to comment.