...
IF NOT
ValidateCapableToPromise(
ItemNo,VariantCode,LocationCode,CalculationStartDate,
// Delete the following line.
NeededQty,UnitOfMeasure,"Order Promising ID",PeriodType)
// End of the deleted line.
...
...
IF NOT
ValidateCapableToPromise(
ItemNo,VariantCode,LocationCode,CalculationStartDate,
// Add the following line.
NeededQty,UnitOfMeasure,"Order Promising ID",PeriodType,DueDateOfReqLine)
...
...
RemoveReqLines("Order Promising ID","Source Line No.",OrderPromisingLineToSave,FALSE);
// Delete the following lines.
IsValid := ValidateCapableToPromise(ItemNo,VariantCode,LocationCode,CalculationStartDate,
NeededQty,UnitOfMeasure,"Order Promising ID",PeriodType);
// End of the deleted lines.
...
...
RemoveReqLines("Order Promising ID","Source Line No.",OrderPromisingLineToSave,FALSE);
// Add the following lines.
IsValid :=
ValidateCapableToPromise(ItemNo,VariantCode,LocationCode,CalculationStartDate,
NeededQty,UnitOfMeasure,"Order Promising ID",PeriodType,DueDateOfReqLine);
...
...
ValidateCapableToPromise(ItemNo,VariantCode,LocationCode,CapableToPromiseDate,
// Delete the following line.
NeededQty,UnitOfMeasure,"Order Promising ID",PeriodType);
// End of the deleted line.
END;
CalculationDialog.CLOSE;
...
...
ValidateCapableToPromise(ItemNo,VariantCode,LocationCode,CapableToPromiseDate,
// Add the following line.
NeededQty,UnitOfMeasure,"Order Promising ID",PeriodType,DueDateOfReqLine);
// End of the added line.
END;
CalculationDialog.CLOSE;
...
...
CapableToPromiseDate := CalculationStartDate;
LastValidLine := GetNextOrderPromisingLineNo;
...
...
CapableToPromiseDate := CalculationStartDate
// Add the following lines.
IF CapableToPromiseDate <> DueDateOfReqLine THEN
CapableToPromiseDate := DueDateOfReqLine;
// End of the added lines.
LastValidLine := GetNextOrderPromisingLineNo;
...