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) {