IF FIND('+') THEN
IF ToMorrow("FA Posting Date",Year365Days) > LocalDate THEN
LocalDate := ToMorrow("FA Posting Date",Year365Days);
GetLastEntryDates(FANo,DeprBookCode,EntryDates);
FOR i := 1 TO 4 DO
// Delete the following lines.
IF EntryDates[i] <> 0D THEN
IF ToMorrow(EntryDates[i],Year365Days) > LocalDate THEN
LocalDate := ToMorrow(EntryDates[i],Year365Days);
// End of the deleted lines.
END;
EXIT(LocalDate);
END;
PROCEDURE GetMinusBookValue@17(FANo@1000 : Code[20];DeprBookCode@1001 : Code[10];StartingDate@1002 : Date;EndingDate@1003 : Date) : Decimal;
IF FIND('+') THEN
IF ToMorrow("FA Posting Date",Year365Days) > LocalDate THEN
LocalDate := ToMorrow("FA Posting Date",Year365Days);
GetLastEntryDates(FANo,DeprBookCode,EntryDates);
FOR i := 1 TO 4 DO
// Add the following lines.
IF EntryDates[i] > LocalDate THEN
LocalDate := EntryDates[i];
// End of the added lines.
END;
EXIT(LocalDate);
END;
PROCEDURE GetMinusBookValue@17(FANo@1000 : Code[20];DeprBookCode@1001 : Code[10];StartingDate@1002 : Date;EndingDate@1003 : Date) : Decimal;