fix: Append expense account only if expense account exists (#19880)
This commit is contained in:
parent
6f68f2d020
commit
ce42f48bfb
@ -248,7 +248,7 @@ class PurchaseInvoice(BuyingController):
|
||||
def set_against_expense_account(self):
|
||||
against_accounts = []
|
||||
for item in self.get("items"):
|
||||
if item.expense_account not in against_accounts:
|
||||
if item.expense_account and (item.expense_account not in against_accounts):
|
||||
against_accounts.append(item.expense_account)
|
||||
|
||||
self.against_expense_account = ",".join(against_accounts)
|
||||
|
Loading…
x
Reference in New Issue
Block a user