...
i := 1;
IF SortPostDate THEN
VATEntry.SETCURRENTKEY(Type,"Posting Date","Document Type","Document No.","Bill-to/Pay-to No.")
ELSE
VATEntry.SETCURRENTKEY("No. Series","Posting Date","Document No.");
// Delete the following lines.
END;
OnAfterGetRecord=BEGIN
VATBuffer.DELETEALL;
// End of the lines.
DocType := FORMAT("Document Type");
IF "Document Type" = "Document Type"::"Credit Memo" THEN
DocType := Text1100005;
END;
...
...
i := 1;
IF SortPostDate THEN
VATEntry.SETCURRENTKEY(Type,"Posting Date","Document Type","Document No.","Bill-to/Pay-to No.")
ELSE
VATEntry.SETCURRENTKEY("No. Series","Posting Date","Document No.");
// Add the following lines.
TempVATEntry.RESET;
TempVATEntry.DELETEALL;
END;
OnAfterGetRecord=BEGIN
VATBuffer.DELETEALL;
TempVATEntry := VATEntry;
IF TempVATEntry.FIND THEN
CurrReport.SKIP;
// End of the lines.
DocType := FORMAT("Document Type");
IF "Document Type" = "Document Type"::"Credit Memo" THEN
DocType := Text1100005;
END;
...