| | |
| | | { |
| | | DefaultText: 'The import ChangeLossNr is not positive number.' |
| | | } |
| | | InfoMessage MP_ChangeLossSettingExcel_Import_ProductNoExist |
| | | InfoMessage MP_ChangeLossSettingExcel_Import_ProductNoExist ( |
| | | const String productids |
| | | ) |
| | | { |
| | | DefaultText: 'The entered product does not exist.' |
| | | DefaultText: 'The entered products @productids@does not exist.' |
| | | } |
| | | InfoMessage MP_ChangeLossSettingExcel_Import_UnitNoExist |
| | | { |
| | |
| | | owner.CCEngineLogisticsCostReport( relflush ); |
| | | cnv2 := StringToDate::StandardConverter(); |
| | | cnv2.SetCustomConversion(); |
| | | cnv2.CustomFormatString( "M2/D2/Y" ); |
| | | //cnv2.CustomFormatString( "M2/D2/Y" ); |
| | | cnv2.CustomFormatString( "MM/dd/yyyy" ); |
| | | |
| | | products := construct( Product_MPs ); |
| | | productcolumn := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 0 ); |
| | |
| | | owner.DLEngineLogisticsCostReport( relflush ); |
| | | cnv2 := StringToDate::StandardConverter(); |
| | | cnv2.SetCustomConversion(); |
| | | cnv2.CustomFormatString( "M2/D2/Y" ); |
| | | //cnv2.CustomFormatString( "M2/D2/Y" ); |
| | | cnv2.CustomFormatString( "MM/dd/yyyy" ); |
| | | |
| | | products := construct( Product_MPs ); |
| | | productcolumn := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 0 ); |
| | |
| | | error( Translations::MP_ChangeLossSettingExcel_Import_PositiveInteger() ); |
| | | } |
| | | //导入产品是否存在 |
| | | if( exists( macroplan, ChangeLossSettingExcel, excel, not exists( macroplan, Product_MP, product, product.ID() = excel.Product1() or product.ID() = excel.Product2() ) ) ){ |
| | | error( Translations::MP_ChangeLossSettingExcel_Import_ProductNoExist() ); |
| | | productfirsts := selectuniquevalues( macroplan, ChangeLossSettingExcel, excel, excel.Product1() ); |
| | | productseconds := selectuniquevalues( macroplan, ChangeLossSettingExcel, excel, excel.Product2() ); |
| | | productids := productfirsts.Union( productseconds ); |
| | | nonproductids := selectuniquevalues( productids, Elements, e, not exists( macroplan, Product_MP, product, product.ID() = e ), e ); |
| | | if( nonproductids.Size() > 0 ){ |
| | | error( Translations::MP_ChangeLossSettingExcel_Import_ProductNoExist( nonproductids.Concatenate( ";" ) ) ); |
| | | //if( exists( macroplan, ChangeLossSettingExcel, excel, not exists( macroplan, Product_MP, product, product.ID() = excel.Product1() or product.ID() = excel.Product2() ) ) ){ |
| | | // error( Translations::MP_ChangeLossSettingExcel_Import_ProductNoExist() ); |
| | | } |
| | | //导入产线是否存在 |
| | | if( exists( macroplan, ChangeLossSettingExcel, excel, not exists( macroplan, Unit, unit, unit.ID() = excel.Unit() ) ) ){ |
| | |
| | | |
| | | 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() ); |
| | | 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() ); |
| | |
| | | beforeyearday := ( yearday - Duration::Days( 1 ) ).Date(); |
| | | cnv2 := StringToDate::StandardConverter(); |
| | | cnv2.SetCustomConversion(); |
| | | cnv2.CustomFormatString( "M2/D2/Y" ); |
| | | //cnv2.CustomFormatString( "M2/D2/Y" ); |
| | | cnv2.CustomFormatString( "MM/dd/yyyy" ); |
| | | traverse( this, FinancialProductionReport, report ){ |
| | | //获取导入的产品列和工厂列 |
| | | productcolumn := selectobject( report, FinancialProductionColumn, column, column.Name() = 'Product' ); |
| | |
| | | sumrow.FinancialSalesCell( relinsert, sumcell ); |
| | | } |
| | | |
| | | showcell := column.FinancialSalesCell( relnew, Value := cell.Value() ); |
| | | showcell := column.FinancialSalesCell( relnew, Value := cell.Value(), IsUpdate := cell.IsUpdate() ); |
| | | showrow.FinancialSalesCell( relinsert, showcell ); |
| | | yearcell.Value( [String]( [Real]yearcell.Value() + [Real]cell.Value() ) ); |
| | | sumyearcell.Value( [String]( [Real]sumyearcell.Value() + [Real]cell.Value() ) ); |
| | |
| | | beforeyearday := ( yearday - Duration::Days( 1 ) ).Date(); |
| | | cnv2 := StringToDate::StandardConverter(); |
| | | cnv2.SetCustomConversion(); |
| | | cnv2.CustomFormatString( "M2/D2/Y" ); |
| | | //cnv2.CustomFormatString( "M2/D2/Y" ); |
| | | cnv2.CustomFormatString( "MM/dd/yyyy" ); |
| | | traverse( this, FinancialSalesReport, report ){ |
| | | productcolumn := selectobject( report, FinancialSalesColumn, column, column.Name() = 'Product' ); |
| | | unitcolumn := selectobject( report, FinancialSalesColumn, column, column.Name() = 'Unit' ); |
| | |
| | | ProductGeneration::Initilize( MacroPlan ); |
| | | ProductPower::Initilize( MacroPlan ); |
| | | ProductMLBMQB::Initilize( MacroPlan ); |
| | | dhFactorys.Data( selectset( MacroPlan, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() ) ); |
| | | dhGenerations.Data( selectset( MacroPlan, ProductGeneration, factory, true ) ); |
| | | dhPowers.Data( selectset( MacroPlan, ProductPower, factory, true ) ); |
| | | dhMQBMLBs.Data( selectset( MacroPlan, ProductMLBMQB, factory, true ) ); |
| | | DataHolderTable.Data( table ); |
| | | *] |
| | | GroupServerCalls: false |
| | |
| | | ProductGeneration::Initilize( MacroPlan ); |
| | | ProductPower::Initilize( MacroPlan ); |
| | | ProductMLBMQB::Initilize( MacroPlan ); |
| | | dhFactorys.Data( selectset( MacroPlan, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() ) ); |
| | | dhGenerations.Data( selectset( MacroPlan, ProductGeneration, factory, true ) ); |
| | | dhPowers.Data( selectset( MacroPlan, ProductPower, factory, true ) ); |
| | | dhMQBMLBs.Data( selectset( MacroPlan, ProductMLBMQB, factory, true ) ); |
| | | DataHolderTable.Data( table ); |
| | | *] |
| | | GroupServerCalls: false |
| | |
| | | ProductGeneration::Initilize( MacroPlan ); |
| | | ProductPower::Initilize( MacroPlan ); |
| | | ProductMLBMQB::Initilize( MacroPlan ); |
| | | dhFactorys.Data( selectset( MacroPlan, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() ) ); |
| | | dhGenerations.Data( selectset( MacroPlan, ProductGeneration, factory, true ) ); |
| | | dhPowers.Data( selectset( MacroPlan, ProductPower, factory, true ) ); |
| | | dhMQBMLBs.Data( selectset( MacroPlan, ProductMLBMQB, factory, true ) ); |
| | | DataHolderTable.Data( table ); |
| | | *] |
| | | GroupServerCalls: false |