|
|
@@ -1388,7 +1388,7 @@ class DistributionController extends BackendController |
|
|
|
'id' => (int)$idOrder |
|
|
|
]); |
|
|
|
|
|
|
|
if($order && $order->distribution->id_producer == GlobalParam::getCurrentProducerId()) { |
|
|
|
if($order && $order->distribution->id_producer == GlobalParam::getCurrentProducerId() && $order->id_user) { |
|
|
|
|
|
|
|
$deliveryNote = null ; |
|
|
|
$idDeliveryNote = $order->id_delivery_note ; |
|
|
@@ -1482,7 +1482,7 @@ class DistributionController extends BackendController |
|
|
|
] ; |
|
|
|
} |
|
|
|
|
|
|
|
if ($firstOrder) { |
|
|
|
if ($firstOrder && $firstOrder->id_user) { |
|
|
|
// génération du BL |
|
|
|
if(!$deliveryNote) { |
|
|
|
$deliveryNote = new DeliveryNote; |