Hi, i faced same issue in Business Central "on premise" version, i delete ILE and VE and G/L Entry records using SQL query because it was wrong.
i know this the wrong procedure, when try to post the sales entries in open statements its gave the error in the pic.
i restart the NAV and SQL services but still the error occurs and when i check the the entry no. inside the table its not existing..
please how i can solve this issue because its stopped all posting linked to ILE and VE., i found two tables linked "Adjusted item Ledger" and Discount Ledger Entry" shall i delete it also or there another way to solve this issue ?