Browse Source

Correction : la recherche des commandes ne prend pas en compte id_etablissement

prodstable
keun 7 years ago
parent
commit
120cddb6bf
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      common/models/Commande.php

+ 2
- 2
common/models/Commande.php View File

@@ -361,11 +361,11 @@ class Commande extends \yii\db\ActiveRecord
$commandes = Commande::find()
->with('commandeProduits', 'user', 'creditHistorique', 'pointVente')
->joinWith('production')
->andWhere(['production.id_etablissement' => $params['id_etablissement']]) ;
->where(['production.id_etablissement' => $params['id_etablissement']]) ;
if(isset($params['date']))
$commandes = $commandes->where(['production.date' => $params['date']]);
$commandes = $commandes->andWhere(['production.date' => $params['date']]);
if(isset($params['order']))
$commandes = $commandes->orderBy('date '.$params['order']);

Loading…
Cancel
Save