Purchase Invoice with Multiple Expense Accounts

I have a purchase invoice that has two line items. Each line item has a different expense account attached to it. When I go to submit the invoice I get the error:

Could not find Against: 802.1 - Expense Account 1 - Demo Company, 802.2- Expense Account 2 - Demo Company

How do I attach multiple line items with different a different expense account for each line item?

If you change the items to the default Expense Account - Cost of Goods Sold, Or Cost of Sales do you get an error? The error looks like your expense account is not created correctly

If they both line item go to a single expense account then it works.

I have tried to set up the account types as expense account, or left it blank.

I can only select a single account with the account type of indirect expense.