Merge remote-tracking branch 'origin/dev' into dev
 
	
	
	
	
	
	
	
	
	
	
	
	
	
 |  |  | 
 |  |  |             sumcell  := sumrow.Initialize( column ); | 
 |  |  |           } | 
 |  |  |           //æ¾ç¤ºæåå
æ ¼ | 
 |  |  |           showcell   := showrow.Cell( relnew, RentInCost := cell.RentInCost(), RentOutOfCost := cell.RentOutOfCost(), WerkToRentTransCost := cell.WerkToRentTransCost(), RentStorCost := cell.RentStorCost(), CoefficientValue := cell.CoefficientValue() ); | 
 |  |  |           showcell   := showrow.Cell( relnew, RentInCost := cell.RentInCost(), RentOutOfCost := cell.RentOutOfCost(), WerkToRentTransCost := cell.WerkToRentTransCost(), RentStorCost := cell.RentStorCost(), CoefficientValue := cell.CoefficientValue(), AllCost := cell.EstimateTotalCost() * [Real]cell.CoefficientValue() ); | 
 |  |  |           column.Cell( relinsert, showcell ); | 
 |  |  |           //æ¾ç¤ºå¹´åå
æ ¼ | 
 |  |  |           yearcell.RentInCost( cell.RentInCost() + yearcell.RentInCost() ); | 
 |  |  | 
 |  |  |           sumcell.WerkToRentTransCost( cell.WerkToRentTransCost() + sumcell.WerkToRentTransCost() ); | 
 |  |  |           sumcell.RentStorCost( cell.RentStorCost() + sumcell.RentStorCost() ); | 
 |  |  |         } | 
 |  |  |         yearcell.AllCost( yearcell.EstimateTotalCost() * [Real]yearcell.CoefficientValue() ); | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |     Transaction::Transaction().Propagate( attribute( CCEngineLogisticsCostCell, EstimateTotalCost ) ); | 
 |  |  |     traverse( yearcolumn, Cell, cell ){ | 
 |  |  |       cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() ); | 
 |  |  |     } | 
 |  |  |     traverse( sumrow, Cell, cell ){ | 
 |  |  |       cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() ); | 
 |  |  |       if( exists( cell.Column(), Cell, acell, acell.IsUpdate() ) ){ | 
 |  |  |         cell.IsUpdate( true ); | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |   *] | 
 
 |  |  | 
 |  |  |   TextBody: | 
 |  |  |   [* | 
 |  |  |     // çå
°é¸½ Sep-20-2024 (created) | 
 |  |  |     name                      := CCEngineLogisticsCostReport::GetDefaultName(); | 
 |  |  |     //name                      := CCEngineLogisticsCostReport::GetDefaultName(); | 
 |  |  |     source                    := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" ); | 
 |  |  |     source.ReadStructure(); | 
 |  |  |     Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) ); | 
 |  |  |      | 
 |  |  |     //æ¸
空导å
¥ä¹åç表 | 
 |  |  |     owner.CCEngineLogisticsCostReport( relflush ); | 
 |  |  |     //owner.CCEngineLogisticsCostReport( relflush ); | 
 |  |  |     cnv2 := StringToDate::StandardConverter(); | 
 |  |  |     cnv2.SetCustomConversion(); | 
 |  |  |     //cnv2.CustomFormatString( "M2/D2/Y" ); | 
 |  |  | 
 |  |  |     productcolumn             := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 0 ); | 
 |  |  |     attricolumn               := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 1 ); | 
 |  |  |     //çææ°è¡¨çæ¥æå | 
 |  |  |     table                     := owner.CCEngineLogisticsCostReport( relnew, ID := name, Name := name ); | 
 |  |  |     showtable                 := owner.CCEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true ); | 
 |  |  |     table.GenerateColumn( owner ); | 
 |  |  |     table                     := CCEngineLogisticsCostReport::InitiateSearch( owner ); | 
 |  |  |     traverse( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataRow, excelrow ){ | 
 |  |  |       productcell             := selectobject( excelrow, GeneralExcelImportAndExportDataCell, excelcell, excelcell.GeneralExcelImportAndExportDataColumn() = productcolumn ); | 
 |  |  |       //å¤çæªè¢«åæ¥ç产å | 
 |  |  | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |     rows := selectsortedset( table, Row, row, row.Name() ); | 
 |  |  |     i    := 0; | 
 |  |  |     traverse( rows, Elements, e ){ | 
 |  |  |       e.RowNr( i ); | 
 |  |  |       i := i + 1; | 
 |  |  |     } | 
 |  |  |     // | 
 |  |  |     showtable.Generate( owner.CCEngineLogisticsCostSearch(), products ); | 
 |  |  |   *] | 
 |  |  | } | 
 
 |  |  | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |     rows := selectsortedset( table, Row, row, row.Name() ); | 
 |  |  |     i    := 0; | 
 |  |  |     traverse( rows, Elements, e ){ | 
 |  |  |       e.RowNr( i ); | 
 |  |  |       i := i + 1; | 
 |  |  |     } | 
 |  |  |     //rows := selectsortedset( table, Row, row, row.Name() ); | 
 |  |  |     //i    := 0; | 
 |  |  |     //traverse( rows, Elements, e ){ | 
 |  |  |     //  e.RowNr( i ); | 
 |  |  |     //  i := i + 1; | 
 |  |  |     //} | 
 |  |  |     // | 
 |  |  |     showtable.Generate( search, products ); | 
 |  |  |   *] | 
 
 |  |  | 
 |  |  |                                       , DLRentOutOfCost              := cell.DLRentOutOfCost() | 
 |  |  |                                       , WerkToDLRentTransCost        := cell.WerkToDLRentTransCost() | 
 |  |  |                                       , DLRentStorCost               := cell.DLRentStorCost() | 
 |  |  |                                       , CoefficientValue             := cell.CoefficientValue() ); | 
 |  |  |                                       , CoefficientValue             := cell.CoefficientValue() | 
 |  |  |                                       , AllCost                      := cell.EstimateTotalCost() * [Real]cell.CoefficientValue() ); | 
 |  |  |           column.Cell( relinsert, showcell ); | 
 |  |  |           //æ¾ç¤ºå¹´åå
æ ¼ | 
 |  |  |           yearcell.CCRentInCost( cell.CCRentInCost() + yearcell.CCRentInCost() ); | 
 |  |  | 
 |  |  |           sumcell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + sumcell.WerkToDLRentTransCost() ); | 
 |  |  |           sumcell.DLRentStorCost( cell.DLRentStorCost() + sumcell.DLRentStorCost() ); | 
 |  |  |         } | 
 |  |  |         yearcell.AllCost( yearcell.EstimateTotalCost() * [Real]yearcell.CoefficientValue() ); | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |     Transaction::Transaction().Propagate( attribute( DLEngineLogisticsCostCell, EstimateTotalCost ) ); | 
 |  |  |     traverse( yearcolumn, Cell, cell ){ | 
 |  |  |       cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() ); | 
 |  |  |     } | 
 |  |  |     traverse( sumrow, Cell, cell ){ | 
 |  |  |       cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() ); | 
 |  |  |       if( exists( cell.Column(), Cell, acell, acell.IsUpdate() ) ){ | 
 |  |  |         cell.IsUpdate( true ); | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |     info( '-------------------------g------------end---------------------------------' ); | 
 
 |  |  | 
 |  |  |           product12cellElement := xmlDOM.CreateElement( "cell" ); | 
 |  |  |           product12cellElement.SetAttribute( "value", row.Name() ); | 
 |  |  |           productcolumnelement.AppendChild( product12cellElement ); | 
 |  |  |            | 
 |  |  |           product13cellElement := xmlDOM.CreateElement( "cell" ); | 
 |  |  |           product13cellElement.SetAttribute( "value", row.Name() ); | 
 |  |  |           productcolumnelement.AppendChild( product13cellElement ); | 
 |  |  |           //Attribute | 
 |  |  |           //é¿æ¥å¤ç§åºå
¥åºè´¹ç¨ | 
 |  |  |           ccrententercostcellElement := xmlDOM.CreateElement( "cell" ); | 
 |  |  | 
 |  |  |           //大è¿å¤ç§åºä»å¨è´¹ç¨ | 
 |  |  |           dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); | 
 |  |  |           dlrentstoragecostcellElement.SetAttribute( "value", '大è¿å¤ç§åºä»å¨è´¹ç¨' );//DLRentStorageCost | 
 |  |  |           attricolumnelement.AppendChild( dlrentstoragecostcellElement ); | 
 |  |  |           //大è¿å¤ç§åºå
¶ä»è´¹ç¨ | 
 |  |  |           dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); | 
 |  |  |           dlrentstoragecostcellElement.SetAttribute( "value", '大è¿å¤ç§åºå
¶ä»è´¹ç¨' );//DLRentStorageCost | 
 |  |  |           attricolumnelement.AppendChild( dlrentstoragecostcellElement ); | 
 |  |  |           //é¢è®¡æ»è´¹ç¨ | 
 |  |  |           estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" ); | 
 |  |  | 
 |  |  |         dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); | 
 |  |  |         dlrentstoragecostcellElement.SetAttribute( "value", c.DLRentStorCost().Format( 'N(Dec)' ) ); | 
 |  |  |         columnelement.AppendChild( dlrentstoragecostcellElement ); | 
 |  |  |         //大è¿å¤ç§åºå
¶ä»è´¹ç¨ | 
 |  |  |         dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); | 
 |  |  |         dlrentstoragecostcellElement.SetAttribute( "value", c.DLRentOtherCost().Format( 'N(Dec)' ) ); | 
 |  |  |         columnelement.AppendChild( dlrentstoragecostcellElement ); | 
 |  |  |         //é¢è®¡æ»è´¹ç¨ | 
 |  |  |         estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" ); | 
 |  |  |         estimatedtotalcostcellElement.SetAttribute( "value", c.EstimateTotalCost().Format( 'N(Dec)' ) ); | 
 
 |  |  | 
 |  |  |   TextBody: | 
 |  |  |   [* | 
 |  |  |     // çå
°é¸½ Jun-25-2024 (created) | 
 |  |  |     return 'CC engine logistics cost reports'; | 
 |  |  |     return 'DL engine logistics cost reports'; | 
 |  |  |   *] | 
 |  |  | } | 
 
 |  |  | 
 |  |  |   TextBody: | 
 |  |  |   [* | 
 |  |  |     // çå
°é¸½ Sep-20-2024 (created) | 
 |  |  |     name                      := CCEngineLogisticsCostReport::GetDefaultName(); | 
 |  |  |     //name                      := CCEngineLogisticsCostReport::GetDefaultName(); | 
 |  |  |     source                    := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" ); | 
 |  |  |     source.ReadStructure(); | 
 |  |  |     Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) ); | 
 |  |  |      | 
 |  |  |     //æ¸
空导å
¥ä¹åç表 | 
 |  |  |     owner.DLEngineLogisticsCostReport( relflush ); | 
 |  |  |     cnv2 := StringToDate::StandardConverter(); | 
 |  |  |     cnv2.SetCustomConversion(); | 
 |  |  |     //cnv2.CustomFormatString( "M2/D2/Y" ); | 
 |  |  | 
 |  |  |     productcolumn             := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 0 ); | 
 |  |  |     attricolumn               := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 1 ); | 
 |  |  |     //çææ°è¡¨çæ¥æå | 
 |  |  |     table                     := owner.DLEngineLogisticsCostReport( relnew, ID := name, Name := name ); | 
 |  |  |     showtable                 := owner.DLEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true ); | 
 |  |  |     table.GenerateColumn( owner ); | 
 |  |  |     table                     := DLEngineLogisticsCostReport::InitiateSearch( owner ); | 
 |  |  |     traverse( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataRow, excelrow ){ | 
 |  |  |       productcell             := selectobject( excelrow, GeneralExcelImportAndExportDataCell, excelcell, excelcell.GeneralExcelImportAndExportDataColumn() = productcolumn ); | 
 |  |  |       //å¤çæªè¢«åæ¥ç产å | 
 |  |  | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |     rows := selectsortedset( table, Row, row, row.Name() ); | 
 |  |  |     i    := 0; | 
 |  |  |     traverse( rows, Elements, e ){ | 
 |  |  |       e.RowNr( i ); | 
 |  |  |       i := i + 1; | 
 |  |  |     } | 
 |  |  |     // | 
 |  |  |     showtable.Generate( owner.DLEngineLogisticsCostSearch(), products ); | 
 |  |  |   *] | 
 |  |  | } | 
 
 |  |  | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |      | 
 |  |  |     rows := selectsortedset( table, Row, row, row.Name() ); | 
 |  |  |     i    := 0; | 
 |  |  |     traverse( rows, Elements, e ){ | 
 |  |  |       e.RowNr( i ); | 
 |  |  |       i := i + 1; | 
 |  |  |     } | 
 |  |  |     //rows := selectsortedset( table, Row, row, row.Name() ); | 
 |  |  |     //i    := 0; | 
 |  |  |     //traverse( rows, Elements, e ){ | 
 |  |  |     //  e.RowNr( i ); | 
 |  |  |     //  i := i + 1; | 
 |  |  |     //} | 
 |  |  |     info( '-------------------------------------end----------------------------------' ); | 
 |  |  |     // | 
 |  |  |     showtable.Generate( search, products ); | 
 
 |  |  | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |       if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Week() ){ | 
 |  |  |         weekstartstr          := ' KW'; | 
 |  |  |         for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){ | 
 |  |  |           weekend             := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date(); | 
 |  |  |           weekend             := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();//Name := weekend.Format( "M2/D2/Y" ) | 
 |  |  |            | 
 |  |  |           this.Column( relnew, Name := weekend.Format( "M2/D2/Y" ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); | 
 |  |  |           this.Column( relnew, Name := weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |     } | 
 
 |  |  | 
 |  |  |         yearcell              := yearcolumn.FinancialProductionCell( relnew, Quantity := 0 ); | 
 |  |  |         showrow.FinancialProductionCell( relinsert, yearcell ); | 
 |  |  |         traverse( row, FinancialProductionCell, cell, not cell.FinancialProductionColumn().IsDay() ){ | 
 |  |  |           column   := selectobject( this, FinancialProductionColumn, column, column.Name() = cell.FinancialProductionColumn().Name() and not column.IsDay() ); | 
 |  |  |           column              := selectobject( this, FinancialProductionColumn, column, column.Name() = cell.FinancialProductionColumn().Name() and not column.IsDay() ); | 
 |  |  |            | 
 |  |  |           sumcell  := selectobject( column, FinancialProductionCell, c, c.FinancialProductionRow() = sumrow ); | 
 |  |  |           sumcell             := selectobject( column, FinancialProductionCell, c, c.FinancialProductionRow() = sumrow ); | 
 |  |  |           if( isnull( sumcell ) ){ | 
 |  |  |             sumcell := column.FinancialProductionCell( relnew, Quantity := 0); | 
 |  |  |             sumcell           := column.FinancialProductionCell( relnew, Quantity := 0); | 
 |  |  |             sumrow.FinancialProductionCell( relinsert, sumcell ); | 
 |  |  |           } | 
 |  |  |            | 
 |  |  |           showcell := column.FinancialProductionCell( relnew, Quantity := cell.Quantity(), IsUpdate := cell.IsUpdate()  ); | 
 |  |  |           showcell            := column.FinancialProductionCell( relnew, Quantity := cell.Quantity(), IsUpdate := cell.IsUpdate()  ); | 
 |  |  |           showrow.FinancialProductionCell( relinsert, showcell ); | 
 |  |  |           yearcell.Quantity( yearcell.Quantity() + cell.Quantity() ); | 
 |  |  |           sumyearcell.Quantity( sumyearcell.Quantity() + cell.Quantity() ); | 
 |  |  | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |     traverse( this, FinancialProductionColumn, column ){ | 
 |  |  |       if( exists( column, FinancialProductionCell, cell, cell.IsUpdate() ) ){ | 
 |  |  |         sumcell               := selectobject( sumrow, FinancialProductionCell, sumcell, sumcell.FinancialProductionColumn() = column ); | 
 |  |  |         sumcell.IsUpdate( true ); | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |   *] | 
 |  |  | } | 
 
 |  |  | 
 |  |  |           row                     := c.FinancialProductionRow(); | 
 |  |  |           //Factory | 
 |  |  |           InventorySummarySource::CreateCellElement( xmlDOM, searchunitcolumn, row.Factory() ); | 
 |  |  |           //Generation | 
 |  |  |           InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, row.Product_MP().Generation() ); | 
 |  |  |           //Power | 
 |  |  |           InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, row.Product_MP().Power() ); | 
 |  |  |           //MLBMQBS | 
 |  |  |           InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, row.Product_MP().MQBMLB() ); | 
 |  |  |           if( not isnull( row.Product_MP() ) ){ | 
 |  |  |             //Generation | 
 |  |  |             InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, row.Product_MP().Generation() ); | 
 |  |  |             //Power | 
 |  |  |             InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, row.Product_MP().Power() ); | 
 |  |  |             //MLBMQBS | 
 |  |  |             InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, row.Product_MP().MQBMLB() ); | 
 |  |  |           }else{ | 
 |  |  |             //Generation | 
 |  |  |             InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, '' ); | 
 |  |  |             //Power | 
 |  |  |             InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, '' ); | 
 |  |  |             //MLBMQBS | 
 |  |  |             InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, '' ); | 
 |  |  |           } | 
 |  |  |           //Product | 
 |  |  |           InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() ); | 
 |  |  |           //Unit | 
 
 |  |  | 
 |  |  |   TextBody: | 
 |  |  |   [* | 
 |  |  |     // çå
°é¸½ Jun-24-2024 (created) | 
 |  |  |     owner.FinancialProductionSource( relflush ); | 
 |  |  |     traverse( owner, FinancialProductionSource, source, not source.IsImport() ){ | 
 |  |  |       source.Delete(); | 
 |  |  |     } | 
 |  |  |     owner.FPImportData( relflush ); | 
 |  |  |     ccunit                    := FinancialProductionReport::GetDefaultCCUnit(); | 
 |  |  |     dlunit                    := FinancialProductionReport::GetDefaultDLUnit(); | 
 |  |  |     allunit                   := FinancialProductionReport::GetDefaultAllUnit(); | 
 |  |  |     source                    := owner.FinancialProductionSource( relnew, IsImport := false, Name := FinancialProductionReport::GetDefaultName() ); | 
 |  |  |     table                     := source.FinancialProductionReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false ); | 
 |  |  |     showtable                 := source.FinancialProductionReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true ); | 
 |  |  |     source.FinancialProductionReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true ); | 
 |  |  |     startofplanning           := owner.StartOfPlanning().Date(); | 
 |  |  |     //startofyear               := startofplanning.StartOfYear(); | 
 |  |  |     startofnextyear           := startofplanning.StartOfNextYear(); | 
 |  |  |      | 
 |  |  |     search                    := owner.FinancialProductionSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit ); | 
 |  |  |     //search                    := owner.FinancialProductionSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit ); | 
 |  |  |      | 
 |  |  |     productids                := construct( Strings ); | 
 |  |  |     table.GenerateColumn( owner ); | 
 |  |  | 
 |  |  |           productids.Add( pisp.ProductID() ); | 
 |  |  |           //å½product planningçæ¥æåºé´å¨éè¦çæ¥æåºé´å
  | 
 |  |  |           traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ){ | 
 |  |  |             dayperiodtime     := ( pispip.Start() + Duration::Days( 1 ) ).Date(); | 
 |  |  |             dayperiodtime     := pispip.Start().Date(); | 
 |  |  |             dayperiodname     := dayperiodtime.Format( "M2/D2/Y" ); | 
 |  |  |             periodtime        := dayperiodtime.StartOfMonth(); | 
 |  |  |             periodname        := periodtime.Format( "M2/D2/Y" ); | 
 |  |  | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |     factorys                  := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() ); | 
 |  |  |     showtable.Generate( search, factorys, productids ); | 
 |  |  |     excelsource               := selectobject( owner, FinancialProductionSource, excelsource, excelsource.IsImport() ); | 
 |  |  |     if( not isnull( excelsource ) ){ | 
 |  |  |       excelsource.AfterImport(); | 
 |  |  |     } | 
 |  |  |     //factorys                  := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() ); | 
 |  |  |     //showtable.Generate( search, factorys, productids ); | 
 |  |  |   *] | 
 |  |  | } | 
 
 |  |  | 
 |  |  |       productid.Add( row.Name() ); | 
 |  |  |        | 
 |  |  |       if( productids.ContainsAll( productid ) ){ | 
 |  |  |         showrow         := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := row.Unit() ); | 
 |  |  |         showrow         := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := row.Unit(), Factory := factory ); | 
 |  |  |         row.Product_MP().FinancialSalesRow( relinsert, showrow ); | 
 |  |  |         yearcell        := yearcolumn.FinancialSalesCell( relnew, Value := '0' ); | 
 |  |  |         showrow.FinancialSalesCell( relinsert, yearcell ); | 
 |  |  | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |     traverse( this, FinancialSalesColumn, column ){ | 
 |  |  |       if( exists( column, FinancialSalesCell, cell, cell.IsUpdate() ) ){ | 
 |  |  |         sumcell         := selectobject( sumrow, FinancialSalesCell, sumcell, sumcell.FinancialSalesColumn() = column ); | 
 |  |  |         sumcell.IsUpdate( true ); | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |   *] | 
 |  |  | } | 
 
 |  |  | 
 |  |  |         if( isnull( unitrow ) ){ | 
 |  |  |           unitrow           := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := unit.Value() ); | 
 |  |  |         } | 
 |  |  |         allrow  := selectobject( table, FinancialSalesRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit ); | 
 |  |  |         allrow              := selectobject( table, FinancialSalesRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit ); | 
 |  |  |         if( isnull( unitrow ) ){ | 
 |  |  |           allrow            := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := allunit ); | 
 |  |  |         } | 
 |  |  | 
 |  |  |           if( isnull( tablecolumn ) ){ | 
 |  |  |             tablecolumn   := table.FinancialSalesColumn( relnew, Name := periodname, Period := yearday.Date() ); | 
 |  |  |           } | 
 |  |  |           unitcell := selectobject( unitrow, FinancialSalesCell, unitcell, unitcell.FinancialSalesColumn().Name() = column.Name() ); | 
 |  |  |           unitcell := selectobject( unitrow, FinancialSalesCell, unitcell, unitcell.FinancialSalesColumn() = tablecolumn ); | 
 |  |  |           if( isnull( unitcell ) ){ | 
 |  |  |             unitcell        := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() ); | 
 |  |  |             unitrow.FinancialSalesCell( relinsert, unitcell ); | 
 |  |  | 
 |  |  |               previouscell  := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn ); | 
 |  |  |               quantity      := [Real]cell.Value() + [Real]previouscell.Value(); | 
 |  |  |               if( [Real]unitcell.Value() <> quantity ){ | 
 |  |  |                 unitcell.Value( [String]( [Number]cell.Value() ) ); | 
 |  |  |                 unitcell.Value( [String]( [Number]quantity ) ); | 
 |  |  |                 unitcell.IsUpdate( true ); | 
 |  |  |               } | 
 |  |  |             } | 
 |  |  |           } | 
 |  |  |           allcell  := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn().Name() = column.Name() ); | 
 |  |  |           allcell  := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn() = tablecolumn  ); | 
 |  |  |           if( isnull( unitcell ) ){ | 
 |  |  |             allcell         := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() ); | 
 |  |  |             allrow.FinancialSalesCell( relinsert, allcell ); | 
 |  |  | 
 |  |  |               previouscell  := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn ); | 
 |  |  |               quantity      := [Real]cell.Value() + [Real]previouscell.Value(); | 
 |  |  |               if( [Real]allcell.Value() <> quantity ){ | 
 |  |  |                 allcell.Value( [String]( [Number]cell.Value() ) ); | 
 |  |  |                 allcell.Value( [String]( [Number]quantity ) ); | 
 |  |  |                 allcell.IsUpdate( true ); | 
 |  |  |               } | 
 |  |  |             } | 
 
 |  |  | 
 |  |  |           row                     := c.FinancialSalesRow(); | 
 |  |  |           //Factory | 
 |  |  |           InventorySummarySource::CreateCellElement( xmlDOM, searchunitcolumn, row.Factory() ); | 
 |  |  |           //Generation | 
 |  |  |           InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, row.Product_MP().Generation() ); | 
 |  |  |           //Power | 
 |  |  |           InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, row.Product_MP().Power() ); | 
 |  |  |           //MLBMQBS | 
 |  |  |           InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, row.Product_MP().MQBMLB() ); | 
 |  |  |           if( not isnull( row.Product_MP() ) ){ | 
 |  |  |             //Generation | 
 |  |  |             InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, row.Product_MP().Generation() ); | 
 |  |  |             //Power | 
 |  |  |             InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, row.Product_MP().Power() ); | 
 |  |  |             //MLBMQBS | 
 |  |  |             InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, row.Product_MP().MQBMLB() ); | 
 |  |  |           }else{ | 
 |  |  |             //Generation | 
 |  |  |             InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, '' ); | 
 |  |  |             //Power | 
 |  |  |             InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, '' ); | 
 |  |  |             //MLBMQBS | 
 |  |  |             InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, '' ); | 
 |  |  |           } | 
 |  |  |           //Product | 
 |  |  |           InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() ); | 
 |  |  |           //Unit | 
 
 |  |  | 
 |  |  |   TextBody: | 
 |  |  |   [* | 
 |  |  |     // çå
°é¸½ Jun-24-2024 (created) | 
 |  |  |     owner.FinancialSalesSource( relflush ); | 
 |  |  |     traverse( owner, FinancialSalesSource, source, not source.IsImport() ){ | 
 |  |  |       source.Delete(); | 
 |  |  |     } | 
 |  |  |     owner.FSImportData( relflush ); | 
 |  |  |     productids                := construct( Strings ); | 
 |  |  |     allunit                   := FinancialSalesReport::GetDefaultAllUnit(); | 
 |  |  | 
 |  |  |      | 
 |  |  |     source                    := owner.FinancialSalesSource( relnew, IsImport := false, Name := FinancialSalesReport::GetDefaultName() ); | 
 |  |  |     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 ); | 
 |  |  |     source.FinancialSalesReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true ); | 
 |  |  |     startofplanning           := owner.StartOfPlanning().Date(); | 
 |  |  |     //startofyear               := startofplanning.StartOfYear(); | 
 |  |  |     startofnextyear           := startofplanning.StartOfNextYear(); | 
 |  |  |      | 
 |  |  |     search                    := owner.FinancialSalesSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit ); | 
 |  |  |     //search                    := owner.FinancialSalesSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit ); | 
 |  |  |      | 
 |  |  |     table.GenerateColumn( owner ); | 
 |  |  |      | 
 |  |  | 
 |  |  |           traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() | 
 |  |  |                     and pispip.Period_MP().StartDate() < startofnextyear  | 
 |  |  |                     and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ){ | 
 |  |  |             dayperiodtime   := ( pispip.Start() + Duration::Days( 1 ) ).Date(); | 
 |  |  |             dayperiodtime   := pispip.Start().Date(); | 
 |  |  |             dayperiodname   := dayperiodtime.Format( "M2/D2/Y" ); | 
 |  |  |             periodtime      := dayperiodtime.StartOfMonth(); | 
 |  |  |             periodname      := periodtime.Format( "M2/D2/Y" ); | 
 |  |  | 
 |  |  |     //    } | 
 |  |  |     //  } | 
 |  |  |     //} | 
 |  |  |     factorys                  := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() ); | 
 |  |  |     showtable.Generate( search, factorys, productids ); | 
 |  |  |     excelsource               := selectobject( owner, FinancialSalesSource, excelsource, excelsource.IsImport() ); | 
 |  |  |     if( not isnull( excelsource ) ){ | 
 |  |  |       excelsource.AfterImport(); | 
 |  |  |     } | 
 |  |  |     //factorys                  := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() ); | 
 |  |  |     //showtable.Generate( search, factorys, productids ); | 
 |  |  |   *] | 
 |  |  | } | 
 
 |  |  | 
 |  |  |       }else if( timeunit = Translations::MP_GlobalParameters_Week() ){ | 
 |  |  |         weekstartstr          := ' KW'; | 
 |  |  |         for( start := starttime; start <= endtime; start := start.StartOfNextWeek() ){ | 
 |  |  |           weekend             := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date(); | 
 |  |  |           weekend             := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();//weekend.Format( "M2/D2/Y" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ) | 
 |  |  |            | 
 |  |  |           this.InventorySummaryColumn( relnew, Name := weekend.Format( "M2/D2/Y" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ), StartDate := start.Date(), EndaDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); | 
 |  |  |           this.InventorySummaryColumn( relnew, Name := weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ), StartDate := start.Date(), EndaDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); | 
 |  |  |         } | 
 |  |  |       }else if( timeunit = Translations::MP_GlobalParameters_Month() ){ | 
 |  |  |         for( start := starttime; start <= endtime; start := start.StartOfNextMonth() ){ | 
 |  |  |           monthend            := ( start.StartOfNextMonth() - Duration::Days( 1 ) ).Date(); | 
 |  |  |           monthend            := ( start.StartOfNextMonth() - Duration::Days( 1 ) ).Date();//monthend.Format( "M2/D2/Y" ).Concat( ' ' ).Concat( monthend.Format( "MM", us_locale ).Concat( '/').Concat( [String]monthend.Month() ).Concat( 'æ' ) ) | 
 |  |  |           us_locale := Locale::Construct( 'en_us' ); | 
 |  |  |           this.InventorySummaryColumn( relnew, Name := monthend.Format( "M2/D2/Y" ).Concat( ' ' ).Concat( monthend.Format( "MM", us_locale ).Concat( '/').Concat( [String]monthend.Month() ).Concat( 'æ' ) ), StartDate := start.Date(), EndaDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() ); | 
 |  |  |           this.InventorySummaryColumn( relnew, Name := monthend.Format( "MM", us_locale ).Concat( '/').Concat( [String]monthend.Month() ).Concat( 'æ' ), StartDate := start.Date(), EndaDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() ); | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |     } | 
 
 |  |  | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |       if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Week() ){ | 
 |  |  |         weekstartstr          := ' KW'; | 
 |  |  |         for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){ | 
 |  |  |           weekend             := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date(); | 
 |  |  |           weekend             := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();// weekend.Format( "M2/D2/Y" ) | 
 |  |  |            | 
 |  |  |           this.Column( relnew, Name := weekend.Format( "M2/D2/Y" ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); | 
 |  |  |           this.Column( relnew, Name := weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |     } | 
 
 |  |  | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160240044]' | 
 |  |  |     Synonym: 'æ»è´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation CoefficientValue | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1188511346]' | 
 |  |  |     Synonym: 'ç³»æ°' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation EstimateTotalCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160240036]' | 
 |  |  |     Synonym: 'é¢è®¡æ»è´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation RentInCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164662]' | 
 |  |  |     Synonym: 'å¤ç§åºå
¥åºè´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation RentOutOfCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164672]' | 
 |  |  |     Synonym: 'å¤ç§åºåºåºè´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation RentStorCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164707]' | 
 |  |  |     Synonym: 'å¤ç§åºä»å¨è´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation WerkToRentTransCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160240024]' | 
 |  |  |     Synonym: 'åå
å°å¤ç§åºè¿è¾è´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   RelationRepresentation Column { RelationKey: '[415136.0.986881392]' Visibility: 'Normal' } | 
 |  |  | } | 
 
 |  |  | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164830]' | 
 |  |  |     Synonym: 'æ»è´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation CCLongTransCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164734]' | 
 |  |  |     Synonym: 'é¿æ¥é¿éè¿è¾è´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation CCRentInCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164742]' | 
 |  |  |     Synonym: 'é¿æ¥å¤ç§åºå
¥åºè´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation CCRentOutOfCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164750]' | 
 |  |  |     Synonym: 'é¿æ¥å¤ç§åºåºåºè´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation CCRentStorCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164771]' | 
 |  |  |     Synonym: 'é¿æ¥å¤ç§åºä»å¨è´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation CCShorTransCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164779]' | 
 |  |  |     Synonym: 'é¿æ¥çéè¿è¾è´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation CoefficientValue | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1188511355]' | 
 |  |  |     Synonym: 'ç³»æ°' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation DLRentInCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164787]' | 
 |  |  |     Synonym: '大è¿å¤ç§åºå
¥åºè´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation DLRentOtherCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1184074681]' | 
 |  |  |     Synonym: '大è¿å¤ç§åºå
¶ä»è´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation DLRentOutOfCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164795]' | 
 |  |  |     Synonym: '大è¿å¤ç§åºåºåºè´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation DLRentStorCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164806]' | 
 |  |  |     Synonym: '大è¿å¤ç§åºä»å¨è´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation EstimateTotalCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164814]' | 
 |  |  |     Synonym: 'é¢è®¡æ»è´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   AttributeRepresentation WerkToDLRentTransCost | 
 |  |  |   { | 
 |  |  |     AttributeKey: '[415136.0.1160164822]' | 
 |  |  |     Synonym: 'åå
å°å¤ç§åºè¿è¾è´¹ç¨' | 
 |  |  |     Conditional: | 
 |  |  |     [ | 
 |  |  |       DataRepresentation.Conditional | 
 |  |  |       { | 
 |  |  |         BackgroundColor: '$FF6666' | 
 |  |  |         ConditionBody: 'object.IsUpdate()' | 
 |  |  |         ConversionBody: '' | 
 |  |  |         DefaultBackgroundColor: false | 
 |  |  |         InheritConversion: false | 
 |  |  |       } | 
 |  |  |     ] | 
 |  |  |   } | 
 |  |  |   RelationRepresentation Column { RelationKey: '[415136.0.992900194]' Visibility: 'Normal' } | 
 |  |  | } | 
 
 |  |  | 
 |  |  |           tcel.WerkToRentTransCost( cell.WerkToRentTransCost() ); | 
 |  |  |           tcel.RentStorCost( cell.RentStorCost() ); | 
 |  |  |           tcel.CoefficientValue( cell.CoefficientValue() ); | 
 |  |  |           estimatetotalcost := tcel.RentInCost() + tcel.RentOutOfCost() + tcel.WerkToRentTransCost() + tcel.RentStorCost(); | 
 |  |  |           tcel.AllCost( estimatetotalcost * [Real]tcel.CoefficientValue() ); | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |     *] | 
 
 |  |  | 
 |  |  |           tcel.DLRentStorCost( cell.DLRentStorCost() ); | 
 |  |  |           tcel.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() ); | 
 |  |  |           tcel.CoefficientValue( cell.CoefficientValue() ); | 
 |  |  |           estimatetotalcost := tcel.CCRentInCost() + tcel.CCRentOutOfCost() + tcel.CCLongTransCost() + tcel.CCRentStorCost() + tcel.CCShorTransCost() + tcel.DLRentInCost() + tcel.DLRentOutOfCost() + tcel.DLRentOtherCost() + tcel.DLRentStorCost() + tcel.WerkToDLRentTransCost(); | 
 |  |  |           tcel.AllCost( estimatetotalcost * [Real]tcel.CoefficientValue() ); | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |     *] | 
 
 |  |  | 
 |  |  |     [* | 
 |  |  |       FinancialProductionSource::Initialize( MacroPlan ); | 
 |  |  |        | 
 |  |  |       table := selectobject( MacroPlan, FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() and table.IsShow() ); | 
 |  |  |       table := FinancialProductionSource::InitiateSearch( MacroPlan ); | 
 |  |  |        | 
 |  |  |       DataHolderTable.Data( table ); | 
 |  |  |        | 
 
 |  |  | 
 |  |  |            | 
 |  |  |           if( not source.IsExistFutureMonthData() or  | 
 |  |  |               ( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){ | 
 |  |  |              FinancialSalesSource::InitializeNew( MacroPlan ); | 
 |  |  |              source.AfterImport(); | 
 |  |  |              FinancialProductionSource::InitiateSearch( MacroPlan ); | 
 |  |  |              DataHolderTable.Data( FinancialProductionSource::InitiateSearch( MacroPlan ) ); | 
 |  |  |           } | 
 |  |  |            | 
 |  |  |           WebMessageBox::Success( Translations::A_VWED_Success() ); | 
 
 |  |  | 
 |  |  |   ] | 
 |  |  |   Properties: | 
 |  |  |   [ | 
 |  |  |     Orientation: 'horizontal' | 
 |  |  |     Taborder: 2 | 
 |  |  |   ] | 
 |  |  | } | 
 
 |  |  | 
 |  |  |     [* | 
 |  |  |       FinancialSalesSource::InitializeNew( MacroPlan ); | 
 |  |  |        | 
 |  |  |       table := selectobject( MacroPlan, FinancialSalesSource.FinancialSalesReport, table, not table.IsImport() and table.IsShow() ); | 
 |  |  |       table := FinancialSalesSource::InitiateSearch( MacroPlan );//selectobject( MacroPlan, FinancialSalesSource.FinancialSalesReport, table, not table.IsImport() and table.IsShow() ); | 
 |  |  |        | 
 |  |  |       DataHolderTable.Data( table ); | 
 |  |  |        | 
 
 |  |  | 
 |  |  |           //妿åå¨è®¡åå¼å§åçæ¥ææ°æ®éè¦ç¹å»ç¡®è®¤ | 
 |  |  |           if( not source.IsExistFutureMonthData() or  | 
 |  |  |               ( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){ | 
 |  |  |              FinancialSalesSource::InitializeNew( MacroPlan ); | 
 |  |  |              source.AfterImport(); | 
 |  |  |              FinancialSalesSource::InitiateSearch( MacroPlan ); | 
 |  |  |              DataHolderTable.Data( FinancialSalesSource::InitiateSearch( MacroPlan ) ); | 
 |  |  |           } | 
 |  |  |            | 
 |  |  |           WebMessageBox::Success( Translations::A_VWED_Success() ); |