How to control out of stock when changing documents created in the past (negative stocks)?
Regarding the stock management process, the application allows to validate the items' out of stock situations when editing the documents. To define the default behavior when out of stock, the following options are available: Administrator | Company | Inventory | Company Parameters | Item: If you have the Warn or Lock setup, when creating/changing documents that move stock, the app will check if the item being moved exists in enough quantity in the Warehouse, Location and Batch (if applicable). This validation is performed considering the stock in the moment it is being copied or changed. According to this behavior, in case you change a document that moves stock and that was created in the past, the app will perform the same validation with the current item stock, that is, with the stock at the time of the modification and not the stock existent when the movement was performed. This scenario can cause an out of stock situation even when the Lock is selected. However, this situation is reported in Stock Recalculation when the option Show processing report is selected. Take the following example: Consider the creation of a Sales document that moved stock to item "X9999" in the 10 UN quantity. This item stock situation in that moment was: Afterwards, a Purchase document that moved stock to item "X9999" in the 100 UN quantity was created. This item's stock situation is now: Then, the Sales document created in point 1 was edited and the moved quantity was moved from 10 UN to 20 UN. The app allows that change because the item stock is 104 UN. However, after executing the Stock Recalculation, the item quantity "X9999" in the Sales document date/hour is now -6 UN (when out of stock), and after creating the Purchase document the stock is 94 UN. This setup can also be performed at the warehouse level, and it replaces the Administrator setup. Sometimes, the stock issue documents (sales/stocks documents) are created before the stock inflow documents (purchase/stocks documents) are recorded in the application, originating out of stock situations. Considering that the stock entry movement date/time is previous to the issue movement, even when creating an entry movement in a date/time later than the issue movement. To avoid the out of stock situation, you should change the document rows date/time for the movement real date/time using the key F10 in a Purchases/Sales editor's row and go to Movement Date.Out of stock
Example