lazhen
2024-11-20 b6c72c6dc3a37ecf8742cec536774863392bdbe7
_Main/BL/Type_CustomerDemandIDS/Method_Generate.qbl
@@ -1,7 +1,8 @@
Quintiq file version 2.0
#parent: #root
Method Generate (
  CustomerDemandIDSSearch search
  CustomerDemandIDSSearch search,
  Strings products
)
{
  TextBody:
@@ -13,7 +14,7 @@
    idscolumns              := selectuniquevalues(  table, Column, idscolumn, idscolumn.TimeUnit() = search.TimeUnit() and idscolumn.StartDate() >= search.StartDate() and idscolumn.StartDate() <= search.EndDate(), idscolumn.StartDate() );
    this.Clear( idscolumns );
    traverse( table, Row, row, ( search.Unit() = FinancialProductionReport::GetDefaultAllUnit() or row.Factory() = search.Unit() ) 
              and ( search.Product() = FinancialProductionReport::GetDefaultAllUnit() or search.Product() = row.Name() ) ){
              and ( products.Size() = 0 or products.Find( row.Name() ) > -1 ) ){
      
      showrow               := selectobject( this, Row, showrow, showrow.Name() = row.Name() and showrow.Factory() = search.Unit() );
      if( isnull( showrow ) ){