|
|
@@ -4,6 +4,7 @@ namespace Lc\CaracoleBundle\Form\Order; |
|
|
|
|
|
|
|
use App\Repository\Product\ProductFamilyStore; |
|
|
|
use Doctrine\ORM\EntityManagerInterface; |
|
|
|
use Http\Discovery\Exception\NotFoundException; |
|
|
|
use Lc\CaracoleBundle\Factory\Order\OrderProductFactory; |
|
|
|
use Lc\CaracoleBundle\Solver\Product\ProductFamilySolver; |
|
|
|
use Symfony\Component\Form\AbstractType; |
|
|
@@ -70,6 +71,10 @@ class OrderProductsType extends AbstractType |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(is_null($product)) { |
|
|
|
throw new NotFoundException('Aucun Product trouvé pour le ProductFamily #'.$productFamily->getId()); |
|
|
|
} |
|
|
|
|
|
|
|
$orderProduct = $this->orderProductFactory->create($product, 1); |
|
|
|
|
|
|
|
$builder->add('order_product_0', OrderProductType::class, [ |