| | |
| | | productids.Add( forecast.ProductID() ); |
| | | traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() <> 0 and ( psdip.StartDate() + Duration::Days( 1 ) ).Date() < startofnextyear ){ |
| | | dayperiodtime := ( psdip.StartDate() + Duration::Days( 1 ) ).Date();//psdip.StartDate(); |
| | | dayperiodname := dayperiodtime.Format( "M2/D2/Y" ); |
| | | // dayperiodname := dayperiodtime.Format( "M2/D2/Y" ); |
| | | periodtime := dayperiodtime.StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // info( '-------------------------', periodname, periodtime ); |
| | | daycolumn := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime ); |
| | | // daycolumn := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | // info( '-------------------------', column.Name() ); |
| | | quantity := [Number]psdip.Quantity();//四舍五入 |
| | | |
| | | factoryrow.Initialize( column, quantity ); |
| | | factoryrow.Initialize( daycolumn, quantity ); |
| | | // factoryrow.Initialize( daycolumn, quantity ); |
| | | } |
| | | } |
| | | } |
| | |
| | | and ( pispip.Start() + Duration::Days( 1 ) ).Date() < startofnextyear |
| | | and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ){ |
| | | dayperiodtime := ( pispip.Start() + Duration::Days( 1 ) ).Date();//pispip.Start().Date(); |
| | | dayperiodname := dayperiodtime.Format( "M2/D2/Y" ); |
| | | // dayperiodname := dayperiodtime.Format( "M2/D2/Y" ); |
| | | periodtime := dayperiodtime.StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | daycolumn := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime ); |
| | | // daycolumn := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | quantity := [Number]pispip.NewSupplyQuantity();//四舍五入 |
| | | |
| | | factoryrow.Initialize( column, quantity );//取Total Demand字段按月汇总需求数量 |
| | | factoryrow.Initialize( daycolumn, quantity ); |
| | | // factoryrow.Initialize( daycolumn, quantity ); |
| | | } |
| | | } |
| | | // } |