瀏覽代碼

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

master
keun 8 年之前
父節點
當前提交
0b692b9727
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. +4
    -1
      frontend/controllers/CommandeController.php

+ 4
- 1
frontend/controllers/CommandeController.php 查看文件

@@ -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;

Loading…
取消
儲存