Table of Content
HAL Forum
function boolean IsBooks (
)
Description:
Determines if the program is using the HansaWorld Books package.
global
function LongInt INVcRecordDefaults(var record INVc INr,record INVc IN2r,LongInt stat,LongInt long4)
BEGIN
  LongInt res;
  record ItemSettingBlock ISb;
  Integer ProgramType;
  Boolean lightFlag;
  
  BlockLoad(ISb);
  if (SingleUserMode) then begin
    if (GetNextItemNr(INr.Code)) then begin end;
  end else begin
    INr.Code = "";
  end;
  INr.Group = ISb.DefIGroup;
  INr.WarrantyLength = ISb.WarrantyLength;
  INr.Unittext = ISb.Unittext;
  INr.SerNrf = ISb.SerNrf;
  INr.UPrice1 = blankval;
  INr.MinLevel = blankval;
  INr.Bonus = blankval;
  INr.InPrice = blankval;
  INr.ExtraCost = blankval;
  INr.PriceFactor = blankval;
  INr.UnitCoefficient = blankval;
  INr.Width = blankval;
  INr.Height = blankval;
  INr.Depth = blankval;
  INr.AlcPrc = blankval;
  INr.LastPriceChange = CurrentDate;
  INr.LastBasePriceChange = CurrentDate;
  INr.Terminated = 0;
  INr.ItemMaterial = 0;
  INr.Perceptions = ISb.Perceptions;
  ProgramType = GetProgramMode;
  if ((ProgramType==typFirstOffice) or 
      (ProgramType==typFirstOfficeSmall) or 
      (IsBooks)) then begin
    lightFlag = true;
  end;    
  if (lightFlag==false) then begin 
    INr.ItemType = ISb.DefItemType;
    INr.UpdateCost = ISb.UpdateCost;
    INr.SRUpdateCost = ISb.SRUpdateCost;
  end;  
  INr.colnr = 20;
  INVcRecordDefaults = res; 
  RETURN;
END;
Related topics:
««