[fix] [minor] validate same sales rate patch
This commit is contained in:
parent
60d9a5e2ee
commit
67e6c80437
@ -3,11 +3,11 @@ def execute():
|
||||
webnotes.reload_doc("selling", "doctype", "selling_settings")
|
||||
ss = webnotes.bean("Selling Settings")
|
||||
|
||||
same_rate = webnotes.conn.sql("""select field, value from `tabSingles`
|
||||
where doctype = 'Global Defaults' and field = 'maintain_same_sales_rate'""")
|
||||
if same_rate:
|
||||
ss.doc.maintain_same_sales_rate = same_rate[1]
|
||||
same_rate = webnotes.conn.get_value("Global Defaults", "maintain_same_sales_rate")
|
||||
|
||||
if same_rate or same_rate == 0:
|
||||
ss.doc.maintain_same_sales_rate = same_rate
|
||||
else:
|
||||
ss.doc.maintain_same_sales_rate = 1
|
||||
|
||||
|
||||
ss.save()
|
@ -33,7 +33,6 @@ keydict = {
|
||||
'account_url':'account_url',
|
||||
'session_expiry': 'session_expiry',
|
||||
'disable_rounded_total': 'disable_rounded_total',
|
||||
'maintain_same_sales_rate' : 'maintain_same_sales_rate',
|
||||
}
|
||||
|
||||
class DocType:
|
||||
|
Loading…
x
Reference in New Issue
Block a user