mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
[selling] [calculations] server side calculations, test cases and rounding based on currency number format
This commit is contained in:
0
patches/may_2013/__init__.py
Normal file
0
patches/may_2013/__init__.py
Normal file
10
patches/may_2013/p01_selling_net_total_export.py
Normal file
10
patches/may_2013/p01_selling_net_total_export.py
Normal 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,))
|
||||
Reference in New Issue
Block a user