LOCAL InsertFromGLEntry(VAR TempRevertTransactionNo : TEMPORARY Record Integer;Number : Integer;RevType : 'Transaction,Register';VAR NextLineNo : Integer) TempRevertTransactionNo.FINDSET; REPEAT IF RevType = RevType::Transaction THEN GLEntry.SETRANGE("Transaction No.",TempRevertTransactionNo.Number); // GLEntry.SETFILTER("Entry No.",'<>%1',0); IF GLEntry.FINDSET THEN REPEAT CLEAR(ReversalEntry); IF RevType = RevType::Register THEN ReversalEntry."G/L Register No." := Number; ReversalEntry."Reversal Type" := RevType; ReversalEntry."Entry Type" := ReversalEntry."Entry Type"::"G/L Account"; ReversalEntry."Entry No." := GLEntry."Entry No."; IF NOT GLAcc.GET(GLEntry."G/L Account No.") THEN ERROR(Text009,GLEntry.TABLECAPTION,GLAcc.TABLECAPTION);
Answers