...
DtldVendLedgEntry.SETRANGE("Vendor Ledger Entry No.",VendLedgEntry."Entry No.");
DtldVendLedgEntry.SETFILTER("Entry Type",'<>%1',DtldVendLedgEntry."Entry Type"::"Initial Entry");
DtldVendLedgEntry.SETRANGE(Unapplied,FALSE);
IF NOT DtldVendLedgEntry.ISEMPTY THEN
ERROR(Text000,VendLedgEntry.TABLECAPTION,VendLedgEntry."Entry No.");
END;
PROCEDURE SetReverseFilter@1(Number@1001 : Integer;RevType@1000 : 'Transaction,Register');
BEGIN
IF RevType = RevType::Transaction THEN BEGIN
...
...
DtldVendLedgEntry.SETRANGE("Vendor Ledger Entry No.",VendLedgEntry."Entry No.");
DtldVendLedgEntry.SETFILTER("Entry Type",'<>%1',DtldVendLedgEntry."Entry Type"::"Initial Entry");
DtldVendLedgEntry.SETRANGE(Unapplied,FALSE);
IF NOT DtldVendLedgEntry.ISEMPTY THEN
ERROR(Text000,VendLedgEntry.TABLECAPTION,VendLedgEntry."Entry No.");
// Add the following lines.
DtldVendLedgEntry.SETRANGE(Unapplied);
DtldVendLedgEntry.SETFILTER("Entry Type",'%1|%2',
DtldVendLedgEntry."Entry Type"::"Realized Gain",DtldVendLedgEntry."Entry Type"::"Realized Loss");
IF NOT DtldVendLedgEntry.ISEMPTY THEN
ERROR(Text013,VendLedgEntry.TABLECAPTION,VendLedgEntry."Entry No.");
// End of the lines.
END;
PROCEDURE SetReverseFilter@1(Number@1001 : Integer;RevType@1000 : 'Transaction,Register');
BEGIN
IF RevType = RevType::Transaction THEN BEGIN
...