Browse Source

Problème génération bon de livraison (cas du User non défini dans Order) #240

refactoring
Guillaume 2 years ago
parent
commit
e888f7e378
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      backend/controllers/DistributionController.php

+ 2
- 2
backend/controllers/DistributionController.php View File

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

Loading…
Cancel
Save