...
CLEAR(DtldCustLedgEntry);
DtldCustLedgEntry.SETCURRENTKEY("Transaction No.","Customer No.","Entry Type");
DtldCustLedgEntry.SETRANGE(DtldCustLedgEntry."Transaction No.",CustLedgEntry."Transaction No.");
DtldCustLedgEntry.SETRANGE(DtldCustLedgEntry."Customer No.",CustLedgEntry."Customer No.");
DtldCustLedgEntry.SETFILTER(
DtldCustLedgEntry."Entry Type",'<>%1',DtldCustLedgEntry."Entry Type"::"Initial Entry");
// Delete the following line.
IF DtldCustLedgEntry.FIND('-') THEN BEGIN
// End of the deleted line.
IF RevType = RevType::Register THEN
ERROR(Text012,Number);
// Delete the following lines.
CLEAR(DtldCustLedgEntry);
DtldCustLedgEntry.SETCURRENTKEY("Cust. Ledger Entry No.");
DtldCustLedgEntry.SETRANGE("Cust. Ledger Entry No.",CustLedgEntry."Entry No.");
DtldCustLedgEntry.SETRANGE(Unapplied,TRUE);
IF DtldCustLedgEntry.FIND('-') THEN BEGIN
REPEAT
TempRevertTransactionNo.Number := DtldCustLedgEntry."Transaction No.";
IF TempRevertTransactionNo.INSERT THEN;
UNTIL DtldCustLedgEntry.NEXT = 0;
END;
END;
// End of the deleted lines.
UNTIL CustLedgEntry.NEXT = 0;
IF VendLedgEntry.FIND('-') THEN
REPEAT
CLEAR(ReversalEntry);
...
...
CLEAR(DtldCustLedgEntry);
DtldCustLedgEntry.SETCURRENTKEY("Transaction No.","Customer No.","Entry Type");
DtldCustLedgEntry.SETRANGE(DtldCustLedgEntry."Transaction No.",CustLedgEntry."Transaction No.");
DtldCustLedgEntry.SETRANGE(DtldCustLedgEntry."Customer No.",CustLedgEntry."Customer No.");
DtldCustLedgEntry.SETFILTER(
DtldCustLedgEntry."Entry Type",'<>%1',DtldCustLedgEntry."Entry Type"::"Initial Entry");
// Add the following line.
IF NOT DtldCustLedgEntry.ISEMPTY THEN
// End of the added line.
IF RevType = RevType::Register THEN
ERROR(Text012,Number);
// Add the following line.
CheckDtldCustLedgEntry(CustLedgEntry);
// End of the added line.
UNTIL CustLedgEntry.NEXT = 0;
IF VendLedgEntry.FIND('-') THEN
REPEAT
CLEAR(ReversalEntry);
...
...
CLEAR(DtldVendLedgEntry);
DtldVendLedgEntry.SETCURRENTKEY("Transaction No.","Vendor No.","Entry Type");
DtldVendLedgEntry.SETRANGE(DtldVendLedgEntry."Transaction No.",VendLedgEntry."Transaction No.");
DtldVendLedgEntry.SETRANGE(DtldVendLedgEntry."Vendor No.",VendLedgEntry."Vendor No.");
DtldVendLedgEntry.SETFILTER(
DtldVendLedgEntry."Entry Type",'<>%1',DtldVendLedgEntry."Entry Type"::"Initial Entry");
// Delete the following line.
IF DtldVendLedgEntry.FIND('-') THEN BEGIN
// End of the deleted line.
IF RevType = RevType::Register THEN
ERROR(Text012,Number);
// Delete the following lines.
CLEAR(DtldVendLedgEntry);
DtldVendLedgEntry.SETCURRENTKEY("Vendor Ledger Entry No.");
DtldVendLedgEntry.SETRANGE("Vendor Ledger Entry No.",VendLedgEntry."Entry No.");
DtldVendLedgEntry.SETRANGE(Unapplied,TRUE);
IF DtldVendLedgEntry.FIND('-') THEN BEGIN
REPEAT
TempRevertTransactionNo.Number := DtldVendLedgEntry."Transaction No.";
IF TempRevertTransactionNo.INSERT THEN;
UNTIL DtldVendLedgEntry.NEXT = 0;
END;
END;
// End of the deleted lines.
UNTIL VendLedgEntry.NEXT = 0;
IF BankAccLedgEntry.FIND('-') THEN
REPEAT
CLEAR(ReversalEntry);
...
...
CLEAR(DtldVendLedgEntry);
DtldVendLedgEntry.SETCURRENTKEY("Transaction No.","Vendor No.","Entry Type");
DtldVendLedgEntry.SETRANGE(DtldVendLedgEntry."Transaction No.",VendLedgEntry."Transaction No.");
DtldVendLedgEntry.SETRANGE(DtldVendLedgEntry."Vendor No.",VendLedgEntry."Vendor No.");
DtldVendLedgEntry.SETFILTER(
DtldVendLedgEntry."Entry Type",'<>%1',DtldVendLedgEntry."Entry Type"::"Initial Entry");
// Add the following line.
IF NOT DtldVendLedgEntry.ISEMPTY THEN
// End of the added line.
IF RevType = RevType::Register THEN
ERROR(Text012,Number);
// Add the following line.
CheckDtldVendLedgEntry(VendLedgEntry);
// End of the added line.
UNTIL VendLedgEntry.NEXT = 0;
IF BankAccLedgEntry.FIND('-') THEN
REPEAT
CLEAR(ReversalEntry);
...