actual inventory become negative

hello all

i need to know how i can prevent actual stock for items from become negative ?

Something like this


I would really like to see your Check_Availability function [;)]

If your stock is anything bigger than newspaper stand, it is practically impossible to check availability… In a stock with heavy movement, many Purchasers and many Salesman working simultaneously vou can not catch the moment when last piece is sold, if your merchandise is not tracked by serial/lot nos and you do not use Bins. Remember, creating SO does not mean that at that same exact moment the merchandise will be delivered, as well as goods might be physically present, but POs are not entered in system yet, but that should not keep you from selling them, especially if they have short expiry dates as with food.

Reservation might help, but it has it’s drawbacks, too, as Salesmen have a nasty habit to create fake SOs to “reserve” high demand goods for their prospective clients, if reservation is set up as company standart.

Then, how are we getting availability warning while entering SO?

This is only availability “forecast”, based on current moment data - not necessarily all the receipts and shipments, which were taken into account when calculating this “availability” will really happen.
Unhide all the columns in ItemAvailability matrix, you’ll see how many parameters affect it, if only one single changes or already doesn’t correspond to real life, the result is not reliable. Many issues affect it, starting from elemantary input errors, to force majeure as Japan earthquake or Libyan revolt…

It is possible to modify the code so, that it does not allow to create SO with Qty beyond this forecasted availability (Setup allows only switching on/off the warning), but practical experience shows users are not happy with such a restrictive system after some time, EVEN if they initially themselves asked for it.

Just one example - how can Purchasers know they urgently need to buy some merchandise, which is in high demand and clients (read Salesmen) have placed future SOs, which can not be covered with current supplies + already planned purchases, if system restricts you to create these same SOs beyond “forecasted” availability?

As you said it is impossible to check availability In a stock with heavy movement, many Purchasers and many Salesman working simultaneously

but it may suite for the users who has less movement…

the solutions or suggestins which we(I) give may not 100% suitable to all users…

if users feels suitable, they follow them or not…

do you want us to stop giving sol which are not 100% suitable?

Of course no, as “client is always right” [:D]

I only shared my experience and highlighted the consequences of coding very restrictive solutions…
As you mentioned, if client WANTS some feature, there is absolutely no reason not to follow his wishes. However, in my consultancy practice, if I see some side effects client is not aware of, I explain that to him, an we then decide together how we will proceed to create the most suitable solution for him.

Okies…Thanks for the suggetion…

I have implemented same sol for on of our client and its working fine till today without any prob…

thanks to all

please mohana can you write more details about this function

Something like

IF ServiceHeader.“Document Type” = ServiceHeader.“Document Type”::Invoice THEN BEGIN
ServiceLine.SETFILTER(“Document No.”,’=%1’,ServiceHeader.“No.”);
ServiceLine.SETFILTER(“Qty. to Ship”,’<>%1’,0);
ItemRec.SETFILTER(“Location Filter”,’=%1’,ServiceLine.“Location Code”);
ItemRec.CALCFIELDS(“Reserved Qty. on Inventory”);
IF (ItemRec.Inventory - ServiceLine.“Qty. to Ship” - ItemRec.“Reserved Qty. on Inventory”) < 0 THEN
ERROR(‘Stock NOT sufficient for Item No %1’,ServiceLine.“No.”);
UNTIL ServiceLine.NEXT=0;

one more method…

Enable stockout warning in Sales setup, disable programmatically YES button on stockout warning form. Users, preparing SO/SI must have no rights to Sales Setup.

or, with some coding, YES button can be enabled/disabled depending on User…