Browse Source

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

master
keun 8 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

$commandes = Commande::find() $commandes = Commande::find()
->with('commandeProduits', 'user', 'creditHistorique', 'pointVente') ->with('commandeProduits', 'user', 'creditHistorique', 'pointVente')
->joinWith('production') ->joinWith('production')
->andWhere(['production.id_etablissement' => $params['id_etablissement']]) ;
->where(['production.id_etablissement' => $params['id_etablissement']]) ;
if(isset($params['date'])) if(isset($params['date']))
$commandes = $commandes->where(['production.date' => $params['date']]);
$commandes = $commandes->andWhere(['production.date' => $params['date']]);
if(isset($params['order'])) if(isset($params['order']))
$commandes = $commandes->orderBy('date '.$params['order']); $commandes = $commandes->orderBy('date '.$params['order']);

Loading…
Cancel
Save