On production order line capacity and output has been posted with using production journal. For some reason item ledger entry was not successful - presumably refreshing production order was not done after production order lines has been changed manually on the released production order. Capacity ledger entries were cancelled by posting output with negative run values. On the production order line the quantity to be produced were changed manually to zero.
New production order lines were entered to post capacity and item ledger entries. New lines was successfully posted.
Now when trying change the status of the production order to finished following popup was generated: "You cannot finish line 5000 on Production Order nn. It has consumption or capacity posted with no output."
How to finish the production order?