| | |
| | | traverse( table, GeneralExcelImportAndExportDataRow, row ){ |
| | | productcell := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 ); |
| | | factorycell := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 0 ); |
| | | idsrow := idstable.GetRowByUnit( productcell.Value(), factorycell.Value() ); |
| | | unitname := ifexpr( factorycell.Value().StartsWith( '长春' ), FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() ); |
| | | idsrow := idstable.GetRowByUnit( productcell.Value(), unitname ); |
| | | traverse( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 2 ){ |
| | | period := cnv2.Convert( cell.GeneralExcelImportAndExportDataColumn().Name() ); |
| | | daycolumn := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), period ); |
| | |
| | | } |
| | | } |
| | | traverse ( macroplan, SalesDemand.astype( Forecast ), forecast, not isnull( forecast.Product_MP() ) and forecast.Origin() = 'PPA' ){ |
| | | unitname := ifexpr( forecast.SalesSegment_MP().Name().StartsWith( 'Changchun' ) |
| | | |
| | | unitname := ifexpr( forecast.StockingPointID().StartsWith( '长春' ) , FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() );/*ifexpr( forecast.SalesSegment_MP().Name().StartsWith( 'Changchun' ) |
| | | or exists( forecast.SalesSegment_MP().GetAllParent(), Elements, psalessegment, psalessegment.Name().StartsWith( 'Changchun' ) ) |
| | | , FinancialProductionReport::GetDefaultCCUnit() |
| | | , FinancialProductionReport::GetDefaultDLUnit() ); |
| | | , FinancialProductionReport::GetDefaultDLUnit() );*/ |
| | | traverse( forecast, PlanningSalesDemandInPeriod, sdip ){ |
| | | idsrow := idstable.GetRowByUnit( forecast.ProductID(), unitname ); |
| | | daycolumn := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), sdip.StartDate() ); |