Browse Source

Résoudre bug affichage produits ne correspondant pas à l'établissement

master
keun 8 years ago
parent
commit
0b692b9727
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      frontend/controllers/CommandeController.php

+ 4
- 1
frontend/controllers/CommandeController.php View File

$arr_jours_production[$j->id] = date('d/m/Y', strtotime($j->date)); $arr_jours_production[$j->id] = date('d/m/Y', strtotime($j->date));


// produits // produits
$produits = Produit::find()->where(['actif' => 1])->andWhere('vrac IS NULL OR vrac = 0')->orderBy('order ASC')->all();
$produits = Produit::find()
->where(['actif' => 1, 'id_etablissement' => $id_etablissement])
->andWhere('vrac IS NULL OR vrac = 0')
->orderBy('order ASC')->all();
$arr_produits = array(); $arr_produits = array();
foreach ($produits as $p) foreach ($produits as $p)
$arr_produits[] = $p; $arr_produits[] = $p;

Loading…
Cancel
Save