| | |
| | | [* |
| | | // 甄兰鸽 Jun-24-2024 (created) |
| | | owner.InventorySummarySource( relflush ); |
| | | products := construct( Product_MPs ); |
| | | productids := construct( Strings ); |
| | | allunit := InventorySummaryReport::GetDefaultAllUnit(); |
| | | ccunit := InventorySummaryReport::GetDefaultCCUnit(); |
| | | dlunit := InventorySummaryReport::GetDefaultDLUnit(); |
| | |
| | | isdl := exists( parentunits, Elements, punit, punit.ID().StartsWith( 'VWED DL' ) ); |
| | | if( iscc or isdl ){ |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() ){ |
| | | productids.Add( pisp.ProductID() ); |
| | | //获取工厂行 |
| | | factoryrow := table.GetRow( ifexpr( iscc, ccunit, dlunit ), pisp.ProductID() ); |
| | | //获取合计行 |
| | |
| | | and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day(), pispip.Start() ); |
| | | |
| | | traverse( pispips, Elements, pispip ){ |
| | | products.Add( pisp.Product_MP() ); |
| | | period := pispip.Period_MP(); |
| | | periodtime := period.Start().Date(); |
| | | // periodname := periodtime.Format( "M2/D2/Y" ); |
| | |
| | | } |
| | | //再在库存更新的子界面库存点选择中找到这些库存点所关联的已勾选库位 |
| | | selections := selectset( interface, InventoryPointSelection, selection, allsps.Find( selection.StockpoingPoint() ) >= 0 and selection.IsIncluded() ); |
| | | productids := selectuniquevalues( selections, Elements, selection, selection.ProductID() ); |
| | | productidset := selectuniquevalues( selections, Elements, selection, selection.ProductID() ); |
| | | //最后将这些库位中零件号的数量进行加总 |
| | | traverse( table, InventorySummaryColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() < startofplanning.Date() ){ |
| | | traverse( productids, Elements, productid ){ |
| | | traverse( productidset, Elements, productid ){ |
| | | productids.Add( productid ); |
| | | column.GenerateCell( selections, ccsps, dlsps, table, column.StartDate(), column.EndaDate(), productid, allunit, ccunit, dlunit ); |
| | | } |
| | | } |
| | |
| | | e.Delete(); |
| | | } |
| | | } |
| | | showtable.Generate( search, products ); |
| | | |
| | | factorys := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() ); |
| | | showtable.Generate( search, factorys, productids ); |
| | | *] |
| | | } |