|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
$produits = json_decode($produits) ; |
|
|
$produits = json_decode($produits) ; |
|
|
$point_vente = PointVente::findOne($id_pv) ; |
|
|
$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) && |
|
|
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)) && |
|
|
($id_user || strlen($username)) && |