mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
Merge pull request #16492 from rohitwaghchaure/ascii_code_issue_pos_offline_not_working
fix: ascii codec while opening offline POS
This commit is contained in:
@@ -333,10 +333,12 @@ def get_bin_data(pos_profile):
|
|||||||
itemwise_bin_data = {}
|
itemwise_bin_data = {}
|
||||||
cond = "1=1"
|
cond = "1=1"
|
||||||
if pos_profile.get('warehouse'):
|
if pos_profile.get('warehouse'):
|
||||||
cond = "warehouse = '{0}'".format(pos_profile.get('warehouse'))
|
cond = "warehouse = %(warehouse)s"
|
||||||
|
|
||||||
bin_data = frappe.db.sql(""" select item_code, warehouse, actual_qty from `tabBin`
|
bin_data = frappe.db.sql(""" select item_code, warehouse, actual_qty from `tabBin`
|
||||||
where actual_qty > 0 and {cond}""".format(cond=cond), as_dict=1)
|
where actual_qty > 0 and {cond}""".format(cond=cond), {
|
||||||
|
'warehouse': frappe.db.escape(pos_profile.get('warehouse'))
|
||||||
|
}, as_dict=1)
|
||||||
|
|
||||||
for bins in bin_data:
|
for bins in bin_data:
|
||||||
if bins.item_code not in itemwise_bin_data:
|
if bins.item_code not in itemwise_bin_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user