| | |
| | | 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 ); |
| | | *] |
| | | } |