Modifying the Mileage Reimbursement Plan Item

The plan item data that can be modified depends upon whether the case has been created and subsequently activated. Upon case activation, the expected start and end dates and the expected outcome may no longer be modified (the plan item is considered In Progress). As we are dealing with a plan item that results in the creation of a product delivery, the actual start and end date and the actual cost must be derived from the product delivery and may not be entered by the user in respect of the plan item. The plan item outcome may not be entered until the associated product delivery is closed (the plan item is Completed).

Because the user should not enter the actual start or end date or the actual cost, the modify page for this type of plan item would not include these fields. Also, the processing associated with the mileage reimbursement specific details - mileage rate and amount, depends upon whether the associated product delivery has been created. If the product delivery has not yet been created, then the value entered for these fields should update the values stored on the MileageReimbursementData entity. However, once the product delivery has been created, depending on the specific requirement updating these fields should either not be allowed or should result in an update to the case evidence (if it is an update to the case evidence, consideration must be given to the date from which this change is effective).