fix: filter sales team to show only active individual salespersons

(cherry picked from commit 2fcd406b18)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.js
This commit is contained in:
Rehan Ansari
2025-10-12 19:01:54 +05:30
committed by Mergify
parent a777a11919
commit 38efd5cb0b
2 changed files with 22 additions and 0 deletions

View File

@@ -797,7 +797,20 @@ frappe.ui.form.on("Sales Invoice", {
is_group: 0,
},
};
<<<<<<< HEAD
};
=======
});
frm.set_query("sales_person", "sales_team", function () {
return {
filters: {
is_group: 0,
enabled: 1,
},
};
});
>>>>>>> 2fcd406b18 (fix: filter sales team to show only active individual salespersons)
},
onload: function (frm) {
frm.redemption_conversion_factor = null;

View File

@@ -44,6 +44,15 @@ frappe.ui.form.on("Sales Order", {
};
});
frm.set_query("sales_person", "sales_team", function () {
return {
filters: {
is_group: 0,
enabled: 1,
},
};
});
frm.set_df_property("packed_items", "cannot_add_rows", true);
frm.set_df_property("packed_items", "cannot_delete_rows", true);
},