From 29a0b31ca675731c35c79370d393c7a20d5e3e96 Mon Sep 17 00:00:00 2001 From: Umair Sayed Date: Thu, 29 Sep 2016 16:25:04 +0530 Subject: [PATCH 1/9] Update sales_partner.js --- erpnext/setup/doctype/sales_partner/sales_partner.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.js b/erpnext/setup/doctype/sales_partner/sales_partner.js index cb66b7f9cb..143bf442d3 100644 --- a/erpnext/setup/doctype/sales_partner/sales_partner.js +++ b/erpnext/setup/doctype/sales_partner/sales_partner.js @@ -12,9 +12,3 @@ cur_frm.cscript.refresh = function(doc,dt,dn){ erpnext.utils.render_address_and_contact(cur_frm); } } - -cur_frm.fields_dict['targets'].grid.get_field("item_group").get_query = function(doc, dt, dn) { - return{ - filters:{ 'is_group': 0 } - } -} From 1d0b18661e764e69189f10e25af3555b98c1b37e Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 29 Sep 2016 18:55:45 +0530 Subject: [PATCH 2/9] [Fix] Minor changes in warranty claim --- erpnext/support/doctype/warranty_claim/warranty_claim.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/support/doctype/warranty_claim/warranty_claim.js b/erpnext/support/doctype/warranty_claim/warranty_claim.js index cf9d806fdd..9fed265ed0 100644 --- a/erpnext/support/doctype/warranty_claim/warranty_claim.js +++ b/erpnext/support/doctype/warranty_claim/warranty_claim.js @@ -37,7 +37,7 @@ $.extend(cur_frm.cscript, new erpnext.support.WarrantyClaim({frm: cur_frm})); cur_frm.cscript.onload = function(doc,cdt,cdn){ if(!doc.status) - set_multiple(dt,dn,{status:'Open'}); + set_multiple(cdt,cdn,{status:'Open'}); } cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) { From c1a3e379d8775c13f5d69262d887225b9f190219 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 30 Sep 2016 13:18:06 +0530 Subject: [PATCH 3/9] [Fixed] Accounts receivable concat issue --- .../report/accounts_receivable/accounts_receivable.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index db811cfe48..68d3cf492b 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -53,9 +53,10 @@ class ReceivablePayableReport(object): self.filters["range3"] = "90" for label in ("0-{range1}".format(range1=self.filters["range1"]), - "{range1}-{range2}".format(range1=self.filters["range1"]+1, range2=self.filters["range2"]), - "{range2}-{range3}".format(range2=self.filters["range2"]+1, range3=self.filters["range3"]), - "{range3}-{above}".format(range3=self.filters["range3"] + 1, above=_("Above"))): + "{range1}-{range2}".format(range1=cint(self.filters["range1"])+ 1, range2=self.filters["range2"]), + "{range2}-{range3}".format(range2=cint(self.filters["range2"])+ 1, range3=self.filters["range3"]), + "{range3}-{above}".format(range3=cint(self.filters["range3"])+ 1, above=_("Above"))): + frappe.errprint(label) columns.append({ "label": label, "fieldtype": "Currency", From 74bf02227326c20a3cae4b36f1c017c9a0290c16 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 30 Sep 2016 18:35:48 +0530 Subject: [PATCH 4/9] [Fix] Purchase receipt title issue --- erpnext/stock/doctype/material_request/material_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index 0be2baee0c..06df636cd7 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -75,7 +75,7 @@ class MaterialRequest(BuyingController): pc_obj = frappe.get_doc('Purchase Common') pc_obj.validate_for_items(self) - self.set_title() + # self.set_title() # self.validate_qty_against_so() From b498eb5f9e245ce42a6037cdbab3c4f8099dcc97 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Sat, 1 Oct 2016 15:51:59 +0530 Subject: [PATCH 5/9] Minor fix AR/AP --- .../report/accounts_receivable/accounts_receivable.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 68d3cf492b..ce7f7fc71b 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -94,9 +94,10 @@ class ReceivablePayableReport(object): data = [] for gle in self.get_entries_till(self.filters.report_date, args.get("party_type")): if self.is_receivable_or_payable(gle, dr_or_cr, future_vouchers): - outstanding_amount = self.get_outstanding_amount(gle, self.filters.report_date, dr_or_cr) + outstanding_amount = flt(self.get_outstanding_amount(gle, + self.filters.report_date, dr_or_cr), currency_precision) + if abs(outstanding_amount) > 0.1/10**currency_precision: - row = [gle.posting_date, gle.party] # customer / supplier name @@ -228,7 +229,7 @@ class ReceivablePayableReport(object): account_currency, remarks, {0} from `tabGL Entry` where docstatus < 2 and party_type=%s and (party is not null and party != '') {1} - group by voucher_type, voucher_no, against_voucher_type, against_voucher + group by voucher_type, voucher_no, against_voucher_type, against_voucher, party order by posting_date, party""" .format(select_fields, conditions), values, as_dict=True) From 6f3d04caf72298acb3b0c07a23f063d8fee4ecc5 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 3 Oct 2016 11:46:04 +0530 Subject: [PATCH 6/9] [Fix] Disable apply discount on --- erpnext/accounts/doctype/sales_invoice/pos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py index 5336b5452c..062c6cd36f 100644 --- a/erpnext/accounts/doctype/sales_invoice/pos.py +++ b/erpnext/accounts/doctype/sales_invoice/pos.py @@ -66,7 +66,7 @@ def update_pos_profile_data(doc, pos_profile, company_data): doc.naming_series = pos_profile.get('naming_series') or 'SINV-' doc.letter_head = pos_profile.get('letter_head') or company_data.default_letter_head doc.ignore_pricing_rule = pos_profile.get('ignore_pricing_rule') or 0 - doc.apply_discount_on = pos_profile.get('apply_discount_on') or '' + doc.apply_discount_on = pos_profile.get('apply_discount_on') if pos_profile.get('apply_discount') else '' doc.customer_group = pos_profile.get('customer_group') or get_root('Customer Group') doc.territory = pos_profile.get('territory') or get_root('Territory') From b1391ca635b3800447dab3c171775cb68ad58748 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 3 Oct 2016 12:25:04 +0530 Subject: [PATCH 7/9] [Fix] company key error during cancellation of stock entry --- erpnext/accounts/general_ledger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 4af197e42c..392902c935 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -168,8 +168,8 @@ def delete_gl_entries(gl_entries=None, voucher_type=None, voucher_no=None, if not gl_entries: gl_entries = frappe.db.sql(""" - select account, posting_date, party_type, party, cost_center, fiscal_year, - voucher_type, voucher_no, against_voucher_type, against_voucher, cost_center + select account, posting_date, party_type, party, cost_center, fiscal_year,voucher_type, + voucher_no, against_voucher_type, against_voucher, cost_center, company from `tabGL Entry` where voucher_type=%s and voucher_no=%s""", (voucher_type, voucher_no), as_dict=True) From 4f62c4cf2d0625613d3fd6bac7c5bf8fae0ed47c Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 3 Oct 2016 12:48:25 +0530 Subject: [PATCH 8/9] [minor][fix] for condition maker --- erpnext/controllers/trends.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/trends.py b/erpnext/controllers/trends.py index 080d7499aa..d991c15b0d 100644 --- a/erpnext/controllers/trends.py +++ b/erpnext/controllers/trends.py @@ -49,10 +49,10 @@ def get_data(filters, conditions): posting_date = 't1.posting_date' if conditions["based_on_select"] in ["t1.project,", "t2.project,"]: - cond = 'and '+ conditions["based_on_select"][:-1] +' IS Not NULL' + cond = ' and '+ conditions["based_on_select"][:-1] +' IS Not NULL' if conditions.get('trans') in ['Sales Order', 'Purchase Order']: - cond += "and t1.status != 'Closed'" + cond += " and t1.status != 'Closed'" year_start_date, year_end_date = frappe.db.get_value("Fiscal Year", filters.get('fiscal_year'), ["year_start_date", "year_end_date"]) From e7e920b487429e3d7e25573300f5c298266bc580 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 3 Oct 2016 14:42:53 +0600 Subject: [PATCH 9/9] bumped to version 7.0.52 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index bec17c1f0b..d41c074ebe 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import frappe -__version__ = '7.0.51' +__version__ = '7.0.52' def get_default_company(user=None): '''Get default company for user'''