|
|
@@ -34,40 +34,51 @@ use common\models\Etablissement; |
|
|
|
|
|
|
|
<?php if($id_etablissement && $etablissement_paiement_ok): ?> |
|
|
|
|
|
|
|
<h2 id="step-choix-date">Date de commande</h2> |
|
|
|
<div class="col-md-6"> |
|
|
|
<h2 id="step-choix-date">Date de commande</h2> |
|
|
|
<?= $form->field($model, 'id_production')->label('')->hiddenInput(); ?> |
|
|
|
|
|
|
|
<?= $form->field($model, 'id_production')->label('')->hiddenInput(); ?> |
|
|
|
<?php if (isset($model->id)): ?> |
|
|
|
<div class="date-commande"><span><?php echo date('d/m/Y', strtotime($production->date)); ?></span></div> |
|
|
|
<?= Html::hiddenInput('id_commande', $model->id,['id'=>'id-commande']); ?> |
|
|
|
<?= Html::hiddenInput('montant_paye', $model->getMontantPaye(),['id'=>'montant-paye']); ?> |
|
|
|
<?php endif; ?> |
|
|
|
|
|
|
|
<?php if (isset($model->id)): ?> |
|
|
|
<div class="date-commande"><span><?php echo date('d/m/Y', strtotime($production->date)); ?></span></div> |
|
|
|
<?= Html::hiddenInput('id_commande', $model->id,['id'=>'id-commande']); ?> |
|
|
|
<?= Html::hiddenInput('montant_paye', $model->getMontantPaye(),['id'=>'montant-paye']); ?> |
|
|
|
<?php endif; ?> |
|
|
|
<div id="datepicker-production" <?php if (isset($model->id)): ?>style="display:none"<?php endif; ?>> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div id="datepicker-production" <?php if (isset($model->id)): ?>style="display:none"<?php endif; ?>> |
|
|
|
</div> |
|
|
|
|
|
|
|
<?php if (!isset($model->id)): ?> |
|
|
|
<br /> |
|
|
|
<?php endif; ?> |
|
|
|
|
|
|
|
<div id="dates" style="display:none;"> |
|
|
|
<?php |
|
|
|
foreach ($jours_production as $id_production => $j) { |
|
|
|
if ($j != '--') { |
|
|
|
echo '<div><span class="date">' . $j . '</span><span class="id_production">' . $id_production . '</span></div>'; |
|
|
|
<?php if (!isset($model->id)): ?> |
|
|
|
<br /> |
|
|
|
<?php endif; ?> |
|
|
|
|
|
|
|
<div id="dates" style="display:none;"> |
|
|
|
<?php |
|
|
|
foreach ($jours_production as $id_production => $j) { |
|
|
|
if ($j != '--') { |
|
|
|
echo '<div><span class="date">' . $j . '</span><span class="id_production">' . $id_production . '</span></div>'; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
?> |
|
|
|
</div> |
|
|
|
?> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="clr"></div> |
|
|
|
<div id="commandes-en-cours" style="display:none;"> |
|
|
|
<?php foreach ($commandes_en_cours as $c): ?> |
|
|
|
<?php echo '<div class="commande" data-idproduction="' . $c->id_production . '" data-id="' . $c->id . '" data-href="' . Yii::$app->urlManager->createUrl(['commande/update', 'id' => $c->id, 'id_etablissement' => $c->production->id_etablissement]) . '"></div>'; ?> |
|
|
|
<?php endforeach; ?> |
|
|
|
</div> |
|
|
|
<div id="has-commande-en-cours" style="display:none;" class="alert alert-danger">Vous avez déjà une commande en cours pour cette date. <a href="#">Cliquez ici</a> pour la modifier.</div> |
|
|
|
|
|
|
|
<div class="clr"></div> |
|
|
|
<div id="commandes-en-cours" style="display:none;"> |
|
|
|
<?php foreach ($commandes_en_cours as $c): ?> |
|
|
|
<?php echo '<div class="commande" data-idproduction="' . $c->id_production . '" data-id="' . $c->id . '" data-href="' . Yii::$app->urlManager->createUrl(['commande/update', 'id' => $c->id, 'id_etablissement' => $c->production->id_etablissement]) . '"></div>'; ?> |
|
|
|
<?php endforeach; ?> |
|
|
|
</div> |
|
|
|
<div id="has-commande-en-cours" style="display:none;" class="alert alert-danger">Vous avez déjà une commande en cours pour cette date. <a href="#">Cliquez ici</a> pour la modifier.</div> |
|
|
|
<div class="col-md-6"> |
|
|
|
<?php if(strlen($etablissement->infos_commande)): ?> |
|
|
|
<h2>Infos du producteur</h2> |
|
|
|
<div id="infos-commande"> |
|
|
|
<?= Html::encode($etablissement->infos_commande) ?> |
|
|
|
</div> |
|
|
|
<?php endif; ?> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="clr"></div> |
|
|
|
|