From 315a5e1b4d94bf0948cec55a5256a12e0ec2fcce Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 11 Aug 2016 00:35:00 +0530 Subject: [PATCH 1/5] [Fix] Debit and credit not equal for purchase invoice, if update stock is yes and taxes is defined --- .../doctype/purchase_invoice/purchase_invoice.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index d17e80f7577..38cef3134ed 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -497,6 +497,18 @@ class PurchaseInvoice(BuyingController): i += 1 + if self.update_stock and valuation_tax: + for cost_center, amount in valuation_tax.items(): + gl_entries.append( + self.get_gl_dict({ + "account": self.expenses_included_in_valuation, + "cost_center": cost_center, + "against": self.supplier, + "credit": amount, + "remarks": self.remarks or "Accounting Entry for Stock" + }) + ) + def make_payment_gl_entries(self, gl_entries): # Make Cash GL Entries if cint(self.is_paid) and self.cash_bank_account and self.paid_amount: From e78ef5f8c8b91b41cd856549c1213f12dec67889 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 11 Aug 2016 00:46:15 +0530 Subject: [PATCH 2/5] [Fix] No permission to read DocType for account user in bank reconciliation statement report --- .../bank_reconciliation_statement.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py index 76e0de2b942..8ed338efe1c 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py @@ -55,14 +55,6 @@ def get_columns(): "fieldtype": "Date", "width": 90 }, - { - "fieldname": "payment_document", - "label": _("Payment Document"), - "fieldtype": "Link", - "options": "DocType", - "width": 120, - "hidden": 1 - }, { "fieldname": "payment_entry", "label": _("Payment Entry"), From 730f3e7abae1ceb7d6a3989bf93fbad5d49b3c31 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 11 Aug 2016 17:17:16 +0530 Subject: [PATCH 3/5] [minor] remove validation #4904 --- .../doctype/stock_reconciliation/stock_reconciliation.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 82b7e11e390..0f5cb96e2ac 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -78,10 +78,6 @@ class StockReconciliation(StockController): default_currency = frappe.db.get_default("currency") - # validate no of rows - if len(self.items) > 100: - frappe.throw(_("""Max 100 rows for Stock Reconciliation.""")) - for row_num, row in enumerate(self.items): # find duplicates if [row.item_code, row.warehouse] in item_warehouse_combinations: From d643f2b2493c183ac8d01c4853aa86856e6199e9 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 12 Aug 2016 10:36:59 +0530 Subject: [PATCH 4/5] [minor] fixes #6074; --- erpnext/projects/doctype/project/project.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index f5ff2de3f9b..bdf3c3bd1f9 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -18,8 +18,10 @@ class Project(Document): if not self.get('__unsaved') and not self.get("tasks"): self.load_tasks() - self.set_onload('activity_summary', frappe.db.sql('''select activity_type, sum(hours) as total_hours - from `tabTimesheet Detail` where project=%s group by activity_type order by total_hours desc''', self.name, as_dict=True)) + self.set_onload('activity_summary', frappe.db.sql('''select activity_type, + sum(hours) as total_hours + from `tabTimesheet Detail` where project=%s and docstatus < 2 group by activity_type + order by total_hours desc''', self.name, as_dict=True)) def __setup__(self): self.onload() @@ -187,12 +189,12 @@ def get_list_context(context=None): "row_template": "templates/includes/projects/project_row.html" } -def get_users_for_project(doctype, txt, searchfield, start, page_len, filters): +def get_users_for_project(doctype, txt, searchfield, start, page_len, filters): return frappe.db.sql("""select name, concat_ws(' ', first_name, middle_name, last_name) - from `tabUser` - where enabled=1 + from `tabUser` + where enabled=1 and name not in ("Guest", "Administrator") - order by + order by name asc""") @frappe.whitelist() From 3f22ec9536f7bbbd2dfa1f1ac437761097ddc463 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 12 Aug 2016 12:23:08 +0600 Subject: [PATCH 5/5] bumped to version 7.0.27 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 97b7c373af6..9dcd02912ff 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import frappe -__version__ = '7.0.26' +__version__ = '7.0.27' def get_default_company(user=None): '''Get default company for user'''