| | |
| | | [* |
| | | // yypsybs Sep-20-2023 (created) |
| | | |
| | | info( "MPSync::TestData" ); |
| | | debuginfo( "MPSync::TestData" ); |
| | | |
| | | productCodeList := selectuniquevalues( macroPlan, Product_MP, item, item.ID() ); |
| | | info( "productCodeList : " + [String]productCodeList.Size() ); |
| | | debuginfo( "productCodeList : " + [String]productCodeList.Size() ); |
| | | |
| | | mpSync.MappingCapacityAndSaleBudge( relflush ); |
| | | for( year := Date::ActualDate().Year() - 10; year <= Date::ActualDate().Year() + 5; year := year + 1 ) { |
| | |
| | | } |
| | | } |
| | | result1 := selectset( mpSync, MappingCapacityAndSaleBudge, item, true ); |
| | | info( "test MappingCapacityAndSaleBudge size : " + [String]result1.Size() ); |
| | | |
| | | mpSync.MappingAnnualBudget( relflush ); |
| | | for( year := Date::ActualDate().Year() - 10; year <= Date::ActualDate().Year() + 5; year := year + 1 ) { |
| | | for( i := 1; i <= productCodeList.Size(); i := i + 1 ) { |
| | | productCode := productCodeList.Element( i - 1 ); |
| | | mappingAnnualBudget := mpSync.MappingAnnualBudget( relnew, |
| | | YearNo := year, |
| | | ProductId := productCode |
| | | ); |
| | | for( month := 1; month <= 12; month := month + 1 ) { |
| | | field := Reflection::FindAttribute( "MappingAnnualBudget", "MonthlyModCapacity" + [String]month ); |
| | | field.Set( mappingAnnualBudget, Real::Random( 20000.0, 30000.0 ) ); |
| | | field := Reflection::FindAttribute( "MappingAnnualBudget", "MonthlySheetCapacity" + [String]month ); |
| | | field.Set( mappingAnnualBudget, Real::Random( 20000.0, 30000.0 ) ); |
| | | field := Reflection::FindAttribute( "MappingAnnualBudget", "MonthlySales" + [String]month ); |
| | | field.Set( mappingAnnualBudget, Real::Random( 20000.0, 30000.0 ) ); |
| | | } |
| | | } |
| | | } |
| | | result2 := selectset( mpSync, MappingAnnualBudget, item, true ); |
| | | info( "test MappingAnnualBudget size : " + [String]result2.Size() ); |
| | | debuginfo( "test MappingCapacityAndSaleBudge size : " + [String]result1.Size() ); |
| | | *] |
| | | } |