...
IF ClosePerBusUnit OR ClosePerGlobalDim1 OR ClosePerGlobalDim2 OR NOT ClosePerGlobalDimOnly THEN
SETCURRENTKEY(
"G/L Account No.","Business Unit Code",
"Global Dimension 1 Code","Global Dimension 2 Code","Close Income Statement Dim. ID",
// Delete the following line.
"Posting Date","Bal. Account No.")
ELSE
// Delete the following lines.
SETCURRENTKEY("G/L Account No.","Posting Date","Bal. Account No.");
IF Integer.Number = 2 THEN
SETFILTER("Bal. Account No.",'<>%1',ClAccNo);
// End of the lines.
EntryNoAmountBuf.DELETEALL;
CLEAR(DimBufMgt2);
...
...
IF ClosePerBusUnit OR ClosePerGlobalDim1 OR ClosePerGlobalDim2 OR NOT ClosePerGlobalDimOnly THEN
SETCURRENTKEY(
"G/L Account No.","Business Unit Code",
"Global Dimension 1 Code","Global Dimension 2 Code","Close Income Statement Dim. ID",
// Add the following line.
"Posting Date","Bal. Account No.","Transaction No.")
ELSE
// Add the following line.
SETCURRENTKEY("G/L Account No.","Posting Date","Bal. Account No.","Transaction No.");
SETRANGE("Posting Date",FiscalYearStartDate,FiscYearClosingDate);
// Add the following lines.
IF (GLSetup."Additional Reporting Currency" <> '') AND (Integer.Number = 2) THEN
IF CloseTransactionNo <> 0 THEN
SETFILTER("Transaction No.",'<>%1',CloseTransactionNo);
// End of the lines.
EntryNoAmountBuf.DELETEALL;
CLEAR(DimBufMgt2);
...