Sfoglia il codice sorgente

Merge branch 'dev'

master
Guillaume 3 anni fa
parent
commit
af4ee84590
2 ha cambiato i file con 8 aggiunte e 3 eliminazioni
  1. +5
    -1
      backend/controllers/ProductController.php
  2. +3
    -2
      common/models/ProductPriceSearch.php

+ 5
- 1
backend/controllers/ProductController.php Vedi File

@@ -192,7 +192,11 @@ class ProductController extends BackendController
$model = $this->findModel($id);

$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([], [
'join_with' => ['user'],

+ 3
- 2
common/models/ProductPriceSearch.php Vedi File

@@ -85,8 +85,9 @@ class ProductPriceSearch extends ProductPrice
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;
}

Loading…
Annulla
Salva