From 3b4754f3f68a41bd7b5c5fb46e838a8700ce057a Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Thu, 7 Apr 2022 17:01:10 +0530 Subject: [PATCH] fix: define tax_columns below consistency --- .../report/purchase_register/purchase_register.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/report/purchase_register/purchase_register.py b/erpnext/accounts/report/purchase_register/purchase_register.py index ed63e7f1d21..a73c72c6d82 100644 --- a/erpnext/accounts/report/purchase_register/purchase_register.py +++ b/erpnext/accounts/report/purchase_register/purchase_register.py @@ -127,7 +127,6 @@ def get_columns(invoice_list, additional_table_columns): expense_accounts = [] tax_accounts = [] - tax_columns = [] unrealized_profit_loss_accounts = [] if invoice_list: @@ -163,10 +162,11 @@ def get_columns(invoice_list, additional_table_columns): unrealized_profit_loss_account_columns = [ (account + ":Currency/currency:120") for account in unrealized_profit_loss_accounts ] - - for account in tax_accounts: - if account not in expense_accounts: - tax_columns.append(account + ":Currency/currency:120") + tax_columns = [ + (account + ":Currency/currency:120") + for account in tax_accounts + if account not in expense_accounts + ] columns = ( columns