Merge remote-tracking branch 'webnotes/develop' into 4.0.0-wip

Conflicts:
	config.json
	erpnext/accounts/utils.py
	erpnext/patches/patch_list.py
	erpnext/stock/doctype/price_list/price_list.txt
	erpnext/stock/doctype/warehouse/warehouse.py
	portal/templates/sale.html
	portal/utils.py
	selling/doctype/sales_order/templates/pages/order.py
	selling/utils/cart.py
	selling/utils/product.py
	utilities/demo/demo_docs/Fiscal_Year.csv
	utilities/demo/make_demo.py
This commit is contained in:
Anand Doshi
2014-01-24 21:44:36 +05:30
20 changed files with 147 additions and 90 deletions

View File

@@ -379,3 +379,12 @@ def get_account_for(account_for_doctype, account_for):
return webnotes.conn.get_value("Account", {account_for_field: account_for_doctype,
"master_name": account_for})
def get_currency_precision(currency=None):
if not currency:
currency = webnotes.conn.get_value("Company",
webnotes.conn.get_default("company"), "default_currency")
currency_format = webnotes.conn.get_value("Currency", currency, "number_format")
from webnotes.utils import get_number_format_info
return get_number_format_info(currency_format)[2]