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), but Flexi returns an error?
First, let's explain why this error occurs
The error occurs only 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 goods receipt has already been issued. In other words, an item that was received by the goods receipt you are trying to delete has in the meantime been issued by a delivery note.
A link is created between the goods receipt item and the delivery note item (in the table sfifovazby, known as a FIFO link), which prevents the goods receipt from being deleted. This link also serves to assign the appropriate cost price to the delivery note (when the FIFO inventory valuation method is used).
ℹ️ The error and the inability to delete the goods receipt (or its item) is a safeguard against an undesirable negative balance on the stock card. The opposite rule applies to delivery notes: from the inventory perspective, nothing blocks them. See deleting a delivery note together with an invoice.
How do 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, either is possible only after you have deleted all other linked delivery notes.
If one unit of the item was received and therefore only one delivery note is linked, this approach is feasible.
With a larger volume of data, for example when the goods receipt contains 100 units of the item and 50 delivery notes are linked to those 100 units, this approach is obviously not feasible.
💡 On our website, you can download an add-on that can find all of these linked delivery notes.
How can I correct the stock balance if it is not feasible to delete the goods receipt/invoice?
There are several ways to make the correction, but in principle it always comes down to fixing the incorrect stock balance. This can always be done with a delivery note issuing the goods from stock.
How do I correct the stock balance if only the goods receipt is incorrect and has no linked invoice?
Create a delivery note. We recommend creating a delivery note with the movement type set to "Bare" issue and adding the relevant item to it.
Create a stock count, either in the desktop application or in the web interface. A stock count does nothing more than create the corresponding stock count difference document, either a goods receipt or a delivery note. In your case, it will create only a delivery note. We recommend this option especially when the problem affects multiple items.
How do I correct the stock balance if the goods receipt is incorrect and has a linked invoice?
You can use both of the procedures mentioned in the previous step.
Create a credit note for the relevant received invoice. You will find it in the services menu above the received invoices module. The credit note ensures that the goods are issued from stock (by automatically generating a delivery note), which brings the stock balance to the correct value.
💡 Is the supplier correcting only the price while the quantity of goods stays the same? In that case, do not use a stock credit note. Instead, issue a financial credit note without stock generation. No stock movement will be created, and you will avoid problems with links.
🚨 Warning
Never manually create a goods receipt with a negative quantity. If you do not enter exactly the correct price that should have been assigned to the delivery note at that time according to the relevant inventory valuation method, the stock card will show incorrect inventory values in CZK (or EUR).
You will usually notice this situation when there are already 0 units of the item in stock, but the balance in CZK (or EUR) shows a positive or negative value.
To correct the stock or delete the goods receipt/invoice, always use one of the procedures described above.

