Release of purchase invoice via API missing link to batch, invoice stuck in Balanced status

API Version 9.40

This specific problem occurred in some occasions during heavy API load together with parallel actions, where the released purchase invoice may have incorrectly remained in the Balanced status after it was released via SupplierInvoice endpoint.

In this scenario the full release operation was not able to finish. Meaning even though the release process was successful and a batch was created, if the batch failed to link the documents (the Financial details tab not showing a link to the batch no.), due to this the purchase invoice document remained in the Balanced status. This has now been fixed.