@@ -114,9 +114,8 @@ class DistributionController extends BackendController | |||
// products | |||
$productsArray = Product::find() | |||
->where([ | |||
'id_producer' => Producer::getId(), | |||
]) | |||
->orWhere(['id_producer' => Producer::getId(),]) | |||
->orWhere(['id_producer' => 0,]) // produit "Don" | |||
->joinWith(['productDistribution' => function($query) use($distribution) { | |||
$query->andOnCondition('product_distribution.id_distribution = '.$distribution->id) ; | |||
}]) |