Kevin: 修改了更改Period开始时间是报错的问题。
| | |
| | | //get period of start |
| | | ddstartperiod := select( gp.MacroPlan(), PlanningPeriod, pp, pp.Start() <= start and pp.End() > start ); |
| | | |
| | | // if not start from middle and leadtime < period task period duration, make sure dependent demand end before period start |
| | | periodstart := ifexpr( not gp.IsOperationLeadTimeLogicFromMiddle() and period.Duration() < process.LeadTime(), period.Start(), DateTime::MaxDateTime() ); |
| | | |
| | | value := minvalue( start + process.LeadTime(), start + ddstartperiod.Duration(), periodstart ); |
| | | // Tianma fix 20230920 |
| | | if( not isnull( ddstartperiod ) ) |
| | | { |
| | | // if not start from middle and leadtime < period task period duration, make sure dependent demand end before period start |
| | | periodstart := ifexpr( not gp.IsOperationLeadTimeLogicFromMiddle() and period.Duration() < process.LeadTime(), period.Start(), DateTime::MaxDateTime() ); |
| | | |
| | | value := minvalue( start + process.LeadTime(), start + ddstartperiod.Duration(), periodstart ); |
| | | } |
| | | } |
| | | |
| | | return value; |