| | |
| | | [* |
| | | // 甄兰鸽 Jun-25-2024 (created) |
| | | //查询日期返回需要在计划日期之内 |
| | | traverse( owner, Period_MP, period, not period.IsHistorical() and period.StartDate() >= startdate and period.EndDate() <= enddate |
| | | and ( ( timeunit = 'All' and ( period.TimeUnit() = Translations::MP_GlobalParameters_Day() or period.TimeUnit() = Translations::MP_GlobalParameters_Week() ) ) |
| | | or period.TimeUnit() = timeunit ) ){ |
| | | periodtime := period.StartDate(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | weekstart := owner.StartOfPlanning().Date(); |
| | | traverse( owner, Period_MP, period, not period.IsHistorical() and period.TimeUnit() = Translations::MP_GlobalParameters_Day() ){ |
| | | if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Day() ){ |
| | | periodtime := period.StartDate(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | this.Column( relnew, Name := periodname, Period := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | } |
| | | |
| | | this.Column( relnew, Name := periodname, Period := periodtime, TimeUnit := period.TimeUnit() ); |
| | | if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | if( period.StartDate() = weekstart ){ |
| | | weekperiodname := weekstart.Format( "M2/D2/Y" ); |
| | | this.Column( relnew, Name := weekperiodname, Period := weekstart, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | weekstart := ( weekstart + Duration::Days( 7 ) ).Date(); |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |