|
@@ 332-340 (lines=9) @@
|
| 329 |
|
|
| 330 |
|
$c = count($stockMovements); |
| 331 |
|
|
| 332 |
|
if($c) { |
| 333 |
|
$this->logger->emergency('There are '.$c.' stock movements with invalid bar codes'); |
| 334 |
|
$productNumbers = []; |
| 335 |
|
foreach ($stockMovements as $stockMovement) { |
| 336 |
|
$productNumbers[] = $stockMovement->getProduct()->getNumber(); |
| 337 |
|
} |
| 338 |
|
|
| 339 |
|
throw new InvalidBarCodeException('Products with invalid bar codes: '.join(', ', $productNumbers), $productNumbers); |
| 340 |
|
} |
| 341 |
|
} |
| 342 |
|
|
| 343 |
|
/** |
|
@@ 359-367 (lines=9) @@
|
| 356 |
|
|
| 357 |
|
$c = count($stockMovements); |
| 358 |
|
|
| 359 |
|
if($c) { |
| 360 |
|
$this->logger->critical('There are '.$c.' stock movements with invalid vendor numbers'); |
| 361 |
|
$productNumbers = []; |
| 362 |
|
foreach ($stockMovements as $stockMovement) { |
| 363 |
|
$productNumbers[] = $stockMovement->getProduct()->getNumber(); |
| 364 |
|
} |
| 365 |
|
|
| 366 |
|
throw new InvalidVendorNumberException('Products with invalid vendor numbers: '.join($productNumbers), $productNumbers); |
| 367 |
|
} |
| 368 |
|
} |
| 369 |
|
|
| 370 |
|
protected function getFile(string $extension = 'csv') : \SplFileObject |