If an inventory item is associated with the purchase transaction, then the Inventory account associated while creating the item has to be used in the transaction as well. If you try associating a different Inventory account, you’ll face an error.
Note: The account which needs to be associated would be mentioned in the error message. You can change to that account accordingly.
Books
Simplify accounting
and GST filing.