Skip to content

Commit

Permalink
fix: define tax_columns below consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarvora committed Apr 7, 2022
1 parent fa4f57f commit 3b4754f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions erpnext/accounts/report/purchase_register/purchase_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3b4754f

Please sign in to comment.