2013-07-18 06:58:09 +00:00
|
|
|
def execute():
|
|
|
|
import webnotes
|
|
|
|
webnotes.reload_doc("selling", "doctype", "selling_settings")
|
|
|
|
ss = webnotes.bean("Selling Settings")
|
|
|
|
|
|
|
|
same_rate = webnotes.conn.sql("""select field, value from `tabSingles`
|
2013-07-18 07:00:30 +00:00
|
|
|
where doctype = 'Global Defaults' and field = 'maintain_same_sales_rate'""")
|
2013-07-18 06:58:09 +00:00
|
|
|
if same_rate:
|
|
|
|
ss.doc.maintain_same_sales_rate = same_rate[1]
|
|
|
|
else:
|
|
|
|
ss.doc.maintain_same_sales_rate = 1
|
|
|
|
|
|
|
|
ss.save()
|