From 93344dff2675684d827c48cb40189ac66b0d3878 Mon Sep 17 00:00:00 2001 From: Zlash65 Date: Fri, 19 Jan 2018 19:06:39 +0530 Subject: [PATCH 1/8] group_by_account not displayed fix --- erpnext/accounts/report/general_ledger/general_ledger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 72fe793582..b6b26b1eed 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -238,7 +238,7 @@ def get_result_as_list(data, filters): inv_details = get_supplier_invoice_details() for d in data: - if not d.posting_date: + if not d.get('posting_date'): balance, balance_in_account_currency = 0, 0 balance, label = get_balance(d, balance, 'debit', 'credit') @@ -254,7 +254,7 @@ def get_result_as_list(data, filters): d['balance_in_account_currency'] = d.get('balance') d['account_currency'] = filters.account_currency - d['bill_no'] = inv_details.get(d.against_voucher, '') + d['bill_no'] = inv_details.get(d.get('against_voucher'), '') return data From edef642794215834da8aa82782ccf85fc9cf12f2 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sat, 20 Jan 2018 12:54:25 +0530 Subject: [PATCH 2/8] Added currency in balance column in general ledger print --- .../accounts/report/general_ledger/general_ledger.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.html b/erpnext/accounts/report/general_ledger/general_ledger.html index 83325aabed..90e8059376 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.html +++ b/erpnext/accounts/report/general_ledger/general_ledger.html @@ -17,12 +17,12 @@ - + - + @@ -76,9 +76,11 @@ {% } %} {% } %} {% if(filters.print_in_account_currency) { %} - + {% } else { %} - + {% } %} {% } %} From f83f6aae2282bff767cdb97557875bcbdfff0c9b Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sat, 20 Jan 2018 15:44:38 +0530 Subject: [PATCH 3/8] [Fix] Wrong projected qty for warehouse group in the process of reorder item making extra material requests --- erpnext/stock/reorder_item.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py index 456b43482a..1578bb68ce 100644 --- a/erpnext/stock/reorder_item.py +++ b/erpnext/stock/reorder_item.py @@ -85,18 +85,22 @@ def get_item_warehouse_projected_qty(items_to_consider): from tabBin where item_code in ({0}) and (warehouse != "" and warehouse is not null)"""\ .format(", ".join(["%s"] * len(items_to_consider))), items_to_consider): - - item_warehouse_projected_qty.setdefault(item_code, {})[warehouse] = flt(projected_qty) - + + if item_code not in item_warehouse_projected_qty: + item_warehouse_projected_qty.setdefault(item_code, {}) + + if warehouse not in item_warehouse_projected_qty.get(item_code): + item_warehouse_projected_qty[item_code][warehouse] = flt(projected_qty) + warehouse_doc = frappe.get_doc("Warehouse", warehouse) - + while warehouse_doc.parent_warehouse: if not item_warehouse_projected_qty.get(item_code, {}).get(warehouse_doc.parent_warehouse): item_warehouse_projected_qty.setdefault(item_code, {})[warehouse_doc.parent_warehouse] = flt(projected_qty) else: item_warehouse_projected_qty[item_code][warehouse_doc.parent_warehouse] += flt(projected_qty) warehouse_doc = frappe.get_doc("Warehouse", warehouse_doc.parent_warehouse) - + return item_warehouse_projected_qty def create_material_request(material_requests): From bc9491433899321422e03b7ee771d1d412a509c6 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sat, 20 Jan 2018 17:01:31 +0530 Subject: [PATCH 4/8] [Fix] Sales payment summary issue --- .../report/sales_payment_summary/sales_payment_summary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py index 6ad36f67d6..c2b145683d 100644 --- a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py +++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py @@ -37,7 +37,7 @@ def get_sales_payment_data(filters, columns): def get_conditions(filters): conditions = "1=1" - if filters.get("from_date"): conditions += "a.posting_date >= %(from_date)s" + if filters.get("from_date"): conditions += " and a.posting_date >= %(from_date)s" if filters.get("to_date"): conditions += " and a.posting_date <= %(to_date)s" if filters.get("company"): conditions += " and a.company=%(company)s" if filters.get("customer"): conditions += " and a.customer = %(customer)s" From 8676590cfe2cfd974f9afe225a2bfeee7915ec39 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 22 Jan 2018 12:22:10 +0530 Subject: [PATCH 5/8] [Fix] Income account can not be group --- erpnext/setup/doctype/company/company.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index ac7c830675..c0e90e04fd 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -162,8 +162,14 @@ class Company(Document): self._set_default_account("default_expense_account", "Cost of Goods Sold") if not self.default_income_account: - self.db_set("default_income_account", frappe.db.get_value("Account", - {"account_name": _("Sales"), "company": self.name})) + income_account = frappe.db.get_value("Account", + {"account_name": _("Sales"), "company": self.name, "is_group": 0}) + + if not income_account: + income_account = frappe.db.get_value("Account", + {"account_name": _("Sales Account"), "company": self.name}) + + self.db_set("default_income_account", income_account) if not self.default_payable_account: self.db_set("default_payable_account", self.default_payable_account) From 39adc8f85fd47992c9078d1bb4f89cb991025794 Mon Sep 17 00:00:00 2001 From: Shreya Date: Mon, 22 Jan 2018 13:08:05 +0530 Subject: [PATCH 6/8] calculate total when items are removed --- erpnext/public/js/controllers/transaction.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 9ee82d2118..d290c92eaf 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -648,6 +648,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ } }).fail(() => this.frm.set_value('shipping_rule', '')); } + else { + me.calculate_taxes_and_totals(); + } }, set_actual_charges_based_on_currency: function() { From c4c2bf0bfba3c6ea1b27b6faeeadaddebc66f5ab Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 22 Jan 2018 13:47:28 +0530 Subject: [PATCH 7/8] [Fix] Image patch showing in the item link --- erpnext/controllers/queries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index cd74fb5717..53f9ecb986 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -152,7 +152,7 @@ def tax_account_query(doctype, txt, searchfield, start, page_len, filters): def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=False): conditions = [] - return frappe.db.sql("""select tabItem.name, tabItem.item_group, tabItem.image, + return frappe.db.sql("""select tabItem.name, tabItem.item_group, if(length(tabItem.item_name) > 40, concat(substr(tabItem.item_name, 1, 40), "..."), item_name) as item_name, if(length(tabItem.description) > 40, \ From b9f678b350a5ce6fb93e85efc4d72a78264f5197 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 22 Jan 2018 15:59:14 +0600 Subject: [PATCH 8/8] bumped to version 10.0.13 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 4beb35b454..24de2c6971 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '10.0.12' +__version__ = '10.0.13' def get_default_company(user=None): '''Get default company for user'''
{%= __("Date") %}{%= __("Date") %} {%= __("Ref") %} {%= __("Party") %} {%= __("Debit") %} {%= __("Credit") %}{%= __("Balance") %}{%= __("Balance") %}
{%= data[i].balance_in_account_currency %}{%= get_currency_symbol(data[i].account_currency)%} + {%= data[i].balance_in_account_currency %}{%= data[i].balance %}{%= get_currency_symbol()%} + {%= data[i].balance %}