ExpandAccNo(cNo : Code[20]) TempGLAcc.RESET; TempGLAcc.DELETEALL; TempGLAcc.SETCURRENTKEY("No."); GLAcc.SETFILTER("Account Type",'<>%1',GLAcc."Account Type"::"End-Total"); IF GLAcc.FIND('-') THEN REPEAT TempGLAcc := GLAcc; IF GLAcc."Account Type" = GLAcc."Account Type"::"Begin-Total" THEN TempGLAcc.Totaling := GetEndTotal(GLAcc); IF (TempGLAcc.Indentation = 0) OR (STRPOS(cNo, COPYSTR(TempGLAcc."No.", 1, STRLEN(TempGLAcc."No.") - 1)) = 1) THEN TempGLAcc.INSERT; UNTIL GLAcc.NEXT = 0;
IF CurrForm.LOOKUPMODE THEN ExpandAccNo("No.");
Comments