コード例 #1
0
 public function getTotalByIdFreigthFare($idFreightFare)
 {
     $idFreightFare = (array) $idFreightFare;
     $totalByIdFreightFare = 0;
     if (count($idFreightFare) > 0) {
         $products = $this->products->filterByIdFreightFare($idFreightFare);
         $restockEntries = $this->restockEntries->filterByArrayIdProduct($products->getPrimaryKeys());
         while ($restockEntries->valid()) {
             $restockEntry = $restockEntries->read();
             $totalByIdFreightFare += $this->getPurchaseSettedByIdRestockEntry($restockEntry->getIdRestockEntry());
         }
     }
     return $totalByIdFreightFare;
 }
コード例 #2
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;
 }