Skip to content

Commit

Permalink
fix: do not set New Leaves Allocated field as read-only for earned le…
Browse files Browse the repository at this point in the history
…aves

- removing this until there's a better way to update existing allocations
  • Loading branch information
ruchamahabal committed May 9, 2022
1 parent 57db91c commit 4b55f5f
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions erpnext/hr/doctype/leave_allocation/leave_allocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ frappe.ui.form.on("Leave Allocation", {
});
}
}

// make new leaves allocated field read only if allocation is created via leave policy assignment
// and leave type is earned leave, since these leaves would be allocated via the scheduler
if (frm.doc.leave_policy_assignment) {
frappe.db.get_value("Leave Type", frm.doc.leave_type, "is_earned_leave", (r) => {
if (r && cint(r.is_earned_leave))
frm.set_df_property("new_leaves_allocated", "read_only", 1);
});
}
},

expire_allocation: function(frm) {
Expand Down

0 comments on commit 4b55f5f

Please sign in to comment.