[fix] POS redirect issue

This commit is contained in:
Rohit Waghchaure 2017-11-17 13:49:12 +05:30
parent 3499ba08df
commit 44f7b157ff
2 changed files with 3 additions and 6 deletions

View File

@ -12,8 +12,5 @@ class POSSettings(Document):
def set_link_for_pos(self):
link = 'pos' if self.use_pos_in_offline_mode else 'point-of-sale'
desktop_icon = frappe.db.get_value('Desktop Icon',
{'standard': 1, 'module_name': 'POS'}, 'name')
if desktop_icon:
frappe.db.set_value('Desktop Icon', desktop_icon, 'link', link)
frappe.db.sql(""" update `tabDesktop Icon` set link = '{0}'
where module_name like '%pos%'""".format(link))

View File

@ -991,7 +991,7 @@ class POSItems {
this.get_items({search_value: search_term, item_group })
.then(({ items, serial_no, batch_no, barcode }) => {
if (search_term) {
if (search_term && !barcode) {
this.search_index[search_term] = items;
}