| | |
| | | ccunit := FinancialSalesReport::GetDefaultCCUnit(); |
| | | dlunit := FinancialSalesReport::GetDefaultDLUnit(); |
| | | ccsalessegment := FinancialSalesReport::GetSalesSegmentCC(); |
| | | //tjsalessegment := FinancialSalesReport::GetSalesSegmentTJ(); |
| | | //fssalessegment := FinancialSalesReport::GetSalesSegmentFS(); |
| | | tjsalessegment := FinancialSalesReport::GetSalesSegmentTJ(); |
| | | fssalessegment := FinancialSalesReport::GetSalesSegmentFS(); |
| | | //ccspline := FinancialSalesReport::GetStockingPointCCLine(); |
| | | //dlspline := FinancialSalesReport::GetStockingPointDLLine(); |
| | | //ccrent := FinancialSalesReport::GetStockingPointCCRent(); |
| | |
| | | //是否属于长春 |
| | | iscc := salessegment.Name().StartsWith( ccsalessegment ) or exists( parentsalessegments, Elements, psalessegment, psalessegment.Name().StartsWith( ccsalessegment ) ); |
| | | isccrent := iscc and stockingpoint.EndsWith( '外租库' ) and ( stockingpoint.StartsWith( 'CC' ) or stockingpoint.StartsWith( '长春' ) ); |
| | | isdl := salessegment.Name().StartsWith( tjsalessegment ) or salessegment.Name().StartsWith( fssalessegment ) |
| | | or exists( parentsalessegments, Elements, psalessegment, psalessegment.Name().StartsWith( tjsalessegment ) ) |
| | | or exists( parentsalessegments, Elements, psalessegment, psalessegment.Name().StartsWith( fssalessegment ) ); |
| | | //Forecast的Sales Segment为长春,识别出MLB的所有产品汇总 |
| | | //大连财务销量:首先在forecast界面查找Sales Segment是天津和佛山的所有需求,每个产品按月汇总需求数量 and forecast.Product_MP().MQBMLB() = 'MLB' ) |
| | | if( ( iscc and product.MQBMLB() = 'MLB' ) or ( isccrent and product.MQBMLB() = 'MQB' ) ){ |
| | | if( ( iscc and product.MQBMLB() = 'MLB' ) or ( isccrent and product.MQBMLB() = 'MQB' ) or isdl ){ |
| | | |
| | | //获取合计行 |
| | | allrow := table.GetRow( allunit, product ); |
| | | //获取工厂行 |
| | | factoryrow := table.GetRow( ccunit, product ); |
| | | factoryrow := table.GetRow( ifexpr( isdl, dlunit, ccunit ), product ); |
| | | |
| | | products.Add( product ); |
| | | traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() <> 0 ){ |