[selling] [calculations] server side calculations, test cases and rounding based on currency number format

This commit is contained in:
Anand Doshi
2013-05-10 18:08:32 +05:30
parent b8b1e58c4d
commit 21f4ea36b2
13 changed files with 843 additions and 69 deletions

View File

View File

@@ -0,0 +1,10 @@
from __future__ import unicode_literals
import webnotes
def execute():
for module, doctype in (("Accounts", "Sales Invoice"), ("Selling", "Sales Order"), ("Selling", "Quotation"),
("Stock", "Delivery Note")):
webnotes.reload_doc(module, "DocType", doctype)
webnotes.conn.sql("""update `tab%s`
set net_total_export = round(net_total / if(conversion_rate=0, 1, ifnull(conversion_rate, 1)), 2)""" %
(doctype,))