Note: We are on AX 2012 FP, CU7
When creating an AP invoice against a PO, this creates a record in the Invoice History and Matching Details table, with a status of "Waiting". Once the invoice is submitted into our approval workflow, this record is removed from the table, and a new record is created once the approver retrieves the invoice to review for approval. This subsequent record is then removed once approval is granted and a new record with a status of "Executed" is then placed into the table when the invoice is posted.
Occasionally we will experience the error referenced in the title, "One or more pending invoices cannot be displayed because they are in use" when trying to approve invoices in the approval workflow. To remedy this, we typically have to go into the Invoice History and Matching details window and delete the corresponding record with a status of "Waiting". What seems to be consistently causing this is when we create multiple invoices against the same PO.
To replicate:
1. Create Invoice against the PO, partially invoicing the PO.
2. Create a 2nd invoice against the same PO, again partially invoicing or invoicing for the balance of the PO.
3. Verify that there are 2 records in the Invoice history table corresponding to the 2 invoice records created in steps 1 and 2.
4. Submit both invoices into an approval workflow
5. Expected results: In the Invoice history table, both records referenced in step 3 should be gone. Actual results: both records exist.
6. Retrieve one of the invoices from the workflow and attempt to approve. Expected results: Approval is effected. Actual results: Receive the "One or more pending....." error.
7. In the Invoice History table, delete the 2 corresponding records with a "Waiting" status. You should now be able to retrieve the invoices and approve them.
Our current workaround is to process one invoice to completion (posted) before we enter the subsequent invoices against the PO. This only seems to manifest itself when we have multiple pending invoices against a PO. It's almost like AX get's confused and when multiple pending invoices against a PO exist, it has difficulty cleaning up the temporary records.
Does anyone know if this is a bug and if there is a hotfix for it? I did a quick search but haven't found anything. Is anyone else experiencing this issue?
Thanks.
-Patrick