Merge pull request #7066 from rohitwaghchaure/pos_barcode_search_issue

[fix] Barcode and special character issue in the search box of the POS
This commit is contained in:
Nabin Hait 2016-11-25 11:20:55 +05:30 committed by GitHub
commit 14823d0d0f
2 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ def get_items_list(pos_profile):
select
name, item_code, item_name, description, item_group, expense_account, has_batch_no,
has_serial_no, expense_account, selling_cost_center, stock_uom, image,
default_warehouse, is_stock_item
default_warehouse, is_stock_item, barcode
from
tabItem
where

View File

@ -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 reg = new RegExp(key.replace(re, '[\\w*\\s*[a-zA-Z0-9]*]*'))
search_status = true