return $this->render('update', array_merge($this->processForm($order), [ | return $this->render('update', array_merge($this->processForm($order), [ | ||||
'model' => $order, | 'model' => $order, | ||||
'order_notfound' => !$order, | |||||
'orderNotfound' => !$order, | |||||
])); | ])); | ||||
} | } | ||||
<?php | |||||
/** | |||||
Copyright La boîte à pain (2018) | |||||
contact@laboiteapain.net | |||||
Ce logiciel est un programme informatique servant à aider les producteurs | |||||
à distribuer leur production en circuits courts. | |||||
Ce logiciel est régi par la licence CeCILL soumise au droit français et | |||||
respectant les principes de diffusion des logiciels libres. Vous pouvez | |||||
utiliser, modifier et/ou redistribuer ce programme sous les conditions | |||||
de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA | |||||
sur le site "http://www.cecill.info". | |||||
En contrepartie de l'accessibilité au code source et des droits de copie, | |||||
de modification et de redistribution accordés par cette licence, il n'est | |||||
offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons, | |||||
seule une responsabilité restreinte pèse sur l'auteur du programme, le | |||||
titulaire des droits patrimoniaux et les concédants successifs. | |||||
A cet égard l'attention de l'utilisateur est attirée sur les risques | |||||
associés au chargement, à l'utilisation, à la modification et/ou au | |||||
développement et à la reproduction du logiciel par l'utilisateur étant | |||||
donné sa spécificité de logiciel libre, qui peut le rendre complexe à | |||||
manipuler et qui le réserve donc à des développeurs et des professionnels | |||||
avertis possédant des connaissances informatiques approfondies. Les | |||||
utilisateurs sont donc invités à charger et tester l'adéquation du | |||||
logiciel à leurs besoins dans des conditions permettant d'assurer la | |||||
sécurité de leurs systèmes et ou de leurs données et, plus généralement, | |||||
à l'utiliser et l'exploiter dans les mêmes conditions de sécurité. | |||||
Le fait que vous puissiez accéder à cet en-tête signifie que vous avez | |||||
pris connaissance de la licence CeCILL, et que vous en avez accepté les | |||||
termes. | |||||
*/ | |||||
use yii\widgets\ActiveForm; | |||||
?> | |||||
<div class="commande-form"> | |||||
<?php | |||||
$form = ActiveForm::begin([ | |||||
'enableClientScript' => false | |||||
]); | |||||
?> | |||||
<?php | |||||
if(count($jours_production) <= 1) : | |||||
?> | |||||
<div class="alert alert-warning">Aucun jour de production n'a été programmé par le producteur.</div> | |||||
<?php endif; ?> | |||||
<?php if($id_etablissement && count($jours_production) > 1): ?> | |||||
<div id="step-choix-date" class="col-md-6"> | |||||
<?= $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; ?> | |||||
<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>'; | |||||
} | |||||
} | |||||
?> | |||||
</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> | |||||
<div class="col-md-6"> | |||||
<?php if(strlen($etablissement->infos_commande)): ?> | |||||
<div id="infos-commande"> | |||||
<?= nl2br(Html::encode($etablissement->infos_commande)) ?> | |||||
</div> | |||||
<?php endif; ?> | |||||
</div> | |||||
<div class="clr"></div> | |||||
<div id="depots"> | |||||
<h3 id="step-choix-depot"><span>Points de vente</span></h3> | |||||
<?= | |||||
$form->field($model, 'id_point_vente') | |||||
->label('') | |||||
->hiddenInput(); | |||||
//->dropDownList($points_vente) ; | |||||
?> | |||||
<input type="hidden" id="livraison" value="<?php if (!is_null($production) && $production->livraison): ?>1<?php else: ?>0<?php endif; ?>" /> | |||||
<ul id="points-vente" class="blocs"> | |||||
<?php | |||||
foreach ($points_vente as $pv) { | |||||
$commentaire = '' ; | |||||
if(isset($pv->pointVenteUser) && is_array($pv->pointVenteUser) && count($pv->pointVenteUser)) | |||||
{ | |||||
foreach($pv->pointVenteUser as $pvu) | |||||
{ | |||||
if($pvu->id_user == Yii::$app->user->identity->id && strlen($pvu->commentaire)) | |||||
{ | |||||
$commentaire = '<div class="commentaire"><span>'.Html::encode($pvu->commentaire).'</span></div>' ; | |||||
} | |||||
} | |||||
} | |||||
$html_code = '' ; | |||||
$data_code = '0' ; | |||||
$code = '' ; | |||||
if(strlen($pv->code)) | |||||
{ | |||||
if(!isset($model->id_point_vente) || $model->id_point_vente != $pv->id) | |||||
{ | |||||
$html_code .= '<span class="glyphicon glyphicon-lock"></span> ' ; | |||||
$data_code = '1' ; | |||||
} | |||||
else { | |||||
$code = $pv->code ; | |||||
} | |||||
} | |||||
echo '<li class="bloc point-vente point-vente-' . $pv->id . '" data-code="'.$data_code.'" data-vrac="' . (int) $pv->vrac . '" data-pain="' . (int) $pv->pain . '" data-credit-pain="'.(int) $pv->credit_pain.'"><div class="contenu">' . | |||||
'<span style="display:none;" class="id">' . $pv->id . '</span>' . | |||||
'<div class="nom">' .$html_code. Html::encode($pv->nom) . '</div>' . | |||||
'<div class="adresse">à ' . Html::encode($pv->localite) . '</div>' . | |||||
$commentaire . | |||||
'<input type="hidden" name="code_point_vente_'.$pv->id.'" value="'.$code.'" />'. | |||||
'</div></li>'; | |||||
} | |||||
?> | |||||
</ul> | |||||
<div class="clr"></div> | |||||
<div id="step-infos-pv"> | |||||
<?php | |||||
foreach ($points_vente as $pv) { | |||||
echo '<div class="alert alert-warning infos-pv infos-pv-'.$pv->id.'"><h4>Infos : <span>'.Html::encode($pv->nom).'</span></h4>' . | |||||
'<div class="jour jour-1">' . $pv->strInfos('lundi') . '</div>' . | |||||
'<div class="jour jour-2">' . $pv->strInfos('mardi') . '</div>' . | |||||
'<div class="jour jour-3">' . $pv->strInfos('mercredi') . '</div>' . | |||||
'<div class="jour jour-4">' . $pv->strInfos('jeudi') . '</div>' . | |||||
'<div class="jour jour-5">' . $pv->strInfos('vendredi') . '</div>' . | |||||
'<div class="jour jour-6">' . $pv->strInfos('samedi') . '</div>' . | |||||
'<div class="jour jour-0">' . $pv->strInfos('dimanche') . '</div>' . | |||||
'</div>' ; | |||||
} | |||||
?> | |||||
</div> | |||||
<div class="clr"></div> | |||||
</div> | |||||
<div id="produits"> | |||||
<h3 id="step-choix-produits"><span>Produits</span></h3> | |||||
<?php // confiance ?> | |||||
<input type="hidden" id="confiance" value="<?php echo (int) Yii::$app->user->identity->confiance; ?>" /> | |||||
<?php if (!Yii::$app->user->identity->confiance): ?> | |||||
<div id="mess-limit-quantity" class="alert alert-warning"><strong>Attention,</strong> vous ne pouvez commander que 3 produits.</div> | |||||
<?php endif; ?> | |||||
<?php // erreur ?> | |||||
<?php if (Yii::$app->session->getFlash('error')): ?> | |||||
<div class="alert alert-danger"><div class="icon"></div><?= Yii::$app->session->getFlash('error'); ?></div> | |||||
<?php endif; ?> | |||||
<div id="pain"> | |||||
<div class="alert alert-warning indisponible">Pain indisponible pour ce point de vente</div> | |||||
<table class="table table-bordered" id="table-produits"> | |||||
<thead> | |||||
<tr> | |||||
<th class="th-photo">Photo</th> | |||||
<th class="produit">Produit</th> | |||||
<th class="prix-unit">Prix unitaire</th> | |||||
<th class="colonne-quantite">Quantité</th> | |||||
<th class="total">Total</th> | |||||
</tr> | |||||
</thead> | |||||
<tbody> | |||||
<?php foreach ($produits as $p): ?> | |||||
<?php | |||||
$quantite = 0; | |||||
if (isset($produits_selec[$p->id])) | |||||
$quantite = $produits_selec[$p->id]; | |||||
?> | |||||
<tr class="produit-<?php echo $p->id; ?>" data-no-limit="<?php if(!$p->quantite_max): ?>1<?php else: ?>0<?php endif; ?>" data-quantite-max="<?= $quantite ?>" <?php if (count($produits_dispos) && !$produits_dispos[$p->id]['actif']): ?>style="display:none;"<?php endif; ?>> | |||||
<td class="td-photo"> | |||||
<?php if (strlen($p->photo) && file_exists(dirname(__FILE__).'/../../web/uploads/' . $p->photo)): ?><a href="<?= Yii::$app->urlManager->getBaseUrl() . '/uploads/' . $p->photo ?>" data-lightbox="produit-<?php echo $p->id; ?>"><img class="photo img-rounded" src="<?= Yii::$app->urlManager->getBaseUrl() . '/uploads/' . $p->photo ?>" alt="Photo <?= Html::encode($p->nom); ?>" /></a><?php endif; ?> | |||||
</td> | |||||
<td class="produit"> | |||||
<span class="nom"><?= Html::encode($p->nom); ?></span> - <span class="description"><?= Html::encode($p->getDescription()); ?></span><br /> | |||||
<span class="recette"><?= Html::encode($p->recette); ?></span> | |||||
</td> | |||||
<td class="prix-unit"><span class="prix"><?= number_format($p->prix, 2); ?></span> €</td> | |||||
<td class="colonne-quantite"> | |||||
<div class="input-group" <?php if (isset($produits_dispos[$p->id]) && $produits_dispos[$p->id]['quantite_restante'] == 0 && $quantite == 0): ?>style="display:none;"<?php endif; ?>> | |||||
<span class="input-group-btn"> | |||||
<button type="button" class="btn btn-default move-quantity moins">-</button> | |||||
</span> | |||||
<input type="text" value="<?php if (isset($produits_selec[$p->id])): echo $produits_selec[$p->id]; | |||||
else: ?>0<?php endif; ?>" readonly name="Produit[produit_<?php echo $p->id; ?>]" class="quantity form-control"> | |||||
<span class="input-group-btn"> | |||||
<button type="button" class="btn btn-default move-quantity plus">+</button> | |||||
</span> | |||||
</div> | |||||
<div class="quantite-restante">Reste <span class="nb"><?php if (isset($produits_dispos[$p->id])): echo $produits_dispos[$p->id]['quantite_restante'] + $quantite; | |||||
endif; ?></span> <?php echo Html::encode(strtolower($p->nom)); ?>(s) | |||||
</div> | |||||
<div class="epuise">Épuisé</div> | |||||
</td> | |||||
<td class="total"><strong></strong></td> | |||||
</tr> | |||||
<?php endforeach; ?> | |||||
</tbody> | |||||
<tfoot> | |||||
<tr> | |||||
<td></td> | |||||
<td></td> | |||||
<td></td> | |||||
<!-- <td><strong><span id="total-commande">0</span> €</strong></td> --> | |||||
<td id="total-commande"><strong></strong></td> | |||||
</tr> | |||||
</tfoot> | |||||
</table> | |||||
</div> | |||||
</div> | |||||
<?php if($id_etablissement): ?> | |||||
<?php | |||||
$etablissement = Etablissement::findOne($id_etablissement); | |||||
?> | |||||
<div id="bar-fixed" class="<?php if($etablissement->credit_pain): ?>credit-pain<?php else: ?>no-credit-pain<?php endif; ?>"> | |||||
<div class="container"> | |||||
<?php if (isset($model->id)): ?> | |||||
<a href="<?php echo Yii::$app->urlManager->createUrl(['commande/annuler', 'id' => $model->id]); ?>" class="btn btn-danger annuler-commande">Annuler ma commande</a> | |||||
<?php endif; ?> | |||||
<span id="total-commande-bottom"><span></span> €</span> | |||||
<?= Html::submitButton('<span class="glyphicon glyphicon-comment"></span> Commentaire', ['class' => 'btn btn-default btn-commentaire', 'data-placement' => 'top', 'data-toggle' => 'tooltip', 'data-original-title' => 'Ajouter un commentaire']) ?> | |||||
<?php | |||||
if($etablissement->credit_pain): | |||||
$lien_credit_pain = '<a class="info-credit-pain" href="'.Yii::$app->urlManager->createUrl(['site/creditpain']) .'" data-toggle="tooltip" data-placement="bottom" title="En savoir plus sur le Crédit Pain"><span class="glyphicon glyphicon-info-sign"></span></a>' ; ; | |||||
?> | |||||
<div id="checkbox-credit-pain" > | |||||
<?php if($credit || $model->getMontantPaye()): ?> | |||||
<?= Html::checkbox('credit_pain', true, ['label' => 'Utiliser mon compte Crédit Pain <span class="the-credit" data-toggle="tooltip" data-placement="top" data-original-title="Vous avez actuellement '.number_format($credit,2).' € sur votre compte Crédit Pain">'.number_format($credit,2).' €</span><br /><span class="info"></span>']) ?> | |||||
<?= Html::hiddenInput('montant_credit_pain', $credit, ['id' => 'montant-credit-pain']) ?> | |||||
<?= Html::hiddenInput('str_montant_credit_pain', number_format($credit,2).' €', ['id' => 'str-montant-credit-pain']) ?> | |||||
<?php else: ?> | |||||
<div id="info-credit-vide"> | |||||
Votre compte Crédit Pain est vide <?= $lien_credit_pain ?> | |||||
</div> | |||||
<?php endif; ?> | |||||
<div id="credit-pain-disabled">Le Crédit Pain est désactivé<br /> pour ce point de vente <?= $lien_credit_pain ?></div> | |||||
</div> | |||||
<div class="clr"></div> | |||||
<?php endif; ?> | |||||
<?= $form->field($model, 'commentaire')->textarea(['rows' => 3, 'placeholder' => 'Un commentaire ?'])->label(''); ?> | |||||
<div id="bloc-valider-commande"> | |||||
<?= Html::submitButton('<span class="glyphicon glyphicon-ok"></span> Valider ma commande', ['class' => 'btn btn-primary valider-commande']) ?> | |||||
</div> | |||||
<?php endif; ?> | |||||
</div> | |||||
</div> | |||||
<?php | |||||
// id_etablissement | |||||
endif; ?> | |||||
<?php ActiveForm::end(); ?> | |||||
<!-- modal code point de vente --> | |||||
<div class="modal fade" id="modal-code" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |||||
<div class="modal-dialog modal-lg" role="document"> | |||||
<div class="modal-content"> | |||||
<div class="modal-header"> | |||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |||||
<h4 class="modal-title" id="myModalLabel">Code d'accès</h4> | |||||
</div> | |||||
<div class="modal-body"> | |||||
<div class="alert alert-warning"> | |||||
Ce point de vente nécessite un code d'accès. | |||||
</div> | |||||
<form action="index.php?r=commande/verif-code" method="post"> | |||||
<input type="hidden" value="" name="id_point_vente" id="id-point-vente" /> | |||||
<div class="form-group field-code required"> | |||||
<label class="control-label" for="code">Code d'accès :</label> | |||||
<input type="password" class="form-control" id="code" name="code" /> | |||||
<p class="help-block help-block-error" style="display:none;">Code incorrect</p> | |||||
</div> | |||||
<div class="form-group"> | |||||
<button type="submit" class="btn btn-primary">Valider</button> | |||||
</div> | |||||
</form> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div><!-- commande-form --> |
<?php | |||||
/** | |||||
Copyright La boîte à pain (2018) | |||||
contact@laboiteapain.net | |||||
Ce logiciel est un programme informatique servant à aider les producteurs | |||||
à distribuer leur production en circuits courts. | |||||
Ce logiciel est régi par la licence CeCILL soumise au droit français et | |||||
respectant les principes de diffusion des logiciels libres. Vous pouvez | |||||
utiliser, modifier et/ou redistribuer ce programme sous les conditions | |||||
de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA | |||||
sur le site "http://www.cecill.info". | |||||
En contrepartie de l'accessibilité au code source et des droits de copie, | |||||
de modification et de redistribution accordés par cette licence, il n'est | |||||
offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons, | |||||
seule une responsabilité restreinte pèse sur l'auteur du programme, le | |||||
titulaire des droits patrimoniaux et les concédants successifs. | |||||
A cet égard l'attention de l'utilisateur est attirée sur les risques | |||||
associés au chargement, à l'utilisation, à la modification et/ou au | |||||
développement et à la reproduction du logiciel par l'utilisateur étant | |||||
donné sa spécificité de logiciel libre, qui peut le rendre complexe à | |||||
manipuler et qui le réserve donc à des développeurs et des professionnels | |||||
avertis possédant des connaissances informatiques approfondies. Les | |||||
utilisateurs sont donc invités à charger et tester l'adéquation du | |||||
logiciel à leurs besoins dans des conditions permettant d'assurer la | |||||
sécurité de leurs systèmes et ou de leurs données et, plus généralement, | |||||
à l'utiliser et l'exploiter dans les mêmes conditions de sécurité. | |||||
Le fait que vous puissiez accéder à cet en-tête signifie que vous avez | |||||
pris connaissance de la licence CeCILL, et que vous en avez accepté les | |||||
termes. | |||||
*/ | |||||
use yii\helpers\Html ; | |||||
use common\helpers\Url ; | |||||
?> | |||||
<div class="liste-etablissements"> | |||||
<?php if(count($etablissements)): ?> | |||||
<?php foreach($etablissements as $e): ?> | |||||
<div class="col-md-6 boulangerie <?php if(isset($id_etablissement) && $e['id'] == $id_etablissement): ?>selected<?php endif; ?>"> | |||||
<div class="panel panel-default"> | |||||
<div class="panel-heading"> | |||||
<?php if(isset($e['photo']) && strlen($e['photo'])): ?> | |||||
<img class="img-back" src="./uploads/<?= $e['photo'] ?>" /> | |||||
<?php endif; ?> | |||||
</div> | |||||
<div class="panel-body"> | |||||
<h3 class="panel-title"> | |||||
<?php echo Html::encode($e['nom']); ?> | |||||
</h3> | |||||
<div class="localite"> | |||||
à <?php echo Html::encode($e['ville']).' ('.Html::encode($e['code_postal']).')'; ?> | |||||
<?php if(!$e['actif']): ?> | |||||
• <span class="label label-danger" data-toggle="tooltip" data-placement="bottom" data-original-title="Les commandes sont actuellement fermées pour ce producteur. Revenez plus tard ou prenez contact avec l'établissement.">Hors-ligne</span> | |||||
<?php endif; ?> | |||||
</div> | |||||
<?php if(isset($id_etablissement) && $e['id'] == $id_etablissement): ?> | |||||
<span class="glyphicon glyphicon-check"></span> | |||||
<?php endif; ?> | |||||
<?php if($context == 'index'): ?> | |||||
<a href="<?= Yii::$app->urlManager->createUrl(['commande/remove-etablissement','id'=>$e['id']]); ?>" class="btn btn-xs btn-default remove"><span class="glyphicon glyphicon-remove"></span></a> | |||||
<?php endif; ?> | |||||
<?php | |||||
$disabled = '' ; | |||||
if(!$e['actif']): | |||||
$disabled = 'disabled="disabled"' ; | |||||
endif; | |||||
?> | |||||
<?php if($context == 'index'): ?> | |||||
<a class="btn btn-primary" <?= $disabled; ?> href="<?= Yii::$app->urlManager->createUrl(['commande/create', 'id_etablissement' => $e['id']]) ?>">Commander</a> | |||||
<?php if($e['id'] == Yii::$app->user->identity->id_etablissement): ?> | |||||
<a class="btn btn-default" href="<?= Url::backend(); ?>" data-toggle="tooltip" data-placement="bottom" title="Accédez au panneau d'administration de votre établissement"><span class="glyphicon glyphicon-cog"></span> Gérer mon établissement</a> | |||||
<?php endif; ?> | |||||
<?php elseif($context == 'commande'): ?> | |||||
<a class="btn btn-primary" <?= $disabled; ?> href="<?= Yii::$app->urlManager->createUrl(['commande/create', 'id_etablissement' => $e['id']]) ?>">Sélectionner</a> | |||||
<?php endif; ?> | |||||
<div class="clr"></div> | |||||
<div class="heure-limite-commande"> | |||||
<span data-toggle="tooltip" data-placement="bottom" title="Heure limite de commande"> | |||||
<strong><span class="glyphicon glyphicon-time"></span> Heure limite :</strong> | |||||
<?php echo Html::encode($e['heure_limite_commande']) ?> h | |||||
</span> • | |||||
<span data-toggle="tooltip" data-placement="bottom" title="Exemple : commande le lundi pour le <?php if($e['delai_commande'] == 1): ?>mardi<?php elseif($e['delai_commande'] == 2): ?>mercredi<?php elseif($e['delai_commande'] == 3): ?>jeudi<?php elseif($e['delai_commande'] == 4): ?>vendredi<?php elseif($e['delai_commande'] == 5): ?>samedi<?php elseif($e['delai_commande'] == 6): ?>dimanche<?php elseif($e['delai_commande'] == 7): ?>lundi d'après<?php endif; ?>"> | |||||
<strong>Délai :</strong> | |||||
<?= Html::encode($e['delai_commande']) ?> jour<?php if($e['delai_commande'] > 1): ?>s<?php endif; ?> | |||||
</span> | |||||
</div> | |||||
<?php if($e['credit_pain']): ?> | |||||
<div class="credit-pain"> | |||||
<span data-toggle="tooltip" data-placement="bottom" title="Montant de votre compte Crédit Pain. Rendez-vous chez votre producteur pour créditer votre compte."> | |||||
<span class="montant"><?= number_format($e['credit'],2); ?> <span class="glyphicon glyphicon-euro"></span></span> | |||||
</span> | |||||
<a class="info-credit-pain" href="<?= Yii::$app->urlManager->createUrl(['site/creditpain']); ?>" data-toggle="tooltip" data-placement="bottom" title="En savoir plus sur le Crédit Pain"><span class="glyphicon glyphicon-info-sign"></span></a> | |||||
</div> | |||||
<?php endif; ?> | |||||
<div class="clr"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<?php endforeach; ?> | |||||
<?php endif; ?> | |||||
</div> |
<?php | |||||
/** | |||||
Copyright La boîte à pain (2018) | |||||
contact@laboiteapain.net | |||||
Ce logiciel est un programme informatique servant à aider les producteurs | |||||
à distribuer leur production en circuits courts. | |||||
Ce logiciel est régi par la licence CeCILL soumise au droit français et | |||||
respectant les principes de diffusion des logiciels libres. Vous pouvez | |||||
utiliser, modifier et/ou redistribuer ce programme sous les conditions | |||||
de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA | |||||
sur le site "http://www.cecill.info". | |||||
En contrepartie de l'accessibilité au code source et des droits de copie, | |||||
de modification et de redistribution accordés par cette licence, il n'est | |||||
offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons, | |||||
seule une responsabilité restreinte pèse sur l'auteur du programme, le | |||||
titulaire des droits patrimoniaux et les concédants successifs. | |||||
A cet égard l'attention de l'utilisateur est attirée sur les risques | |||||
associés au chargement, à l'utilisation, à la modification et/ou au | |||||
développement et à la reproduction du logiciel par l'utilisateur étant | |||||
donné sa spécificité de logiciel libre, qui peut le rendre complexe à | |||||
manipuler et qui le réserve donc à des développeurs et des professionnels | |||||
avertis possédant des connaissances informatiques approfondies. Les | |||||
utilisateurs sont donc invités à charger et tester l'adéquation du | |||||
logiciel à leurs besoins dans des conditions permettant d'assurer la | |||||
sécurité de leurs systèmes et ou de leurs données et, plus généralement, | |||||
à l'utiliser et l'exploiter dans les mêmes conditions de sécurité. | |||||
Le fait que vous puissiez accéder à cet en-tête signifie que vous avez | |||||
pris connaissance de la licence CeCILL, et que vous en avez accepté les | |||||
termes. | |||||
*/ | |||||
use yii\widgets\ActiveForm; | |||||
?> | |||||
<div class="order-form"> | |||||
<?php | |||||
$form = ActiveForm::begin([ | |||||
'enableClientScript' => false | |||||
]); | |||||
?> | |||||
<?php | |||||
if(count($distributionDaysArray) <= 1) : | |||||
?> | |||||
<div class="alert alert-warning">Aucun jour de production n'a été programmé par le producteur.</div> | |||||
<?php endif; ?> | |||||
<?php if($idProducer && count($distributionDaysArray) > 1): ?> | |||||
<div id="step-choice-date" class="col-md-6"> | |||||
<?= $form->field($model, 'id_distribution')->label('')->hiddenInput(); ?> | |||||
<?php if (isset($model->id)): ?> | |||||
<div class="date-order"><span><?php echo date('d/m/Y', strtotime($distribution->date)); ?></span></div> | |||||
<?= Html::hiddenInput('id_order', $model->id,['id'=>'id-order']); ?> | |||||
<?= Html::hiddenInput('paid_amount', $model->getAmount(Order::AMOUNT_PAID),['id'=>'paid-amount']); ?> | |||||
<?php endif; ?> | |||||
<div id="datepicker-distribution" <?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 ($distributionDaysArray as $idDistribution => $day) { | |||||
if ($j != '--') { | |||||
echo '<div><span class="date">' . $day . '</span><span class="id_production">' . $idDistribution. '</span></div>'; | |||||
} | |||||
} | |||||
?> | |||||
</div> | |||||
<div class="clr"></div> | |||||
<div id="in-progress-orders" style="display:none;"> | |||||
<?php foreach ($ordersArray as $order): ?> | |||||
<?php echo '<div class="order" data-iddistribution="' . $order->id_distribution. '" data-id="' . $order->id . '" data-href="' . Yii::$app->urlManager->createUrl(['order/update', 'id' => $order->id, 'id_producer' => $order->distribution->id_producer]) . '"></div>'; ?> | |||||
<?php endforeach; ?> | |||||
</div> | |||||
<div id="has-order-in-progress" 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> | |||||
<div class="col-md-6"> | |||||
<?php if(strlen($producer->order_infos)): ?> | |||||
<div id="order-infos"> | |||||
<?= nl2br(Html::encode($producer->order_infos)) ?> | |||||
</div> | |||||
<?php endif; ?> | |||||
</div> | |||||
<div class="clr"></div> | |||||
<div id="block-points-sale"> | |||||
<h3 id="step-point-sale"><span>Points de vente</span></h3> | |||||
<?= | |||||
$form->field($model, 'id_point_sale') | |||||
->label('') | |||||
->hiddenInput(); | |||||
?> | |||||
<input type="hidden" id="livraison" value="<?php if (!is_null($distribution) && $distribution->delivery): ?>1<?php else: ?>0<?php endif; ?>" /> | |||||
<ul id="points-sale" class="blocs"> | |||||
<?php | |||||
foreach ($pointsSaleArray as $pointSale) { | |||||
$comment = '' ; | |||||
if(isset($pointSale->userPointSale) && is_array($pointSale->userPointSale) && count($pointSale->userPointSale)) | |||||
{ | |||||
foreach($pointSale->userPointSale as $userPointSale) | |||||
{ | |||||
if($userPointSale->id_user == User::getId() && strlen($userPointSale->comment)) | |||||
{ | |||||
$comment = '<div class="commentaire"><span>'.Html::encode($userPointSale->comment).'</span></div>' ; | |||||
} | |||||
} | |||||
} | |||||
$htmlCode = '' ; | |||||
$dataCode = '0' ; | |||||
$code = '' ; | |||||
if(strlen($pointSale->code)) | |||||
{ | |||||
if(!isset($model->id_point_sale) || $model->id_point_sale != $pointSale->id) | |||||
{ | |||||
$htmlCode .= '<span class="glyphicon glyphicon-lock"></span> ' ; | |||||
$dataCode = '1' ; | |||||
} | |||||
else { | |||||
$code = $pointSale->code ; | |||||
} | |||||
} | |||||
echo '<li class="bloc point-vente point-vente-' . $pointSale->id . '" data-code="'.$dataCode.'" data-credit="'.(int) $pointSale->credit.'"><div class="contenu">' . | |||||
'<span style="display:none;" class="id">' . $pointSale->id . '</span>' . | |||||
'<div class="name">' .$htmlCode. Html::encode($pointSale->name) . '</div>' . | |||||
'<div class="address">à ' . Html::encode($pointSale->locality) . '</div>' . | |||||
$comment . | |||||
'<input type="hidden" name="code_point_sale_'.$pointSale->id.'" value="'.$code.'" />'. | |||||
'</div></li>'; | |||||
} | |||||
?> | |||||
</ul> | |||||
<div class="clr"></div> | |||||
<div id="step-infos-point-sale"> | |||||
<?php | |||||
foreach ($pointsSaleArray as $pointSale) { | |||||
echo '<div class="alert alert-warning infos-pv infos-pv-'.$pointSale->id.'"><h4>Infos : <span>'.Html::encode($pointSale->name).'</span></h4>' . | |||||
'<div class="jour jour-1">' . $pointSale->getStrInfos('monday') . '</div>' . | |||||
'<div class="jour jour-2">' . $pointSale->getStrInfos('tuesday') . '</div>' . | |||||
'<div class="jour jour-3">' . $pointSale->getStrInfos('wednesday') . '</div>' . | |||||
'<div class="jour jour-4">' . $pointSale->getStrInfos('thursday') . '</div>' . | |||||
'<div class="jour jour-5">' . $pointSale->getStrInfos('friday') . '</div>' . | |||||
'<div class="jour jour-6">' . $pointSale->getStrInfos('saterday') . '</div>' . | |||||
'<div class="jour jour-0">' . $pointSale->getStrInfos('sunday') . '</div>' . | |||||
'</div>' ; | |||||
} | |||||
?> | |||||
</div> | |||||
<div class="clr"></div> | |||||
</div> | |||||
<div id="products"> | |||||
<h3 id="step-products"><span>Produits</span></h3> | |||||
<?php // erreur ?> | |||||
<?php if (Yii::$app->session->getFlash('error')): ?> | |||||
<div class="alert alert-danger"><div class="icon"></div><?= Yii::$app->session->getFlash('error'); ?></div> | |||||
<?php endif; ?> | |||||
<div id=""> | |||||
<div class="alert alert-warning unavailable">Produit indisponible pour ce point de vente</div> | |||||
<table class="table table-bordered" id="table-produits"> | |||||
<thead> | |||||
<tr> | |||||
<th class="th-photo">Photo</th> | |||||
<th class="product">Produit</th> | |||||
<th class="price-unit">Prix unitaire</th> | |||||
<th class="column-quantity">Quantité</th> | |||||
<th class="total">Total</th> | |||||
</tr> | |||||
</thead> | |||||
<tbody> | |||||
<?php foreach ($productsArray as $product): ?> | |||||
<?php | |||||
$quantity = 0; | |||||
if (isset($selectedProducts[$product->id])) { | |||||
$quantity = $selectedProducts[$product->id]; | |||||
} | |||||
?> | |||||
<tr class="product-<?php echo $product->id; ?>" data-no-limit="<?php if(!$product->quantity_max): ?>1<?php else: ?>0<?php endif; ?>" data-quantity-max="<?= $quantity ?>" <?php if (count($availableProducts) && !$availableProducts[$product->id]['active']): ?>style="display:none;"<?php endif; ?>> | |||||
<td class="td-photo"> | |||||
<?php if (strlen($product->photo) && file_exists(dirname(__FILE__).'/../../web/uploads/' . $product->photo)): ?><a href="<?= Yii::$app->urlManager->getBaseUrl() . '/uploads/' . $product->photo ?>" data-lightbox="product-<?php echo $product->id; ?>"><img class="photo img-rounded" src="<?= Yii::$app->urlManager->getBaseUrl() . '/uploads/' . $product->photo ?>" alt="Photo <?= Html::encode($product->name); ?>" /></a><?php endif; ?> | |||||
</td> | |||||
<td class="produit"> | |||||
<span class="name"><?= Html::encode($product->name); ?></span> - <span class="description"><?= Html::encode($product->getDescription()); ?></span><br /> | |||||
<span class="recipe"><?= Html::encode($product->recipe); ?></span> | |||||
</td> | |||||
<td class="price-unit"><span class="price"><?= number_format($product->price, 2); ?></span> €</td> | |||||
<td class="column-quantity"> | |||||
<div class="input-group" <?php if (isset($availableProducts[$product->id]) && $availableProducts[$product->id]['quantity_remaining'] == 0 && $quantity == 0): ?>style="display:none;"<?php endif; ?>> | |||||
<span class="input-group-btn"> | |||||
<button type="button" class="btn btn-default move-quantity minus">-</button> | |||||
</span> | |||||
<input type="text" value="<?php if (isset($selectedProducts[$product->id])): echo $selectedProducts[$product->id]; | |||||
else: ?>0<?php endif; ?>" readonly name="Product[product_<?php echo $product->id; ?>]" class="quantity form-control"> | |||||
<span class="input-group-btn"> | |||||
<button type="button" class="btn btn-default move-quantity plus">+</button> | |||||
</span> | |||||
</div> | |||||
<div class="quantity-remaining">Reste <span class="nb"><?php if (isset($availableProducts[$product->id])): echo $availableProducts[$product->id]['quantity_remaining'] + $quantity; | |||||
endif; ?></span> <?php echo Html::encode(strtolower($product->name)); ?>(s) | |||||
</div> | |||||
<div class="epuise">Épuisé</div> | |||||
</td> | |||||
<td class="total"><strong></strong></td> | |||||
</tr> | |||||
<?php endforeach; ?> | |||||
</tbody> | |||||
<tfoot> | |||||
<tr> | |||||
<td></td> | |||||
<td></td> | |||||
<td></td> | |||||
<td id="total-order"><strong></strong></td> | |||||
</tr> | |||||
</tfoot> | |||||
</table> | |||||
</div> | |||||
</div> | |||||
<?php if($idProducer): ?> | |||||
<?php | |||||
$producer = Producer::findOne($idProducer); | |||||
?> | |||||
<div id="bar-fixed" class="<?php if($producer->credit): ?>credit<?php else: ?>no-credit<?php endif; ?>"> | |||||
<div class="container"> | |||||
<?php if (isset($model->id)): ?> | |||||
<a href="<?php echo Yii::$app->urlManager->createUrl(['order/cancel', 'id' => $model->id]); ?>" class="btn btn-danger cancel-order">Annuler ma commande</a> | |||||
<?php endif; ?> | |||||
<span id="total-order-bottom"><span></span> €</span> | |||||
<?= Html::submitButton('<span class="glyphicon glyphicon-comment"></span> Commentaire', ['class' => 'btn btn-default btn-comment', 'data-placement' => 'top', 'data-toggle' => 'tooltip', 'data-original-title' => 'Ajouter un commentaire']) ?> | |||||
<?php | |||||
if($producer->credit): | |||||
$linkCredit = '<a class="info-credit" href="'.Yii::$app->urlManager->createUrl(['site/credit']) .'" data-toggle="tooltip" data-placement="bottom" title="En savoir plus sur le Crédit"><span class="glyphicon glyphicon-info-sign"></span></a>' ; ; | |||||
?> | |||||
<div id="checkbox-credit" > | |||||
<?php if($credit || $model->getAmount(Order::AMOUNT_PAID)): ?> | |||||
<?= Html::checkbox('credit', true, ['label' => 'Utiliser mon Crédit <span class="the-credit" data-toggle="tooltip" data-placement="top" data-original-title="Vous avez actuellement '.number_format($credit,2).' € sur votre compte Crédit">'.number_format($credit,2).' €</span><br /><span class="info"></span>']) ?> | |||||
<?= Html::hiddenInput('amount_credit', $credit, ['id' => 'amount-credit']) ?> | |||||
<?= Html::hiddenInput('str_amount_credit', number_format($credit,2).' €', ['id' => 'str-amount-credit']) ?> | |||||
<?php else: ?> | |||||
<div id="info-credit-empty"> | |||||
Votre compte Crédit est vide <?= $linkCredit ?> | |||||
</div> | |||||
<?php endif; ?> | |||||
<div id="credit-disabled">Le Crédit est désactivé<br /> pour ce point de vente <?= $linkCredit ?></div> | |||||
</div> | |||||
<div class="clr"></div> | |||||
<?php endif; ?> | |||||
<?= $form->field($model, 'comment')->textarea(['rows' => 3, 'placeholder' => 'Un commentaire ?'])->label(''); ?> | |||||
<div id="block-confirm-order"> | |||||
<?= Html::submitButton('<span class="glyphicon glyphicon-ok"></span> Valider ma commande', ['class' => 'btn btn-primary confirm-order']) ?> | |||||
</div> | |||||
<?php endif; ?> | |||||
</div> | |||||
</div> | |||||
<?php | |||||
// id_etablissement | |||||
endif; ?> | |||||
<?php ActiveForm::end(); ?> | |||||
<!-- modal code point de vente --> | |||||
<div class="modal fade" id="modal-code" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |||||
<div class="modal-dialog modal-lg" role="document"> | |||||
<div class="modal-content"> | |||||
<div class="modal-header"> | |||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |||||
<h4 class="modal-title" id="myModalLabel">Code d'accès</h4> | |||||
</div> | |||||
<div class="modal-body"> | |||||
<div class="alert alert-warning"> | |||||
Ce point de vente nécessite un code d'accès. | |||||
</div> | |||||
<form action="index.php?r=order/validate-code-point-sale" method="post"> | |||||
<input type="hidden" value="" name="idPointSale" id="id-point-sale" /> | |||||
<div class="form-group field-code required"> | |||||
<label class="control-label" for="code">Code d'accès :</label> | |||||
<input type="password" class="form-control" id="code" name="code" /> | |||||
<p class="help-block help-block-error" style="display:none;">Code incorrect</p> | |||||
</div> | |||||
<div class="form-group"> | |||||
<button type="submit" class="btn btn-primary">Valider</button> | |||||
</div> | |||||
</form> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div><!-- commande-form --> |
$this->setTitle('Passer une commande') ; | $this->setTitle('Passer une commande') ; | ||||
?> | ?> | ||||
<div class="commande-create"> | |||||
<div class="order-create"> | |||||
<?= $this->render('_form', [ | <?= $this->render('_form', [ | ||||
'model' => $model, | 'model' => $model, | ||||
'points_vente' => $points_vente, | |||||
'jours_production' => $jours_production, | |||||
'produits' => $produits, | |||||
'produits_selec' => $produits_selec, | |||||
'produits_dispos' => $produits_dispos, | |||||
'production' => $production, | |||||
'commandes_en_cours' => $commandes_en_cours, | |||||
'produits_vrac' => $produits_vrac, | |||||
'etablissements' => $etablissements, | |||||
'id_etablissement' => $id_etablissement, | |||||
'etablissement' => $etablissement, | |||||
'pointsSaleArray' => $pointsSaleArray, | |||||
'distributionDaysArray' => $distributionDaysArray, | |||||
'productsArray' => $productsArray, | |||||
'selectedProducts' => $selectedProducts, | |||||
'availableProducts' => $availableProducts, | |||||
'distribution' => $distribution, | |||||
'ordersArray' => $ordersArray, | |||||
'producersArray' => $producersArray, | |||||
'idProducer' => $idProducer, | |||||
'producer' => $producer, | |||||
'credit' => $credit | 'credit' => $credit | ||||
]) ?> | ]) ?> | ||||
?> | ?> | ||||
<div id="index-commande"> | |||||
<div id="index-order"> | |||||
<?php if($commande_ok): ?> | |||||
<?php if($orderOk): ?> | |||||
<div class="alert alert-success"> | <div class="alert alert-success"> | ||||
<div class="icon"></div> | <div class="icon"></div> | ||||
Votre commande a bien été prise en compte. | Votre commande a bien été prise en compte. | ||||
</div> | </div> | ||||
<?php endif; ?> | <?php endif; ?> | ||||
<?php if($annule_ok): ?> | |||||
<?php if($cancelOk): ?> | |||||
<div class="alert alert-success"><div class="icon"></div>Votre commande a bien été annulée.</div> | <div class="alert alert-success"><div class="icon"></div>Votre commande a bien été annulée.</div> | ||||
<?php endif; ?> | <?php endif; ?> | ||||
<?= | <?= | ||||
GridView::widget([ | GridView::widget([ | ||||
'dataProvider' => $data_provider_commandes, | |||||
'dataProvider' => $dataProviderOrders, | |||||
'summary' => '', | 'summary' => '', | ||||
'beforeRow' => function($model) { | 'beforeRow' => function($model) { | ||||
$model->init() ; | $model->init() ; | ||||
}, | }, | ||||
'columns' => [ | 'columns' => [ | ||||
[ | [ | ||||
'attribute' => 'production.date', | |||||
'attribute' => 'distribution.date', | |||||
'label' => 'Date de livraison', | 'label' => 'Date de livraison', | ||||
'value' => function($model) { | 'value' => function($model) { | ||||
return date('d/m/Y', strtotime($model->production->date)) ; | |||||
return date('d/m/Y', strtotime($model->distribution->date)) ; | |||||
} | } | ||||
], | ], | ||||
[ | [ | ||||
'label' => 'Résumé', | 'label' => 'Résumé', | ||||
'format' => 'raw', | 'format' => 'raw', | ||||
'value' => function($model) { | 'value' => function($model) { | ||||
return $model->getResumePanier(); | |||||
return $model->getCartSummary(); | |||||
} | } | ||||
], | ], | ||||
[ | [ | ||||
'label' => 'Point de vente', | 'label' => 'Point de vente', | ||||
'format' => 'raw', | 'format' => 'raw', | ||||
'value' => function($model) { | 'value' => function($model) { | ||||
return $model->getResumePointVente(); | |||||
return $model->getPointSaleSummary(); | |||||
} | } | ||||
], | ], | ||||
[ | [ | ||||
'label' => 'Montant', | 'label' => 'Montant', | ||||
'format' => 'raw', | 'format' => 'raw', | ||||
'value' => function($model) { | 'value' => function($model) { | ||||
return $model->getResumeMontant(); | |||||
return $model->getAmountSummary(); | |||||
} | } | ||||
], | ], | ||||
[ | [ | ||||
'label' => 'Statut', | 'label' => 'Statut', | ||||
'format' => 'raw', | 'format' => 'raw', | ||||
'value' => function($c) { | 'value' => function($c) { | ||||
if($c->getEtat() == Commande::ETAT_LIVREE) { | |||||
if($c->getState() == Order::STATE_DELIVERY) { | |||||
return 'Livrée' ; | return 'Livrée' ; | ||||
} | } | ||||
elseif($c->getEtat() == Commande::ETAT_PREPARATION) { | |||||
elseif($c->getState() == Order::STATE_PREPARATION) { | |||||
return 'En préparation' ; | return 'En préparation' ; | ||||
} | } | ||||
elseif($c->getEtat() == Commande::ETAT_MODIFIABLE) { | |||||
elseif($c->getState() == Order::STATE_OPEN) { | |||||
return '<div class="btn-group"> | return '<div class="btn-group"> | ||||
<a href="'.Yii::$app->urlManager->createUrl(['commande/update','id'=>$c->id, 'id_etablissement'=>$c->production->etablissement->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-pencil"></span> Modifier</a> | |||||
<a href="'.Yii::$app->urlManager->createUrl(['order/update','id'=>$c->id, 'id_producer'=>$c->distribution->producer->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-pencil"></span> Modifier</a> | |||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | ||||
<span class="caret"></span> | <span class="caret"></span> | ||||
<span class="sr-only">Toggle Dropdown</span> | <span class="sr-only">Toggle Dropdown</span> | ||||
</button> | </button> | ||||
<ul class="dropdown-menu" role="menu"> | <ul class="dropdown-menu" role="menu"> | ||||
<li><a href="'.Yii::$app->urlManager->createUrl(['commande/annuler','id'=>$c->id]).'"><span class="glyphicon glyphicon-trash"></span> Annuler la commande</a></li> | |||||
<li><a href="'.Yii::$app->urlManager->createUrl(['order/cancel','id'=>$c->id]).'"><span class="glyphicon glyphicon-trash"></span> Annuler la commande</a></li> | |||||
</ul> | </ul> | ||||
</div>' ; | </div>' ; | ||||
} | } |
$this->setTitle('Modifier une commande') ; | $this->setTitle('Modifier une commande') ; | ||||
?> | ?> | ||||
<div class="commande-update"> | |||||
<div class="order-update"> | |||||
<?php if($commande_introuvable): ?> | |||||
<?php if($orderNotfound): ?> | |||||
<div class="alert alert-danger">Cette commande est introuvable</div><br /> | <div class="alert alert-danger">Cette commande est introuvable</div><br /> | ||||
<a class="btn btn-default" href="<?php echo Yii::$app->urlManager->createUrl(['commande/index']); ?>">Retour</a> | |||||
<a class="btn btn-default" href="<?php echo Yii::$app->urlManager->createUrl(['order/index']); ?>">Retour</a> | |||||
<?php else: ?> | <?php else: ?> | ||||
<?= $this->render('_form', [ | <?= $this->render('_form', [ | ||||
'model' => $model, | 'model' => $model, | ||||
'points_vente' => $points_vente, | |||||
'jours_production' => $jours_production, | |||||
'produits' => $produits, | |||||
'produits_selec' => $produits_selec, | |||||
'produits_dispos' => $produits_dispos, | |||||
'production' => $production, | |||||
'commandes_en_cours' => $commandes_en_cours, | |||||
'produits_vrac' => $produits_vrac, | |||||
'etablissements' => $etablissements, | |||||
'etablissement' => $etablissement, | |||||
'id_etablissement' => $id_etablissement, | |||||
'pointsSaleArray' => $pointsSaleArray, | |||||
'distributionDaysArray' => $distributionDaysArray, | |||||
'productsArray' => $productsArray, | |||||
'selectedProducts' => $selectedProducts, | |||||
'availableProducts' => $availableProducts, | |||||
'distribution' => $distribution, | |||||
'ordersArray' => $ordersArray, | |||||
'producersArray' => $producersArray, | |||||
'idProducer' => $idProducer, | |||||
'producer' => $producer, | |||||
'credit' => $credit | 'credit' => $credit | ||||
]) ?> | ]) ?> | ||||