From 555fa4fbc2d06f14e4bf23a1ae82dd9286e80dc3 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 20 May 2015 17:21:53 +0530 Subject: [PATCH] [fix] totals etc should not be clickable --- erpnext/accounts/report/balance_sheet/balance_sheet.py | 2 +- .../bank_reconciliation_statement.py | 6 +++--- erpnext/accounts/report/financial_statements.py | 4 ++-- erpnext/accounts/report/general_ledger/general_ledger.py | 6 +++--- .../profit_and_loss_statement/profit_and_loss_statement.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py index 168f9b1093..f664a9edfa 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.py +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py @@ -29,7 +29,7 @@ def execute(filters=None): def get_provisional_profit_loss(asset, liability, equity, period_list): if asset and (liability or equity): provisional_profit_loss = { - "account_name": _("Provisional Profit / Loss (Credit)"), + "account_name": _("'Provisional Profit / Loss (Credit)'"), "account": None, "warn_if_negative": True } diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py index 8f4b2cab7b..e592f69700 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py @@ -38,7 +38,7 @@ def execute(filters=None): data += [ get_balance_row(_("System Balance"), balance_as_per_system), [""]*len(columns), - ["", _("Amounts not reflected in bank"), total_debit, total_credit, "", "", "", ""], + ["", '"' + _("Amounts not reflected in bank") + '"', total_debit, total_credit, "", "", "", ""], get_balance_row(_("Amounts not reflected in system"), amounts_not_reflected_in_system), [""]*len(columns), get_balance_row(_("Expected balance as per bank"), bank_bal) @@ -68,6 +68,6 @@ def get_entries(filters): def get_balance_row(label, amount): if amount > 0: - return ["", label, amount, 0, "", "", "", ""] + return ["", '"' + label + '"', amount, 0, "", "", "", ""] else: - return ["", label, 0, abs(amount), "", "", "", ""] + return ["", '"' + label + '"', 0, abs(amount), "", "", "", ""] diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 88d1bebb8d..e769373bdc 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -146,7 +146,7 @@ def prepare_data(accounts, balance_must_be, period_list): def add_total_row(out, balance_must_be, period_list): row = { - "account_name": _("Total ({0})").format(balance_must_be), + "account_name": _("'Total ({0})'").format(balance_must_be), "account": None } for period in period_list: @@ -207,7 +207,7 @@ def filter_accounts(accounts, depth=10): add_to_list(None, 0) return filtered_accounts, accounts_by_name - + def sort_root_accounts(roots): """Sort root types as Asset, Liability, Equity, Income, Expense""" diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 2731baa27e..de476f7828 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -120,14 +120,14 @@ def get_data_with_opening_closing(filters, account_details, gl_entries): # Totals and closing for individual ledger, if grouped by account if filters.get("group_by_account"): - data += [{"account": "Totals", "debit": acc_dict.total_debit, + data += [{"account": "'Totals'", "debit": acc_dict.total_debit, "credit": acc_dict.total_credit}, get_balance_row("Closing (Opening + Totals)", (acc_dict.opening + acc_dict.total_debit - acc_dict.total_credit)), {}] # Total debit and credit between from and to date if total_debit or total_credit: - data.append({"account": "Totals", "debit": total_debit, "credit": total_credit}) + data.append({"account": "'Totals'", "debit": total_debit, "credit": total_credit}) # Closing for filtered account if filters.get("account"): @@ -168,7 +168,7 @@ def get_accountwise_gle(filters, gl_entries, gle_map): def get_balance_row(label, balance): return { - "account": label, + "account": "'" + label + "'", "debit": balance if balance > 0 else 0, "credit": -1*balance if balance < 0 else 0, } diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py index 1d1337662a..6e7b13ec32 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py @@ -27,7 +27,7 @@ def execute(filters=None): def get_net_profit_loss(income, expense, period_list): if income and expense: net_profit_loss = { - "account_name": _("Net Profit / Loss"), + "account_name": _("'Net Profit / Loss'"), "account": None, "warn_if_negative": True }