Table of Content
HAL Forum
function Val GetStockQTty (
String INr.Code,String Locr.Code,Date RepSpec.d1,Boolean false)
Description:
Get the stock quantity for a specific item
Parameters:
INr.Code Item code
Locr.Code Location of the item
RepSpec.d1 Date (history related)
false Qty mode (false=normal, true=special conversion)
global
procedure InvValEn(record RcVc RepSpec)
begin
  record INVc INr;
  record LocationVc Locr;
  string 255 frcc,tocc;
  string 255 fromart,toart;
  boolean TrHs,TrHs2,testf;
  val instock;
  val value, salesp, costp;

...
if (TrHs == true) then begin
  if (INr.ItemType == 1) then begin
    instock = GetStockQty(INr.Code,Locr.Code,RepSpec.d1,false);
    if (RepSpec.UsedOnly==1) then begin
      if (instock==0) then begin
        testf = false;
       end;
    end;
  end else begin
    testf = false;
  end;
end;
...
Related topics:
««