Get POS profile fix
This commit is contained in:
parent
731efe3a95
commit
c469f2c954
@ -327,11 +327,10 @@ def get_pos_profile_item_details(company, args, pos_profile=None):
|
|||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_pos_profile(company):
|
def get_pos_profile(company):
|
||||||
condition = "and company = '%s'"%(company) if company else ''
|
|
||||||
pos_profile = frappe.db.sql("""select * from `tabPOS Profile` where user = %s
|
pos_profile = frappe.db.sql("""select * from `tabPOS Profile` where user = %s
|
||||||
{cond}""".format(cond=condition), (frappe.session['user']), as_dict=1)
|
and company = %s""", (frappe.session['user'], company), as_dict=1)
|
||||||
|
|
||||||
if not pos_profile and company:
|
if not pos_profile:
|
||||||
pos_profile = frappe.db.sql("""select * from `tabPOS Profile`
|
pos_profile = frappe.db.sql("""select * from `tabPOS Profile`
|
||||||
where ifnull(user,'') = '' and company = %s""", company, as_dict=1)
|
where ifnull(user,'') = '' and company = %s""", company, as_dict=1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user