Table of Content
HAL Forum
function string NextStrNumber (
string LastStringNumber,boolean ForceNumber)
Description:
Treats the input string as a mixed numerical value that can be increased. (eg. INVOICE01>INVOICE02>INVOICE03>etc...)
Parameters:
LastStringNumber Source StringNumber that will be used to calculate the next one.
ForceNumber Force numerial increment. TRUE: use number increment even when the input does not have numerical suffix.
global
updating procedure GenOwnChk2Mn(record RcVc RepSpec)
begin
  Record CheckVc Chq;
  Boolean Res;
  LongInt j,Cant;
  String 30 ChkNumber,Target;
  Integer flushcnt;

  Cant = RepSpec.long1;
  ChkNumber = RepSpec.f1;
  Target = RepSpec.f2;

  if (nonblank(Target) and (nonblank(ChkNumber)) and (Cant > 0)) then begin
    for (j=0;j<Cant;j=j+1) begin
      if (j>0) then begin
        ChkNumber = NextStrNumber(ChkNumber,true);
      end;
      NewOwnCheque(ChkNumber,RepSpec.flags[1],Target,RepSpec.f3,flushcnt);
      Res = RecordStore(Chq,true);
      CheckFlush(flushcnt,10);
    end;
  end;

  Return;
end;
Related topics:
««