@@ -977,7 +977,10 @@ class CommandeController extends BackendController { | |||
{ | |||
$produits = json_decode($produits) ; | |||
$point_vente = PointVente::findOne($id_pv) ; | |||
$production = Production::findOne(['date' => $date]) ; | |||
$production = Production::findOne([ | |||
'date' => $date, | |||
'id_etablissement' => Yii::$app->user->identity->id_etablissement | |||
]) ; | |||
if(preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/",$date) && | |||
($id_user || strlen($username)) && |