patch added
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index d857c59..593a2b4 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -150,4 +150,5 @@
 erpnext.patches.v5_0.link_warehouse_with_account
 erpnext.patches.v5_0.rename_taxes_and_charges_master
 execute:frappe.delete_doc("Page", "stock-ledger")
-execute:frappe.delete_doc("Page", "stock-level")
\ No newline at end of file
+execute:frappe.delete_doc("Page", "stock-level")
+erpnext.patches.v5_0.reclculate_planned_operating_cost_in_production_order
diff --git a/erpnext/patches/v5_0/reclculate_planned_operating_cost_in_production_order.py b/erpnext/patches/v5_0/reclculate_planned_operating_cost_in_production_order.py
new file mode 100644
index 0000000..a943c06
--- /dev/null
+++ b/erpnext/patches/v5_0/reclculate_planned_operating_cost_in_production_order.py
@@ -0,0 +1,13 @@
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():					
+	for po in frappe.db.sql("""select name from `tabProduction Order` where docstatus < 2""", as_dict=1):
+		prod_order = frappe.get_doc("Production Order", po.name)
+		if prod_order.operations:
+			prod_order.flags.ignore_validate_update_after_submit = True
+			prod_order.calculate_time()
+			prod_order.save()
\ No newline at end of file