Skip to content

Commit

Permalink
Merge pull request #2079 from frappe/mergify/bp/version-14-hotfix/pr-…
Browse files Browse the repository at this point in the history
…2077

fix(Expense Claim): get_taxes condition (backport #2077)
  • Loading branch information
krantheman authored Aug 14, 2024
2 parents 89b2cfa + cac8610 commit 04138ff
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 04138ff

Please sign in to comment.