Bläddra i källkod

Merge branch 'dev'

prodstable
Guillaume 3 år sedan
förälder
incheckning
af4ee84590
2 ändrade filer med 8 tillägg och 3 borttagningar
  1. +5
    -1
      backend/controllers/ProductController.php
  2. +3
    -2
      common/models/ProductPriceSearch.php

+ 5
- 1
backend/controllers/ProductController.php Visa fil

$model = $this->findModel($id); $model = $this->findModel($id);


$searchModel = new ProductPriceSearch(); $searchModel = new ProductPriceSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$searchModel->id_product = $id ;

$dataProvider = $searchModel->search(array_merge(Yii::$app->request->queryParams, [
'id_product' => $id
]));


$userProducerWithProductPercent = UserProducer::searchAll([], [ $userProducerWithProductPercent = UserProducer::searchAll([], [
'join_with' => ['user'], 'join_with' => ['user'],

+ 3
- 2
common/models/ProductPriceSearch.php Visa fil

return $dataProvider; return $dataProvider;
} }


//$query->andFilterWhere(['like', 'user.name', $this->id_user]) ;
//$query->andFilterWhere(['like', 'point_sale.name', $this->id_point_sale]) ;
if(isset($params['id_product'])) {
$query->andWhere(['product.id' => (int) $params['id_product']]) ;
}


return $dataProvider; return $dataProvider;
} }

Laddar…
Avbryt
Spara