|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- <?php
-
-
-
- use yii\helpers\Html ;
-
- $this->title = 'Tableau de bord';
-
- ?>
- <div class="site-index">
-
- <?php if(!$producer->getFreePrice()): ?>
- <div class="callout callout-info">
- <h4>Abonnement à prix libre</h4>
- <p><i>distrib</i> fonctionne avec système d'abonnement à prix libre pour en
- assurer la plus grande diffusion possible. Ceci correspond également à l'unique source de revenus
- nécessaire à la maintenance et au développement de la plateforme.<br />
- Si cet outil est important dans votre activité, nous vous encourageons à nous soutenir en vous abonnant.
- </p>
- <p><?= Html::a('> Définir le montant de mon abonnement', ['producer/billing'], ['class' => 'btn btn-default']); ?></p>
- </div>
- <?php endif; ?>
-
- <?php if(Yii::$app->request->get('error_products_points_sale')): ?>
- <div class="alert alert-warning">
- Vous devez ajouter <?php if(!$productsCount): ?> des produits<?php endif; ?>
- <?php if(!$productsCount && !$pointsSaleCount): ?> et<?php endif; ?>
- <?php if(!$pointsSaleCount): ?> un ou des points de vente <?php endif; ?>
- avant d'effectuer cette action.
- </div>
- <?php endif; ?>
-
- <?php if(!$productsCount): ?>
- <div class="info-box">
- <span class="info-box-icon bg-yellow"><i class="fa fa-clone"></i></span>
- <div class="info-box-content">
- <span class="info-box-text"><br /><?= Html::a('Ajouter des produits', ['product/create'], ['class' => 'btn btn-default']); ?></span>
- </div>
- </div>
- <?php endif; ?>
-
- <?php if(!$pointsSaleCount): ?>
- <div class="info-box">
- <span class="info-box-icon bg-yellow"><i class="fa fa-map-marker"></i></span>
- <div class="info-box-content">
- <span class="info-box-text"><br /><?= Html::a('Ajouter des points de vente', ['point-sale/create'], ['class' => 'btn btn-default']); ?></span>
- </div>
- </div>
- <?php endif; ?>
-
- <?php if($productsCount && $pointsSaleCount && !count($distributionsArray)): ?>
- <div class="info-box">
- <span class="info-box-icon bg-yellow"><i class="fa fa-calendar"></i></span>
- <div class="info-box-content">
- <span class="info-box-text"><br /><?= Html::a('Ajouter des jours de distribution', ['distribution/index'], ['class' => 'btn btn-default']); ?></span>
- </div>
- </div>
- <?php endif; ?>
-
- <?php if(count($distributionsArray)): ?>
- <div id="distributions">
- <div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">
- Prochaines distributions
- </h3>
- </div>
- <div class="panel-body">
- <!-- distributions -->
- <?php foreach($distributionsArray as $distribution): ?>
- <div class="col-md-4 col-sm-12 col-xs-12">
- <div class="info-box">
- <span class="info-box-icon bg-green date">
- <span class="day"><?= strftime('%A', strtotime($distribution->date)) ?></span>
- <span class="num"><?= date('d', strtotime($distribution->date)) ?></span>
- <span class="month"><?= strftime('%B', strtotime($distribution->date)) ?></span>
- </span>
- <div class="info-box-content">
- <span class="info-box-text">
- <?php if(count($distribution->order)): ?>
- <strong><?= count($distribution->order); ?></strong> COMMANDES
- <?php else: ?>
- AUCUNE COMMANDE
- <?php endif; ?>
- </span>
- <span class="info-box-number"></span>
- <div class="buttons">
- <?= Html::a('<span class="fa fa-eye"></span>', ['distribution/index', 'date' => $distribution->date], ['class' => 'btn btn-default']); ?>
- <?php if(count($distribution->order)): ?><?= Html::a('<span class="fa fa-download"></span>', ['distribution/report', 'date' => $distribution->date], ['class' => 'btn btn-default']); ?><?php endif; ?>
- </div>
- </div>
- </div>
- </div>
- <?php endforeach; ?>
- </div>
- </div>
- </div>
- <?php endif; ?>
-
- <div class="clr"></div>
-
- <!-- dernières commandes -->
- <?php if(is_array($ordersArray) && count($ordersArray)): ?>
- <div id="last-orders" class="">
- <div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">
- Commandes à venir
- </h3>
- </div>
- <div class="panel-body">
- <table class="table table-condensed table-bordered">
- <thead>
- <tr>
- <th></th>
- <th>Date</th>
- <th>Client</th>
- <th>Produits</th>
- <th>Point de vente</th>
- <th>Montant</th>
- <th>Historique</th>
- </tr>
- </thead>
- <tbody>
- <?php foreach($ordersArray as $order): ?>
- <tr class="<?= $order->getClassHistory() ; ?>">
- <td class="infos"><?= $order->getStrOrigin(true); ?></td>
- <td class="date">
- <div class="block-date">
- <div class="day"><?= strftime('%A', strtotime($order->distribution->date)) ?></div>
- <div class="num"><?= date('d', strtotime($order->distribution->date)) ?></div>
- <div class="month"><?= strftime('%B', strtotime($order->distribution->date)) ?></div>
- </div>
- </td>
- <td>
- <?= $order->getStrUser(); ?><br />
- <?php if(strlen($order->comment)): ?>
- <div class="comment"><span class="glyphicon glyphicon-comment"></span> <?= nl2br(Html::encode($order->comment)) ; ?></div>
- <?php endif; ?>
- </td>
- <td><?= $order->getCartSummary() ; ?></td>
- <td><?= $order->getPointSaleSummary() ; ?></td>
- <td><?= $order->getAmount(Order::AMOUNT_TOTAL, true) ; ?></td>
- <td class="history"><?= $order->getStrHistory() ; ?></td>
- </tr>
- <?php endforeach; ?>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <?php endif; ?>
- </div>
|