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

'id' => (int)$idOrder 'id' => (int)$idOrder
]); ]);


if($order && $order->distribution->id_producer == GlobalParam::getCurrentProducerId()) {
if($order && $order->distribution->id_producer == GlobalParam::getCurrentProducerId() && $order->id_user) {


$deliveryNote = null ; $deliveryNote = null ;
$idDeliveryNote = $order->id_delivery_note ; $idDeliveryNote = $order->id_delivery_note ;
] ; ] ;
} }


if ($firstOrder) {
if ($firstOrder && $firstOrder->id_user) {
// génération du BL // génération du BL
if(!$deliveryNote) { if(!$deliveryNote) {
$deliveryNote = new DeliveryNote; $deliveryNote = new DeliveryNote;

Loading…
Cancel
Save