mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 09:05:00 +00:00
fix opening invoice related authorization control - item=None (#14567)
This commit is contained in:
@@ -40,7 +40,7 @@ class AuthorizationControl(TransactionBase):
|
||||
chk = 1
|
||||
add_cond1,add_cond2 = '',''
|
||||
if based_on == 'Itemwise Discount':
|
||||
add_cond1 += " and master_name = '"+cstr(frappe.db.escape(item)).replace("'", "\\'")+"'"
|
||||
add_cond1 += " and master_name = '"+frappe.db.escape(cstr(item))+"'"
|
||||
itemwise_exists = frappe.db.sql("""select value from `tabAuthorization Rule`
|
||||
where transaction = %s and value <= %s
|
||||
and based_on = %s and company = %s and docstatus != 2 %s %s""" %
|
||||
|
||||
Reference in New Issue
Block a user