|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// production_point_vente à définir s'ils ne sont pas initialisés |
|
|
// production_point_vente à définir s'ils ne sont pas initialisés |
|
|
if ($production && $production->actif) { |
|
|
|
|
|
|
|
|
if ($production) { |
|
|
$count_productions_point_vente = ProductionPointVente::find()-> |
|
|
$count_productions_point_vente = ProductionPointVente::find()-> |
|
|
where([ |
|
|
where([ |
|
|
'id_production' => $production->id |
|
|
'id_production' => $production->id |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$arr_productions_point_vente = []; |
|
|
$arr_productions_point_vente = []; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($productions_point_vente as $ppv) { |
|
|
foreach ($productions_point_vente as $ppv) { |
|
|
$key = $ppv->id_production . '-' . $ppv->id_point_vente; |
|
|
$key = $ppv->id_production . '-' . $ppv->id_point_vente; |
|
|
if ($ppv->livraison == 1) |
|
|
if ($ppv->livraison == 1) |
|
|
|
|
|
|
|
|
$arr_productions_point_vente[$key] = Html::encode($ppv->pointVente->nom); |
|
|
$arr_productions_point_vente[$key] = Html::encode($ppv->pointVente->nom); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$datas = [ |
|
|
$datas = [ |
|
|
'produits' => $produits, |
|
|
'produits' => $produits, |
|
|
'points_vente' => $points_vente, |
|
|
'points_vente' => $points_vente, |