From f40ce616a71e8064a529f6552bfcc9f8f94ae43b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 2 Jan 2015 14:36:46 +0530 Subject: [PATCH 1/7] In stock entry, difference account can be non-profit-and-loss account --- erpnext/controllers/stock_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 0a9adc0e05..754a7d8ad7 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -167,7 +167,7 @@ class StockController(AccountsController): else: is_expense_account = frappe.db.get_value("Account", item.get("expense_account"), "report_type")=="Profit and Loss" - if self.doctype not in ("Purchase Receipt", "Stock Reconciliation") and not is_expense_account: + if self.doctype not in ("Purchase Receipt", "Stock Reconciliation", "Stock Entry") and not is_expense_account: frappe.throw(_("Expense / Difference account ({0}) must be a 'Profit or Loss' account") .format(item.get("expense_account"))) if is_expense_account and not item.get("cost_center"): From 0938b5dec618db231c5fed256d99807a17364634 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 2 Jan 2015 15:12:30 +0530 Subject: [PATCH 2/7] FG item and raw material can not be merged --- erpnext/stock/doctype/item/item.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index b8a31909ce..366e8282f1 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -229,7 +229,7 @@ class Item(WebsiteGenerator): if not frappe.db.exists("Item", newdn): frappe.throw(_("Item {0} does not exist").format(newdn)) - field_list = ["stock_uom", "is_stock_item", "has_serial_no", "has_batch_no"] + field_list = ["stock_uom", "is_stock_item", "has_serial_no", "has_batch_no", "is_manufactured_item"] new_properties = [cstr(d) for d in frappe.db.get_value("Item", newdn, field_list)] if new_properties != [cstr(self.get(fld)) for fld in field_list]: frappe.throw(_("To merge, following properties must be same for both items") From 8a0031996228eae6f82088b74c738a41c47d45e5 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Sun, 4 Jan 2015 17:27:40 +0530 Subject: [PATCH 3/7] minor fix --- erpnext/buying/doctype/purchase_common/purchase_common.js | 3 ++- erpnext/controllers/buying_controller.py | 3 ++- erpnext/controllers/selling_controller.py | 3 ++- erpnext/selling/sales_common.js | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js index 3681081c95..9866742355 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.js +++ b/erpnext/buying/doctype/purchase_common/purchase_common.js @@ -211,7 +211,8 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ var tax_count = this.frm.tax_doclist.length; this.frm.doc.grand_total = flt(tax_count ? this.frm.tax_doclist[tax_count - 1].total : this.frm.doc.net_total); - this.frm.doc.grand_total_import = flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate); + this.frm.doc.grand_total_import = flt(tax_count ? + flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate) : this.frm.doc.net_total_import; this.frm.doc.total_tax = flt(this.frm.doc.grand_total - this.frm.doc.net_total, precision("total_tax")); diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 1e6e65d86b..f7b5a87d56 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -111,7 +111,8 @@ class BuyingController(StockController): def calculate_totals(self): self.grand_total = flt(self.tax_doclist[-1].total if self.tax_doclist else self.net_total) - self.grand_total_import = flt(self.grand_total / self.conversion_rate) + self.grand_total_import = flt(self.grand_total / self.conversion_rate) \ + if self.tax_doclist else self.net_total_import self.total_tax = flt(self.grand_total - self.net_total, self.precision("total_tax")) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 6e93c30797..68cdf189bd 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -218,7 +218,8 @@ class SellingController(StockController): def calculate_totals(self): self.grand_total = flt(self.tax_doclist[-1].total if self.tax_doclist else self.net_total) - self.grand_total_export = flt(self.grand_total / self.conversion_rate) + self.grand_total_export = flt(self.grand_total / self.conversion_rate) \ + if self.tax_doclist else self.net_total_export self.other_charges_total = flt(self.grand_total - self.net_total, self.precision("other_charges_total")) diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index 783474c75f..f6d811159c 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -342,7 +342,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ var tax_count = this.frm.tax_doclist.length; this.frm.doc.grand_total = flt(tax_count ? this.frm.tax_doclist[tax_count - 1].total : this.frm.doc.net_total); - this.frm.doc.grand_total_export = flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate); + this.frm.doc.grand_total_export = flt(tax_count ? + flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate) : this.frm.doc.net_total_export; this.frm.doc.other_charges_total = flt(this.frm.doc.grand_total - this.frm.doc.net_total, precision("other_charges_total")); From 5515b1ea7f8015fdfaac7e7ce5375755b301eba4 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 5 Jan 2015 08:18:15 +0530 Subject: [PATCH 4/7] minor fix --- erpnext/buying/doctype/purchase_common/purchase_common.js | 2 +- erpnext/selling/sales_common.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js index 9866742355..3011160639 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.js +++ b/erpnext/buying/doctype/purchase_common/purchase_common.js @@ -212,7 +212,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ this.frm.doc.grand_total = flt(tax_count ? this.frm.tax_doclist[tax_count - 1].total : this.frm.doc.net_total); this.frm.doc.grand_total_import = flt(tax_count ? - flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate) : this.frm.doc.net_total_import; + flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate) : this.frm.doc.net_total_import); this.frm.doc.total_tax = flt(this.frm.doc.grand_total - this.frm.doc.net_total, precision("total_tax")); diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index f6d811159c..c7c21fdda9 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -343,7 +343,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ this.frm.doc.grand_total = flt(tax_count ? this.frm.tax_doclist[tax_count - 1].total : this.frm.doc.net_total); this.frm.doc.grand_total_export = flt(tax_count ? - flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate) : this.frm.doc.net_total_export; + flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate) : this.frm.doc.net_total_export); this.frm.doc.other_charges_total = flt(this.frm.doc.grand_total - this.frm.doc.net_total, precision("other_charges_total")); From e24365f1f42ffff494b5d651fa7618e5d9d014a6 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 6 Jan 2015 12:56:37 +0530 Subject: [PATCH 5/7] message fix --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index f6d47dd420..02fdf2ca99 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -471,7 +471,7 @@ class AccountsController(TransactionBase): max_allowed_amt = flt(ref_amt * (100 + tolerance) / 100) if total_billed_amt - max_allowed_amt > 0.01: - frappe.throw(_("Cannot overbill for Item {0} in row {0} more than {1}. To allow overbilling, please set in Stock Settings").format(item.item_code, item.idx, max_allowed_amt)) + frappe.throw(_("Cannot overbill for Item {0} in row {1} more than {2}. To allow overbilling, please set in Stock Settings").format(item.item_code, item.idx, max_allowed_amt)) def get_company_default(self, fieldname): from erpnext.accounts.utils import get_company_default From 6c1773025b4e93d71d3a090e73ba8861001474e0 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 7 Jan 2015 11:33:14 +0530 Subject: [PATCH 6/7] fiscal year error message --- erpnext/accounts/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index c658cdd09f..0a05275bca 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -28,7 +28,7 @@ def get_fiscal_years(date=None, fiscal_year=None, label="Date", verbose=1): from `tabFiscal Year` where %s order by year_start_date desc""" % cond) if not fy: - error_msg = _("""{0} {1} not in any Fiscal Year""").format(label, formatdate(date)) + error_msg = _("""{0} {1} not in any Fiscal Year. For more details check {2}.""").format(label, formatdate(date), "https://erpnext.com/kb/accounts/fiscal-year-error") if verbose: frappe.msgprint(error_msg) raise FiscalYearError, error_msg From bdfd0d1ff9ebada521bba81c939f5860eb6d5a25 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Wed, 7 Jan 2015 12:07:22 +0600 Subject: [PATCH 7/7] bumped to version 4.16.0 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 349cc44bd0..ebfb9bf6b4 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1 +1 @@ -__version__ = '4.15.4' +__version__ = '4.16.0' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index f033d687be..d8b8a2e023 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "4.15.4" +app_version = "4.16.0" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index 24e0155468..4df95668d4 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.15.4" +version = "4.16.0" with open("requirements.txt", "r") as f: install_requires = f.readlines()