...
COPYFILTERS(Vend2);
SETCURRENTKEY(Priority);
SETRANGE(Priority,0);
IF FIND('-') THEN
REPEAT
// Delete the following lines.
Window.UPDATE(1,"No.");
GetVendLedgEntries(TRUE,FALSE);
GetVendLedgEntries(FALSE,FALSE);
CheckAmounts(FALSE);
ClearNegative;
// End of the lines.
UNTIL (NEXT = 0) OR StopPayments;
END;
IF UsePaymentDisc AND NOT StopPayments THEN BEGIN
RESET;
COPYFILTERS(Vend2);
Window.OPEN(Text007);
IF FIND('-') THEN
REPEAT
// Delete the following lines.
Window.UPDATE(1,"No.");
PayableVendLedgEntry.SETRANGE("Vendor No.","No.");
GetVendLedgEntries(TRUE,TRUE);
GetVendLedgEntries(FALSE,TRUE);
CheckAmounts(TRUE);
UNTIL (NEXT = 0) OR StopPayments;
END;
ClearNegative;
// End of the lines.
JnlLineDim.LOCKTABLE;
...
...
COPYFILTERS(Vend2);
SETCURRENTKEY(Priority);
SETRANGE(Priority,0);
IF FIND('-') THEN
REPEAT
// Add the following lines.
CLEAR(VendorBalance);
CALCFIELDS("Balance (LCY)");
VendorBalance := "Balance (LCY)";
IF VendorBalance > 0 THEN BEGIN
Window.UPDATE(1,"No.");
GetVendLedgEntries(TRUE,FALSE);
GetVendLedgEntries(FALSE,FALSE);
CheckAmounts(FALSE);
ClearNegative;
END;
// End of the lines.
UNTIL (NEXT = 0) OR StopPayments;
END;
IF UsePaymentDisc AND NOT StopPayments THEN BEGIN
RESET;
COPYFILTERS(Vend2);
Window.OPEN(Text007);
IF FIND('-') THEN
REPEAT
// Add the following lines.
CLEAR(VendorBalance);
CALCFIELDS("Balance (LCY)");
VendorBalance := "Balance (LCY)";
Window.UPDATE(1,"No.");
PayableVendLedgEntry.SETRANGE("Vendor No.","No.");
IF VendorBalance > 0 THEN BEGIN
GetVendLedgEntries(TRUE,TRUE);
GetVendLedgEntries(FALSE,TRUE);
CheckAmounts(TRUE);
ClearNegative;
END;
UNTIL (NEXT = 0) OR StopPayments;
END ELSE
IF FIND('-') THEN
REPEAT
ClearNegative;
UNTIL NEXT = 0;
// End of the lines.
JnlLineDim.LOCKTABLE;
...