| | |
| | | table := source.FinancialSalesReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false ); |
| | | showtable := source.FinancialSalesReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true ); |
| | | startofplanning := owner.StartOfPlanning(); |
| | | startofyear := startofplanning.StartOfYear(); |
| | | //startofyear := startofplanning.StartOfYear(); |
| | | startofnextyear := startofplanning.StartOfNextYear(); |
| | | |
| | | search := source.FinancialSalesSearch( relnew, Unit := allsalessegment, Generation := allsalessegment, MqbMlb := allsalessegment, Power := allsalessegment ); |
| | |
| | | traverse( owner, SalesDemand.astype( Forecast ), forecast, forecast.StartDate() < startofnextyear.Date() and ( ( forecast.SalesSegmentName() = ccsalessegment and forecast.Product_MP().MQBMLB() = 'MLB' ) |
| | | or forecast.SalesSegmentName() = tjsalessegment or forecast.SalesSegmentName() = fssalessegment ) ){ |
| | | product := forecast.Product_MP(); |
| | | allrow := table.GetRow( allsalessegment, product.ID(), startofyear, startofnextyear ); |
| | | allrow := table.GetRow( allsalessegment, product.ID() ); |
| | | periodtime := forecast.StartDate().StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | |
| | | //Forecast的Sales Segment为长春,识别出MLB的所有产品汇总 |
| | | if( forecast.SalesSegmentName() = ccsalessegment and product.MQBMLB() = 'MLB' ){ |
| | | // info( '------------------------', column.Name() ); |
| | | ccrow := table.GetRow( ccsalessegment, product.ID(), startofyear, startofnextyear ); |
| | | ccrow := table.GetRow( ccsalessegment, product.ID() ); |
| | | // info( '------------------------', ccrow.FinancialSalesCell( relsize ), column.FinancialSalesCell( relsize ) ); |
| | | ccrow.Initialize( column, forecast.Quantity() ); |
| | | }else if( forecast.SalesSegmentName() = tjsalessegment or forecast.SalesSegmentName() = fssalessegment ){ |
| | | //大连财务销量:首先在forecast界面查找Sales Segment是天津和佛山的所有需求,每个产品按月汇总需求数量 |
| | | // info( '------------------------', column.Name() ); |
| | | dlrow := table.GetRow( dlsalessegment, product.ID(), startofyear, startofnextyear ); |
| | | dlrow := table.GetRow( dlsalessegment, product.ID() ); |
| | | // info( '------------------------', dlrow.FinancialSalesCell( relsize ), column.FinancialSalesCell( relsize ) ); |
| | | dlrow.Initialize( column, forecast.Quantity() ); |
| | | } |
| | |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | ccrow := table.GetRow( ccsalessegment, product.ID(), startofyear, startofnextyear ); |
| | | ccrow := table.GetRow( ccsalessegment, product.ID() ); |
| | | ccrow.Initialize( column, pispip.DependentDemandAndSalesDemandQuantity() );//取Total Demand字段按月汇总需求数量 |
| | | |
| | | allrow := table.GetRow( allsalessegment, product.ID(), startofyear, startofnextyear ); |
| | | allrow := table.GetRow( allsalessegment, product.ID() ); |
| | | allrow.Initialize( column, pispip.DependentDemandAndSalesDemandQuantity() ); |
| | | } |
| | | } |
| | |
| | | |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | traverse( trip, ProductInTrip, pit ){ |
| | | dlrow := table.GetRow( dlsalessegment, pit.ProductID(), startofyear, startofnextyear ); |
| | | dlrow := table.GetRow( dlsalessegment, pit.ProductID() ); |
| | | dlrow.Initialize( column, pit.Quantity() );//取Total Demand字段按月汇总需求数量 |
| | | |
| | | allrow := table.GetRow( allsalessegment, pit.ProductID(), startofyear, startofnextyear ); |
| | | allrow := table.GetRow( allsalessegment, pit.ProductID() ); |
| | | allrow.Initialize( column, pit.Quantity() ); |
| | | } |
| | | } |