Skip to main content

Unable to delete an incorrectly created goods receipt/received invoice/credit note

How to remove an incorrectly created goods receipt, received invoice, or credit note when attempting deletion returns an error?

Written by Petr Pech

Do you need to delete an incorrectly created goods receipt, received invoice, or credit note, or possibly an incorrectly created line item of one of these documents, and Flexi returns an error?

First, let's explain why this error occurs

This error only occurs when you attempt to delete a goods receipt. Whether you do so directly from the goods receipt itself, or from the received invoice or credit note.

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

A link is created between the goods receipt line item and the issue note line item (in the sfifovazby table, i.e. the so-called FIFO link), which prevents the goods receipt from being deleted. This link is also responsible for assigning the correct cost price to the issue note (in the case of the FIFO inventory valuation method).

ℹ️ The error and the inability to delete the given goods receipt (or its line item) serve as protection against an undesirable negative stock level on the inventory card. The opposite rule applies to issue notes - from the inventory perspective, nothing blocks them, see deleting an issue note together with an invoice.

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 once all other linked issue notes have been deleted.

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

With larger volumes of data - for example, if the goods receipt contains 100 units of the item and these 100 units are linked to 50 issue notes - this approach is naturally not feasible.

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

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

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

How do I correct the stock level if only the goods receipt is affected, without a linked invoice?

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

  2. Create a stocktake - in the desktop application or web interface. A stocktake simply creates the appropriate inventory difference document - a goods receipt or issue note. In your case, it will create only an issue note. We recommend using this option especially if the problem affects multiple items.

How do I correct the stock level if the goods receipt has a linked invoice?

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

  2. Create a credit note for the relevant received invoice. You'll find this in the services menu above the received invoices agenda. The credit note will ensure the goods are issued from the warehouse (by automatically generating an issue note), bringing the stock level to the correct value.

🚨 Warning

Never manually create a goods receipt with a negative quantity. If you don't enter exactly the 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'll usually notice this situation when the stock quantity for the given item is already 0, yet the balance in CZK (or EUR) still shows a positive or negative value.

To fix the stock level or delete the goods receipt/invoice, always use one of the approaches described above.

Related articles

Did this answer your question?