Set Planned Start Date only if lead time is available and it is not already completed
Planned date and Planned Start Date are set depending on which one is completed first. I propose to make Planned Start Date be set in a similar manner as Planned Date.
I propose the following changes:
- Set Planned Start Date if production has a lead time
- Set Planned Start Date if it has no value
- Set Planned Start Date if it is after Planned Date
- Distinct no lead time to empty timedelta.