Merge pull request #3302 from rmehta/fix-report-strings
[fix] totals etc should not be clickable
This commit is contained in:
		
						commit
						6789680fa3
					
				| @ -29,7 +29,7 @@ def execute(filters=None): | |||||||
| def get_provisional_profit_loss(asset, liability, equity, period_list): | def get_provisional_profit_loss(asset, liability, equity, period_list): | ||||||
| 	if asset and (liability or equity): | 	if asset and (liability or equity): | ||||||
| 		provisional_profit_loss = { | 		provisional_profit_loss = { | ||||||
| 			"account_name": _("Provisional Profit / Loss (Credit)"), | 			"account_name": _("'Provisional Profit / Loss (Credit)'"), | ||||||
| 			"account": None, | 			"account": None, | ||||||
| 			"warn_if_negative": True | 			"warn_if_negative": True | ||||||
| 		} | 		} | ||||||
|  | |||||||
| @ -38,7 +38,7 @@ def execute(filters=None): | |||||||
| 	data += [ | 	data += [ | ||||||
| 		get_balance_row(_("System Balance"), balance_as_per_system), | 		get_balance_row(_("System Balance"), balance_as_per_system), | ||||||
| 		[""]*len(columns), | 		[""]*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), | 		get_balance_row(_("Amounts not reflected in system"), amounts_not_reflected_in_system), | ||||||
| 		[""]*len(columns), | 		[""]*len(columns), | ||||||
| 		get_balance_row(_("Expected balance as per bank"), bank_bal) | 		get_balance_row(_("Expected balance as per bank"), bank_bal) | ||||||
| @ -68,6 +68,6 @@ def get_entries(filters): | |||||||
| 
 | 
 | ||||||
| def get_balance_row(label, amount): | def get_balance_row(label, amount): | ||||||
| 	if amount > 0: | 	if amount > 0: | ||||||
| 		return ["", label, amount, 0, "", "", "", ""] | 		return ["", '"' + label + '"', amount, 0, "", "", "", ""] | ||||||
| 	else: | 	else: | ||||||
| 		return ["", label, 0, abs(amount), "", "", "", ""] | 		return ["", '"' + label + '"', 0, abs(amount), "", "", "", ""] | ||||||
|  | |||||||
| @ -146,7 +146,7 @@ def prepare_data(accounts, balance_must_be, period_list): | |||||||
| 
 | 
 | ||||||
| def add_total_row(out, balance_must_be, period_list): | def add_total_row(out, balance_must_be, period_list): | ||||||
| 	row = { | 	row = { | ||||||
| 		"account_name": _("Total ({0})").format(balance_must_be), | 		"account_name": _("'Total ({0})'").format(balance_must_be), | ||||||
| 		"account": None | 		"account": None | ||||||
| 	} | 	} | ||||||
| 	for period in period_list: | 	for period in period_list: | ||||||
|  | |||||||
| @ -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 | 			# Totals and closing for individual ledger, if grouped by account | ||||||
| 			if filters.get("group_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}, | 					"credit": acc_dict.total_credit}, | ||||||
| 					get_balance_row("Closing (Opening + Totals)", | 					get_balance_row("Closing (Opening + Totals)", | ||||||
| 						(acc_dict.opening + acc_dict.total_debit - acc_dict.total_credit)), {}] | 						(acc_dict.opening + acc_dict.total_debit - acc_dict.total_credit)), {}] | ||||||
| 
 | 
 | ||||||
| 	# Total debit and credit between from and to date | 	# Total debit and credit between from and to date | ||||||
| 	if total_debit or total_credit: | 	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 | 	# Closing for filtered account | ||||||
| 	if filters.get("account"): | 	if filters.get("account"): | ||||||
| @ -168,7 +168,7 @@ def get_accountwise_gle(filters, gl_entries, gle_map): | |||||||
| 
 | 
 | ||||||
| def get_balance_row(label, balance): | def get_balance_row(label, balance): | ||||||
| 	return { | 	return { | ||||||
| 		"account": label, | 		"account": "'" + label + "'", | ||||||
| 		"debit": balance if balance > 0 else 0, | 		"debit": balance if balance > 0 else 0, | ||||||
| 		"credit": -1*balance if balance < 0 else 0, | 		"credit": -1*balance if balance < 0 else 0, | ||||||
| 	} | 	} | ||||||
|  | |||||||
| @ -27,7 +27,7 @@ def execute(filters=None): | |||||||
| def get_net_profit_loss(income, expense, period_list): | def get_net_profit_loss(income, expense, period_list): | ||||||
| 	if income and expense: | 	if income and expense: | ||||||
| 		net_profit_loss = { | 		net_profit_loss = { | ||||||
| 			"account_name": _("Net Profit / Loss"), | 			"account_name": _("'Net Profit / Loss'"), | ||||||
| 			"account": None, | 			"account": None, | ||||||
| 			"warn_if_negative": True | 			"warn_if_negative": True | ||||||
| 		} | 		} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user