Пример #1
0
 public function getTotalImportMaxByKeyMother()
 {
     foreach ($this->products->getKeyMother() as $keyMother) {
         $products = $this->products->filterByKeyMother($keyMother);
         $restockEntries = $this->restockEntries->filterByArrayIdProduct($products->getPrimaryKeys());
         $total = 0;
         while ($restockEntries->valid()) {
             $restockEntry = $restockEntries->read();
             if (!$restockEntry->isManualRestock()) {
                 $total += $this->getNewImportMaxByIdRestockEntry($restockEntry->getIdRestockEntry());
             }
         }
         $totalImportMaxByKeyMother[$keyMother] = $total;
     }
     return $totalImportMaxByKeyMother;
 }