Don't set currency as company currency if default currency is different (#11011)

This commit is contained in:
Nabin Hait 2017-10-02 13:20:51 +05:30 committed by GitHub
parent 8919669ac2
commit 1f10d693e9
2 changed files with 4 additions and 5 deletions

View File

@ -12,10 +12,6 @@ from erpnext.manufacturing.doctype.bom.bom import validate_bom_no
from erpnext.manufacturing.doctype.production_order.production_order import get_item_details
class ProductionPlanningTool(Document):
def __init__(self, arg1, arg2=None):
super(ProductionPlanningTool, self).__init__(arg1, arg2)
self.item_dict = {}
def clear_table(self, table_name):
self.set(table_name, [])
@ -398,6 +394,9 @@ class ProductionPlanningTool(Document):
return bom_wise_item_details
def make_items_dict(self, item_list):
if not getattr(self, "item_dict", None):
self.item_dict = {}
for i in item_list:
self.item_dict.setdefault(i[0], []).append([flt(i[1]), i[2], i[3], i[4], i[5]])

View File

@ -379,7 +379,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
var company_currency = me.get_company_currency();
var company_doc = frappe.get_doc(":Company", me.frm.doc.company);
if (!me.frm.doc.currency || me.frm.doc.currency != company_currency) {
if (!me.frm.doc.currency) {
me.frm.set_value("currency", company_currency);
}