lazhen
2024-10-23 4bb71bc32df6a2ce847b5dc1853dea732e2d0253
_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
@@ -13,7 +13,7 @@
    }
    owner.FSImportData( relflush );
    productids                := construct( Strings );
    allunit                   := FinancialSalesReport::GetDefaultAllUnit();
    //allunit                   := FinancialSalesReport::GetDefaultAllUnit();
    ccunit                    := FinancialSalesReport::GetDefaultCCUnit();
    dlunit                    := FinancialSalesReport::GetDefaultDLUnit();
    ccsalessegment            := FinancialSalesReport::GetSalesSegmentCC();
@@ -49,7 +49,7 @@
      if( ( iscc and product.MQBMLB() = 'MLB' ) or ( isccrent and product.MQBMLB() = 'MQB' ) or isdl ){
        
        //获取合计行
        allrow               := table.GetRow( allunit, product );
    //    allrow               := table.GetRow( allunit, product );
        //获取工厂行
        factoryrow           := table.GetRow( ifexpr( isdl, dlunit, ccunit ), product );
      
@@ -67,7 +67,7 @@
          
          factoryrow.Initialize( column, quantity );
          factoryrow.Initialize( daycolumn, quantity );
          allrow.Initialize( column, quantity );
    //      allrow.Initialize( column, quantity );
        }
      }
    }
@@ -77,7 +77,7 @@
                  and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear 
                              and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ) ){//产品为MQB
          product           := pisp.Product_MP();
          allrow            := table.GetRow( allunit, product );
    //      allrow            := table.GetRow( allunit, product );
          factoryrow        := table.GetRow( dlunit, product );
          productids.Add( pisp.ProductID() );
          traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical()
@@ -93,7 +93,7 @@
            
            factoryrow.Initialize( column, quantity );//取Total Demand字段按月汇总需求数量
            factoryrow.Initialize( daycolumn, quantity );
            allrow.Initialize( column, quantity );
    //        allrow.Initialize( column, quantity );
          }
        }
    //  }
@@ -133,10 +133,7 @@
    //    }
    //  }
    //}
    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 );
  *]