2013-11-20 07:29:58 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
2013-08-05 09:29:54 +00:00
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
2013-07-18 06:58:09 +00:00
|
|
|
def execute():
|
|
|
|
import webnotes
|
|
|
|
webnotes.reload_doc("selling", "doctype", "selling_settings")
|
|
|
|
ss = webnotes.bean("Selling Settings")
|
|
|
|
|
2013-07-18 07:55:47 +00:00
|
|
|
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
|
2013-07-18 06:58:09 +00:00
|
|
|
else:
|
|
|
|
ss.doc.maintain_same_sales_rate = 1
|
2013-07-18 07:55:47 +00:00
|
|
|
|
2013-07-18 06:58:09 +00:00
|
|
|
ss.save()
|