Procházet zdrojové kódy

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

master
keun před 8 roky
rodič
revize
0b692b9727
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. +4
    -1
      frontend/controllers/CommandeController.php

+ 4
- 1
frontend/controllers/CommandeController.php Zobrazit soubor

@@ -80,7 +80,10 @@ class CommandeController extends \yii\web\Controller {
$arr_jours_production[$j->id] = date('d/m/Y', strtotime($j->date));

// 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();
foreach ($produits as $p)
$arr_produits[] = $p;

Načítá se…
Zrušit
Uložit