I just created a new item in Invoices and set it to go to Account 6020 Dept 500. I just posted an invoice for this item and it tried to post to Account 6020 Dept 100 which doesn't exist. What will happen when we post this to the Ledger?
However, you should try and determine why the line item was posted to an unexpected account-department, otherwise you will be doing this every time that item is sold.