From 1c32f5ace93ec5a1850c5b77ca65c761b9f9d097 Mon Sep 17 00:00:00 2001 From: bcornwellmott Date: Mon, 24 Jul 2017 10:13:44 -0700 Subject: [PATCH 1/3] Whitelist method for adding production orders ops (#9997) --- .../doctype/production_order/production_order.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py index 040a5592f9..8506c18071 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.py +++ b/erpnext/manufacturing/doctype/production_order/production_order.py @@ -510,6 +510,12 @@ def check_if_scrap_warehouse_mandatory(bom_no): return res +@frappe.whitelist() +def set_production_order_ops(name): + po = frappe.get_doc('Production Order', name) + po.set_production_order_operations() + po.save() + @frappe.whitelist() def make_stock_entry(production_order_id, purpose, qty=None): production_order = frappe.get_doc("Production Order", production_order_id) From baa937aa52514d08c6610890a2089477a353a96e Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 25 Jul 2017 15:26:01 +0530 Subject: [PATCH 2/3] [Fix] Negative amount showing in the grand total for multicurrency if discount has applied --- erpnext/public/js/controllers/taxes_and_totals.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 3a010c6022..a54f30de58 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -40,8 +40,10 @@ erpnext.taxes_and_totals = erpnext.payments.extend({ }, calculate_discount_amount: function(){ - if (frappe.meta.get_docfield(this.frm.doc.doctype, "discount_amount")) + if (frappe.meta.get_docfield(this.frm.doc.doctype, "discount_amount")) { + this.set_discount_amount(); this.apply_discount_amount(); + } }, _calculate_taxes_and_totals: function() { @@ -451,6 +453,13 @@ erpnext.taxes_and_totals = erpnext.payments.extend({ } }, + set_discount_amount: function() { + if(this.frm.doc.additional_discount_percentage) { + this.frm.doc.discount_amount = flt(flt(this.frm.doc[frappe.scrub(this.frm.doc.apply_discount_on)]) + * this.frm.doc.additional_discount_percentage / 100, precision("discount_amount")); + } + }, + apply_discount_amount: function() { var me = this; var distributed_amount = 0.0; From e7c14fcc3d8bcdbf7f77cd4d7ca108d29ed11f2b Mon Sep 17 00:00:00 2001 From: Saurabh Date: Tue, 25 Jul 2017 16:45:49 +0600 Subject: [PATCH 3/3] bumped to version 8.5.5 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index ccb71bcdce..f1e5fa0dfb 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '8.5.4' +__version__ = '8.5.5' def get_default_company(user=None): '''Get default company for user'''