Update the Start Date of DP contracts when distributing Scale Tickets

Issue No: CT-7621
Created 7/28/2022 9:47:48 AM
Type Feature
Priority Critical
Status Closed
Resolution Fixed
Fixed Version 20.1
Description *This issue relates to i21 Help Desk ticket:* [ HDTN-275378 - DP Bushel Storage records are duplicating in storage grid|https://helpdesk.irely.com/iRelyi21live/#/HD/Ticket/?ticket=HDTN-275378]   *This issue relates to i21 Help Desk ticket:* [ HDTN-275378 - DP Bushel Storage records are duplicating in storage grid|https://helpdesk.irely.com/iRelyi21live/#/HD/Ticket/?ticket=HDTN-275378]     This is the proposed program fix for this issue in GRN-3026 to update the "Start Date" of the existing DP contract to match the scale ticket date, as long as the scale ticket date is earlier than the "End Date" of the existing DP contract.     This change will behave as follows:   # A ticket with DP storage and scale date 7/18 gets distributed for Delivery Sheet X. # A DP contract is automatically created with start date 7/18 and end date 7/31, assuming there is no existing DP contract for that entity. # Another ticket with DP storage gets distributed for Delivery Sheet X but with scale date 7/14 (earlier than the previous ticket). # *{color:#27ae60}No DP contract will be automatically created. Instead, the "Start Date" of the DP contract created from step #2 will be updated from 7/18 to 7/14 since the scale date (7/14) is earlier than the "End Date" (7/31) of the DP contract.{color}* # *{color:#27ae60}When another ticket is created for the same delivery sheet with scale date of earlier than 07/14, the "Start Date" will just be updated again instead of creating another DP contract.{color}* # The said changes will be logged in the Audit Log for tracking purposes.     *Requirement for Conctract Side* :   Create an SP that will be used to update the DP contract "Start Date" based on the behavior above.   That SP should be able to add logs in the Audit Log when the start date is updated.