From d560da950db3fba7ea16bd32a09f88665b80261a Mon Sep 17 00:00:00 2001 From: Kanchan Chauhan Date: Thu, 10 May 2018 10:42:56 +0530 Subject: [PATCH] [Minor] Show only active driver in Delivery Trip --- erpnext/stock/doctype/delivery_trip/delivery_trip.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/stock/doctype/delivery_trip/delivery_trip.js b/erpnext/stock/doctype/delivery_trip/delivery_trip.js index f7ec7e3770..3e7dfc9bad 100644 --- a/erpnext/stock/doctype/delivery_trip/delivery_trip.js +++ b/erpnext/stock/doctype/delivery_trip/delivery_trip.js @@ -3,6 +3,14 @@ frappe.ui.form.on('Delivery Trip', { setup: function(frm) { + frm.set_query("driver", function() { + return { + filters: { + "status": "Active" + } + }; + }); + frm.set_query("address", "delivery_stops", function(doc, cdt, cdn) { var row = locals[cdt][cdn]; if (row.customer) {