[fix] Barcode and special character issue in the search box of the POS
This commit is contained in:
parent
1e3d14fda7
commit
9a36083095
@ -123,7 +123,7 @@ def get_items_list(pos_profile):
|
|||||||
select
|
select
|
||||||
name, item_code, item_name, description, item_group, expense_account, has_batch_no,
|
name, item_code, item_name, description, item_group, expense_account, has_batch_no,
|
||||||
has_serial_no, expense_account, selling_cost_center, stock_uom, image,
|
has_serial_no, expense_account, selling_cost_center, stock_uom, image,
|
||||||
default_warehouse, is_stock_item
|
default_warehouse, is_stock_item, barcode
|
||||||
from
|
from
|
||||||
tabItem
|
tabItem
|
||||||
where
|
where
|
||||||
|
|||||||
@ -444,7 +444,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
key = this.search.$input.val().toLowerCase();
|
key = this.search.$input.val().toLowerCase().replace(/[&\/\\#,+()\[\]$~.'":*?<>{}]/g,'\\$&');
|
||||||
var re = new RegExp('%', 'g');
|
var re = new RegExp('%', 'g');
|
||||||
var reg = new RegExp(key.replace(re, '[\\w*\\s*[a-zA-Z0-9]*]*'))
|
var reg = new RegExp(key.replace(re, '[\\w*\\s*[a-zA-Z0-9]*]*'))
|
||||||
search_status = true
|
search_status = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user