How to ignore spaces on item name while entering in stock entry

Currently some items are hard to find while entering in item rows of stock entry. This mainly due to spaces in item name. Is there any way to optimize the filtering.

Thank You

Hi @hashimea,

It’s not set in the default system but you can customize by first adding a field in the item master like item search after that set variable in search fields in the item customize form.

Script like:

frappe.ui.form.on("Item", {
  item_code: function(frm) {
	var nxf1 = frm.doc.item_code;
	var nxf2 = nxf1.replace(/[^a-zA-Z ]/g, "");
	if(!frm.doc.item_search)
	frm.set_value("item_search", nxf2);
  }
});

Then checked in-stock entry or any type of transaction.

Thank You!

1 Like