|
|
@@ -45,8 +45,23 @@ $this->setTitle('Abonnements') ; |
|
|
|
$this->addBreadcrumb($this->getTitle()) ; |
|
|
|
$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"> |
|
|
|
|
|
|
|
<?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([ |
|
|
|
'filterModel' => $searchModel, |