From 059f99e621fd3e5daf577f69661083319a502afa Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 27 Jul 2017 11:37:30 +0530 Subject: [PATCH 1/6] [Fix] Wrong avg. buying rate in the Gross Profit report (#10110) --- erpnext/accounts/report/gross_profit/gross_profit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 20939bdf89..e2106e2d62 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -209,7 +209,10 @@ class GrossProfitGenerator(object): sle.voucher_detail_no == row.item_row: previous_stock_value = len(my_sle) > i+1 and \ flt(my_sle[i+1].stock_value) or 0.0 - return previous_stock_value - flt(sle.stock_value) + if previous_stock_value: + return previous_stock_value - flt(sle.stock_value) + else: + return flt(row.qty) * self.get_average_buying_rate(row, item_code) else: return flt(row.qty) * self.get_average_buying_rate(row, item_code) From 87ec6a12ef2057ca37020c5dd2153bc0526154bc Mon Sep 17 00:00:00 2001 From: tundebabzy Date: Thu, 27 Jul 2017 07:08:17 +0100 Subject: [PATCH 2/6] adds options to currency fields (#10118) --- .../repayment_schedule.json | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/doctype/repayment_schedule/repayment_schedule.json b/erpnext/hr/doctype/repayment_schedule/repayment_schedule.json index 3a0dfd3d55..14091b9a58 100644 --- a/erpnext/hr/doctype/repayment_schedule/repayment_schedule.json +++ b/erpnext/hr/doctype/repayment_schedule/repayment_schedule.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, "beta": 0, @@ -12,6 +13,7 @@ "engine": "InnoDB", "fields": [ { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -22,6 +24,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Payment Date", @@ -40,6 +43,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -50,11 +54,13 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Principal Amount", "length": 0, "no_copy": 1, + "options": "Company:company:default_currency", "permlevel": 0, "precision": "", "print_hide": 0, @@ -68,6 +74,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -78,11 +85,13 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Interest Amount", "length": 0, "no_copy": 1, + "options": "Company:company:default_currency", "permlevel": 0, "precision": "", "print_hide": 0, @@ -96,6 +105,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -106,11 +116,13 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Total Payment", "length": 0, "no_copy": 0, + "options": "Company:company:default_currency", "permlevel": 0, "precision": "", "print_hide": 0, @@ -124,6 +136,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -134,11 +147,13 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Balance Loan Amount", "length": 0, "no_copy": 1, + "options": "Company:company:default_currency", "permlevel": 0, "precision": "", "print_hide": 0, @@ -152,17 +167,17 @@ "unique": 0 } ], + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 0, "idx": 0, "image_view": 0, "in_create": 0, - "in_dialog": 0, "is_submittable": 0, "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2017-01-09 12:00:10.818772", + "modified": "2017-07-26 14:47:29.862084", "modified_by": "Administrator", "module": "HR", "name": "Repayment Schedule", @@ -172,6 +187,7 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", "track_changes": 1, From 448d919cc1f6ddca1ade8237dfa56f496f0f9ca5 Mon Sep 17 00:00:00 2001 From: mbauskar Date: Thu, 27 Jul 2017 12:48:15 +0600 Subject: [PATCH 3/6] bumped to version 8.6.2 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 2d4f94e5dc..f5c1fbec4c 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.6.1' +__version__ = '8.6.2' def get_default_company(user=None): '''Get default company for user''' From 9c6e2c3637d2b9dfb7cb785c9ccab5e06f91cb16 Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Thu, 27 Jul 2017 16:23:57 +0530 Subject: [PATCH 4/6] [hotfix] included the get_purchase_trends_filters instead of get_sales_trends_filters in Purchase Receipts trends (#10127) --- .../report/purchase_receipt_trends/purchase_receipt_trends.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.js b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.js index 63d53fbfb0..d16485e8cc 100644 --- a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.js +++ b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.js @@ -3,7 +3,7 @@ frappe.require("assets/erpnext/js/purchase_trends_filters.js", function() { frappe.query_reports["Purchase Receipt Trends"] = { - filters: erpnext.get_sales_trends_filters() + filters: erpnext.get_purchase_trends_filters() } }); From 145393b12f55832ff5d599c6b2dbbbdb93e961d0 Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Thu, 27 Jul 2017 16:46:40 +0530 Subject: [PATCH 5/6] [hotfix] set the account name in GL entry instead of warehouse (#10134) --- erpnext/stock/doctype/purchase_receipt/purchase_receipt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index f60eb6aa7c..0444369ff3 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -225,7 +225,7 @@ class PurchaseReceipt(BuyingController): # sub-contracting warehouse if flt(d.rm_supp_cost) and warehouse_account.get(self.supplier_warehouse): gl_entries.append(self.get_gl_dict({ - "account": warehouse_account[self.supplier_warehouse]["name"], + "account": warehouse_account[self.supplier_warehouse]["account"], "against": warehouse_account[d.warehouse]["account"], "cost_center": d.cost_center, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), From 6f9ef5b89018e55335370d813d78330c4bc0456e Mon Sep 17 00:00:00 2001 From: Saurabh Date: Thu, 27 Jul 2017 18:20:27 +0600 Subject: [PATCH 6/6] bumped to version 8.6.3 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index f5c1fbec4c..b0692038f8 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.6.2' +__version__ = '8.6.3' def get_default_company(user=None): '''Get default company for user'''