From c772b3d86a09dd4be08b39f38272419dd44f591e Mon Sep 17 00:00:00 2001 From: nabinhait Date: Tue, 22 Jul 2014 11:37:03 +0530 Subject: [PATCH 1/4] Purchase invoice: Copy project name from first row on addition of row --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index d87456d260..4f6bd08ccb 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -112,7 +112,8 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({ entries_add: function(doc, cdt, cdn) { var row = frappe.get_doc(cdt, cdn); - this.frm.script_manager.copy_from_first_row("entries", row, ["expense_account", "cost_center"]); + this.frm.script_manager.copy_from_first_row("entries", row, + ["expense_account", "cost_center", "project_name"]); }, on_submit: function() { From b5f9b5de45097ba05ce2dc58fd64d372f40bdbd9 Mon Sep 17 00:00:00 2001 From: nabinhait Date: Tue, 22 Jul 2014 11:37:53 +0530 Subject: [PATCH 2/4] PP Tool: data for required raw materials --- .../production_planning_tool.py | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py index e96dcbb038..6cee234420 100644 --- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py +++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py @@ -287,17 +287,16 @@ class ProductionPlanningTool(Document): 'Quantity Requested for Purchase', 'Ordered Qty', 'Actual Qty']] for item in self.item_dict: total_qty = sum([flt(d[0]) for d in self.item_dict[item]]) - for item_details in self.item_dict[item]: - item_list.append([item, item_details[1], item_details[2], item_details[0]]) - item_qty = frappe.db.sql("""select warehouse, indented_qty, ordered_qty, actual_qty - from `tabBin` where item_code = %s""", item, as_dict=1) - i_qty, o_qty, a_qty = 0, 0, 0 - for w in item_qty: - i_qty, o_qty, a_qty = i_qty + flt(w.indented_qty), o_qty + flt(w.ordered_qty), a_qty + flt(w.actual_qty) - item_list.append(['', '', '', '', w.warehouse, flt(w.indented_qty), - flt(w.ordered_qty), flt(w.actual_qty)]) - if item_qty: - item_list.append(['', '', '', '', 'Total', i_qty, o_qty, a_qty]) + item_list.append([item, self.item_dict[item][0][1], self.item_dict[item][0][2], total_qty]) + item_qty = frappe.db.sql("""select warehouse, indented_qty, ordered_qty, actual_qty + from `tabBin` where item_code = %s""", item, as_dict=1) + i_qty, o_qty, a_qty = 0, 0, 0 + for w in item_qty: + i_qty, o_qty, a_qty = i_qty + flt(w.indented_qty), o_qty + flt(w.ordered_qty), a_qty + flt(w.actual_qty) + item_list.append(['', '', '', '', w.warehouse, flt(w.indented_qty), + flt(w.ordered_qty), flt(w.actual_qty)]) + if item_qty: + item_list.append(['', '', '', '', 'Total', i_qty, o_qty, a_qty]) return item_list From 3c78ab5841297f584fe5d1de1ce6e64af3cff6e2 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 23 Jul 2014 10:19:31 +0530 Subject: [PATCH 3/4] [email digest] [fix] [hot] only open to-do items --- erpnext/setup/doctype/email_digest/email_digest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py index 066e3b5433..8b17ca3c87 100644 --- a/erpnext/setup/doctype/email_digest/email_digest.py +++ b/erpnext/setup/doctype/email_digest/email_digest.py @@ -312,7 +312,7 @@ class EmailDigest(Document): def get_todo_list(self, user_id): todo_list = frappe.db.sql("""select * - from `tabToDo` where (owner=%s or assigned_by=%s) + from `tabToDo` where (owner=%s or assigned_by=%s) and status="Open" order by field(priority, 'High', 'Medium', 'Low') asc, date asc""", (user_id, user_id), as_dict=True) From 92c043423e684b7161bfc7e108788ae7a9793870 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 23 Jul 2014 15:57:01 +0530 Subject: [PATCH 4/4] updated bench --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8ad696ea40..ce15e84a90 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ ERPNext is built on [frappe](https://github.com/frappe/frappe) --- -### Development install +### Install -Use the bench, https://github.com/frappe/frappe-bench. +Use the bench, https://github.com/frappe/bench ### Admin Login