Skip to content

Commit

Permalink
fix: add filter for employee in vehicle log (backport #1571) (#1581)
Browse files Browse the repository at this point in the history
* add filter for employee

* chore: fix formatting

---------

Co-authored-by: Rucha Mahabal <[email protected]>
(cherry picked from commit 0443333)

Co-authored-by: NandhiniDevi <[email protected]>
  • Loading branch information
mergify[bot] and Nandhinidevi123 authored Mar 26, 2024
1 parent 4fd79b4 commit 92331aa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hrms/hr/doctype/vehicle_log/vehicle_log.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
// For license information, please see license.txt

frappe.ui.form.on("Vehicle Log", {
setup: function (frm) {
frm.set_query("employee", function() {
return {
filters: {
status: "Active",
},
};
});
},
refresh: function(frm) {
if(frm.doc.docstatus == 1) {
frm.add_custom_button(__('Expense Claim'), function() {
Expand Down

0 comments on commit 92331aa

Please sign in to comment.