Browse Source

[backend] Vente au kilo : alerte si des unités différent entre les abonnements et les produits

refactoring
Guillaume Bourgeois 5 years ago
parent
commit
5aee544a45
1 changed files with 15 additions and 0 deletions
  1. +15
    -0
      backend/views/subscription/index.php

+ 15
- 0
backend/views/subscription/index.php View File

$this->addBreadcrumb($this->getTitle()) ; $this->addBreadcrumb($this->getTitle()) ;
$this->addButton(['label' => 'Nouvel abonnement <span class="glyphicon glyphicon-plus"></span>', 'url' => 'subscription/create', 'class' => 'btn btn-primary']) ; $this->addButton(['label' => 'Nouvel abonnement <span class="glyphicon glyphicon-plus"></span>', 'url' => 'subscription/create', 'class' => 'btn btn-primary']) ;


$subscriptionsArray = Subscription::searchAll() ;
$hasUnitsNotMatch = false ;
foreach($subscriptionsArray as $subscription) {
if($subscription->hasUnitsNotMatch()) {
$hasUnitsNotMatch = true ;
}
}

?> ?>
<div class="subscription-index"> <div class="subscription-index">

<?php if($hasUnitsNotMatch) : ?>
<div class="alert alert-warning">
<span class="glyphicon glyphicon-warning-sign"></span> Attention, des unités ne correspondent pas entre vos produits et vos abonnements.<br />
Veuillez modifier vos abonnements et ajuster les unités / quantités pour régler le problème.
</div>
<?php endif; ?>
<?= GridView::widget([ <?= GridView::widget([
'filterModel' => $searchModel, 'filterModel' => $searchModel,

Loading…
Cancel
Save