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;
 }