Skip to main content

Cannot delete an incorrectly created goods receipt/received invoice/credit note

How to delete an incorrectly created goods receipt, incoming invoice, or credit note when the deletion attempt returns an error?

Written by Petr Pech

Do you need to delete an incorrectly created goods receipt, received invoice, or credit note (or an incorrectly created item on one of these documents), and Flexi is returning an error?

First, let's explain why this error occurs

This error only occurs when you try to delete a goods receipt - whether directly from the goods receipt itself, or from a received invoice or credit note.

It occurs when an item on the relevant goods receipt has already been issued - meaning that the item received via the goods receipt you are trying to delete was, in the meantime, issued via an issue note.

A link is created between the goods receipt item and the issue note item (in the sfifovazby table, i.e. the so-called FIFO link), which prevents the goods receipt from being deleted. At the same time, this link is responsible for assigning the correct cost price to the issue note (when using the FIFO inventory valuation method).

ℹ️ This error and the resulting inability to delete the goods receipt (or its item) serve as a safeguard against an undesirable negative stock level on the inventory card.

How can I get rid of this incorrectly created goods receipt/invoice?

There are only two ways to get rid of a goods receipt - delete it or cancel it. However, this is only possible if you first delete all other linked issue notes.

If only one unit of the item was received, meaning only one issue note is linked, this approach is feasible.

However, with larger data volumes - for example, if the goods receipt contained 100 units of an item, and those 100 units were linked to 50 separate issue notes - this approach is obviously not practical.

💡 Our website offers a downloadable add-on that can find all these linked issue notes for you.

How can I correct the inventory status if it's not feasible to delete the goods receipt/invoice?

There are several ways to fix this, but they all essentially come down to correcting the incorrect inventory status. This can always be achieved with an issue note from the warehouse.

How do I fix the inventory status if only the goods receipt is incorrect, with no linked invoice?

  1. Create an issue note. We recommend creating an issue note with the movement type specified as "Simple" issue and adding the relevant item to it.

  2. Create a stocktaking (inventory count) - either in the desktop application or the web interface. Stocktaking does nothing more than create the corresponding inventory difference - either a goods receipt or an issue note. In your case, it will create only an issue note. We especially recommend this option if the problem affects multiple items.

How do I fix the inventory status if the goods receipt has a linked invoice with the error?

  1. You can use either of the two methods mentioned in the previous step.

  2. Create a credit note for the relevant received invoice. You'll find this option in the services menu above the received invoices agenda. The credit note will trigger an issue from the warehouse (by automatically generating an issue note), bringing the inventory status to the correct value.

🚨 Warning

Never manually create a goods receipt with a negative quantity. If you fail to enter the exact correct price that should have been assigned to the issue note at that time according to the relevant inventory valuation method, you will end up with incorrect stock value figures (in CZK or EUR) on the inventory card.

You will usually notice this situation when the stock quantity for the given item is already 0, yet the balance (in CZK or EUR) shows a positive or negative value.

Always use one of the procedures described above to fix the inventory or delete the goods receipt/invoice.

Related articles

Did this answer your question?