From 2e4faf96f22bcb0180ae6a16b8567a28cd53e873 Mon Sep 17 00:00:00 2001 From: Anuja P Date: Sat, 5 Dec 2020 13:36:43 +0530 Subject: [PATCH 1/3] fix: Added TDS Payable account number and an error message --- .../standard_chart_of_accounts_with_account_number.py | 3 +++ erpnext/accounts/utils.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts_with_account_number.py b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts_with_account_number.py index 6c83e3bd67..acb11e557a 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts_with_account_number.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts_with_account_number.py @@ -245,6 +245,9 @@ def get(): "account_number": "2200" }, _("Duties and Taxes"): { + _("TDS Payable"): { + "account_number": "2310" + }, "account_type": "Tax", "is_group": 1, "account_number": "2300" diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 53677cde8a..267c26d47b 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -78,7 +78,10 @@ def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verb else: return ((fy.name, fy.year_start_date, fy.year_end_date),) - error_msg = _("""{0} {1} not in any active Fiscal Year.""").format(label, formatdate(transaction_date)) + error_msg = _("""{0} {1} not in any active Fiscal Year""").format(label, formatdate(transaction_date)) + if company: + error_msg = _("""{0} for {1}""").format(error_msg, company) + if verbose==1: frappe.msgprint(error_msg) raise FiscalYearError(error_msg) From b6cf75d2a8b0ee03e00e5efcc4263c273b53ab3d Mon Sep 17 00:00:00 2001 From: Anuja P Date: Sat, 5 Dec 2020 22:25:17 +0530 Subject: [PATCH 2/3] fix: error messsage indent fix --- 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 267c26d47b..73e610abb8 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -78,7 +78,7 @@ def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verb else: return ((fy.name, fy.year_start_date, fy.year_end_date),) - error_msg = _("""{0} {1} not in any active Fiscal Year""").format(label, formatdate(transaction_date)) + error_msg = _("""{0} {1} not in any active Fiscal Year""").format(label, formatdate(transaction_date)) if company: error_msg = _("""{0} for {1}""").format(error_msg, company) From 550cb9c78fe2167a43deb9f3a65237a01ebecd17 Mon Sep 17 00:00:00 2001 From: Anuja P Date: Mon, 7 Dec 2020 11:11:00 +0530 Subject: [PATCH 3/3] fix: suggested changes --- erpnext/accounts/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 73e610abb8..550aaef404 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -78,9 +78,9 @@ def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verb else: return ((fy.name, fy.year_start_date, fy.year_end_date),) - error_msg = _("""{0} {1} not in any active Fiscal Year""").format(label, formatdate(transaction_date)) + error_msg = _("""{0} {1} is not in any active Fiscal Year""").format(label, formatdate(transaction_date)) if company: - error_msg = _("""{0} for {1}""").format(error_msg, company) + error_msg = _("""{0} for {1}""").format(error_msg, frappe.bold(company)) if verbose==1: frappe.msgprint(error_msg) raise FiscalYearError(error_msg)