Browse Source

Intégration du produit "Don" dans le formulaire de commande 'backend'

dev
Guillaume Bourgeois 5 years ago
parent
commit
11e64b431b
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      backend/controllers/DistributionController.php

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

@@ -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) ;
}])

Loading…
Cancel
Save