Skip to content

Commit

Permalink
fix: get current leave period for leave balance report (backport #1277)…
Browse files Browse the repository at this point in the history
… (#1279)

(cherry picked from commit ebb17e1)

Co-authored-by: Rucha Mahabal <[email protected]>
  • Loading branch information
mergify[bot] and ruchamahabal authored Jan 9, 2024
1 parent 1fedea1 commit beb3d82
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ frappe.query_reports["Employee Leave Balance"] = {
depends_on: "eval: !doc.employee",
}
],

onload: () => {
const today = frappe.datetime.now_date();

frappe.call({
type: "GET",
method: "hrms.hr.utils.get_leave_period",
args: {
"from_date": frappe.defaults.get_default("year_start_date"),
"to_date": frappe.defaults.get_default("year_end_date"),
"from_date": today,
"to_date": today,
"company": frappe.defaults.get_user_default("Company")
},
freeze: true,
Expand Down

0 comments on commit beb3d82

Please sign in to comment.