|
|
@@ -304,13 +304,9 @@ class CommandeController extends BackendController { |
|
|
|
$this->gestionFormCommandes($production, $date, $points_vente, $produits, $users); |
|
|
|
|
|
|
|
// commandes |
|
|
|
$commandes = Commande::find() |
|
|
|
->with('commandeProduits', 'user', 'creditHistorique') |
|
|
|
->joinWith('production') |
|
|
|
->where(['production.date' => $date]) |
|
|
|
->andWhere(['production.id_etablissement' => Yii::$app->user->identity->id_etablissement]) |
|
|
|
->orderBy('date ASC') |
|
|
|
->all(); |
|
|
|
$commandes = Commande::findBy([ |
|
|
|
'date' => $date |
|
|
|
]) ; |
|
|
|
|
|
|
|
$recettes = 0; |
|
|
|
$recettes_pain = 0; |
|
|
@@ -425,19 +421,19 @@ class CommandeController extends BackendController { |
|
|
|
$pp->id_produit = $p->id; |
|
|
|
|
|
|
|
$pp->actif = 0; |
|
|
|
if ($day_production == 1 && $p->lundi) |
|
|
|
if ($p->actif && $day_production == 1 && $p->lundi) |
|
|
|
$pp->actif = 1; |
|
|
|
if ($day_production == 2 && $p->mardi) |
|
|
|
if ($p->actif && $day_production == 2 && $p->mardi) |
|
|
|
$pp->actif = 1; |
|
|
|
if ($day_production == 3 && $p->mercredi) |
|
|
|
if ($p->actif && $day_production == 3 && $p->mercredi) |
|
|
|
$pp->actif = 1; |
|
|
|
if ($day_production == 4 && $p->jeudi) |
|
|
|
if ($p->actif && $day_production == 4 && $p->jeudi) |
|
|
|
$pp->actif = 1; |
|
|
|
if ($day_production == 5 && $p->vendredi) |
|
|
|
if ($p->actif && $day_production == 5 && $p->vendredi) |
|
|
|
$pp->actif = 1; |
|
|
|
if ($day_production == 6 && $p->samedi) |
|
|
|
if ($p->actif && $day_production == 6 && $p->samedi) |
|
|
|
$pp->actif = 1; |
|
|
|
if ($day_production == 7 && $p->dimanche) |
|
|
|
if ($p->actif && $day_production == 7 && $p->dimanche) |
|
|
|
$pp->actif = 1; |
|
|
|
|
|
|
|
$pp->quantite_max = $p->quantite_max; |