To implement this hotfix, you must have a developer license.
You do not have to have rights to the data stores unless you have to perform data repair.
...
END;
LOCAL PROCEDURE AdjustDate@1100056(VAR NonPaymentPeriod@1100006 : Record 10702;VAR PaymentDay@1100005 : Record 10701;VAR DueDate@1100001 : Date;MinDate@1100000 : Date;MaxDate@1100002 : Date);
VAR
InitialDate@1100003 : Date;
// Delete the following lines.
ForwardCalculation@1100004 : Boolean;
BEGIN
IF DueDateIsGreaterMaxAvailDate(DueDate,MinDate,MaxDate) THEN
DueDate := MaxDate;
ForwardCalculation := TRUE;
REPEAT
InitialDate := DueDate;
IF NOT NonPaymentPeriod.ISEMPTY THEN BEGIN
IF ForwardCalculation THEN BEGIN
DueDate := AdjustToNonPaymentPeriod(NonPaymentPeriod,DueDate,ForwardCalculation);
IF DueDateIsGreaterMaxAvailDate(DueDate,MinDate,MaxDate) THEN
ForwardCalculation := FALSE
END;
IF NOT ForwardCalculation THEN
DueDate := AdjustToNonPaymentPeriod(NonPaymentPeriod,InitialDate,ForwardCalculation);
END;
IF NOT PaymentDay.ISEMPTY THEN BEGIN
IF ForwardCalculation THEN BEGIN
DueDate := AdjustToPaymentDay(PaymentDay,DueDate,'>','-','+');
IF DueDateIsGreaterMaxAvailDate(DueDate,MinDate,MaxDate) THEN
ForwardCalculation := FALSE
END;
IF NOT ForwardCalculation THEN
// End of the lines.
DueDate := AdjustToPaymentDay(PaymentDay,InitialDate,'<','+','-');
END;
IF (DueDate < MinDate) OR PaymentDayInNonPaymentPeriod(NonPaymentPeriod,PaymentDay,DueDate) THEN BEGIN
DueDate := 0D;
EXIT
...
END;
LOCAL PROCEDURE AdjustDate@1100056(VAR NonPaymentPeriod@1100006 : Record 10702;VAR PaymentDay@1100005 : Record 10701;VAR DueDate@1100001 : Date;MinDate@1100000 : Date;MaxDate@1100002 : Date);
VAR
InitialDate@1100003 : Date;
// Add the following lines.
ForwardCalculationNonPayment@1100004 : Boolean;
ForwardCalculationPaymentDay@1100007 : Boolean;
BEGIN
IF DueDateIsGreaterMaxAvailDate(DueDate,MinDate,MaxDate) THEN
DueDate := MaxDate;
ForwardCalculationNonPayment := TRUE;
ForwardCalculationPaymentDay := TRUE;
REPEAT
InitialDate := DueDate;
IF NOT NonPaymentPeriod.ISEMPTY THEN BEGIN
IF ForwardCalculationNonPayment THEN BEGIN
DueDate := AdjustToNonPaymentPeriod(NonPaymentPeriod,DueDate,ForwardCalculationNonPayment);
IF DueDateIsGreaterMaxAvailDate(DueDate,MinDate,MaxDate) THEN
ForwardCalculationNonPayment := FALSE
END ELSE
DueDate := AdjustToNonPaymentPeriod(NonPaymentPeriod,InitialDate,ForwardCalculationNonPayment);
END;
IF NOT PaymentDay.ISEMPTY THEN BEGIN
IF ForwardCalculationPaymentDay THEN BEGIN
DueDate := AdjustToPaymentDay(PaymentDay,DueDate,'>','-','+');
IF DueDateIsGreaterMaxAvailDate(DueDate,MinDate,MaxDate) THEN
ForwardCalculationPaymentDay := FALSE
END ELSE
// End of the lines.
DueDate := AdjustToPaymentDay(PaymentDay,InitialDate,'<','+','-');
END;
IF (DueDate < MinDate) OR PaymentDayInNonPaymentPeriod(NonPaymentPeriod,PaymentDay,DueDate) THEN BEGIN
DueDate := 0D;
EXIT