Table of Content
HAL Forum
procedure MatRowInsert (
Record NameVc Namer,Integer i,Row NameVc Namerw)
Description:
Insert a row in a matrix
Parameters:
Namer Record
i Row number
Namerw Row from record
procedure SetupIVFromShopBask(var record IVVc IVp,string pricelist,string resusage,string lCustCode)
begin
  record PLDefVc PLDefR;
  Record ResUsageVc ResUsager;
  row IVVc IVrw;
  string 20 CustCode;
  LongInt baskno;

  GetCustAndBasket(lCustCode,CustCode,baskno);
  RecordNew(IVp);
  IVp.CustCode = CustCode;
  if (PasteCustInInv(IVp)) then begin end;

  if (nonblank(pricelist)) then begin
    IVp.PriceList = pricelist;
  end;

  IVp.InclVAT = 1; 
  PLDefR.Code = IVp.PriceList;
  if (ReadFirstMain(PLDefR,1,true)) then begin
    IVp.InclVAT = PLDefR.InclVAT;
  end;
  ResUsager.Code = resusage;
  if (ReadFirstMain(ResUsager,1,true)) then begin
    if ((ResUsager.CommentToInv!=0) or (ResUsager.NoAdditionalToInv!=0)) then begin
      ClearRow(IVp,IVrw,10);
      IVrw.Spec = " ";
      MatRowPut(IVp,0,IVrw);
      if (ResUsager.CommentToInv!=0) then begin
        ClearRow(IVp,IVrw,1);
        IVrw.Spec = ResUsager.Comment;
        MatRowInsert(IVp,0,IVrw);
      end;
    end;
  end;
  return;
end;

Related topics:
««