|
|
@@ -113,6 +113,14 @@ $isUserCurrentGrantedAsProducer = $userModule->getAuthorizationChecker()->isGran |
|
|
|
$countUsersOnlineLabel .= '</span>'; |
|
|
|
} |
|
|
|
|
|
|
|
$countProducerInvoicesUnpaidLabel = ''; |
|
|
|
$countProducerInvoicesUnpaid = $this->getProducerModule()->getDolibarrUtils() |
|
|
|
->countDolibarrProducerInvoicesUnpaid($producer); |
|
|
|
if($countProducerInvoicesUnpaid > 1) { |
|
|
|
$countProducerInvoicesUnpaidLabelColor = ($countProducerInvoicesUnpaid > 2) ? 'red' : 'orange'; |
|
|
|
$countProducerInvoicesUnpaidLabel = '<span class="pull-right-container"><small class="label pull-right bg-'.$countProducerInvoicesUnpaidLabelColor.'">' . $countProducerInvoicesUnpaid . '</small></span>'; |
|
|
|
} |
|
|
|
|
|
|
|
?> |
|
|
|
|
|
|
|
<?= dmstr\widgets\Menu::widget( |
|
|
@@ -200,6 +208,7 @@ $isUserCurrentGrantedAsProducer = $userModule->getAuthorizationChecker()->isGran |
|
|
|
'url' => ['/producer-invoice/index'], |
|
|
|
'visible' => $isUserCurrentGrantedAsProducer && Yii::$app->parameterBag->get('dolibarrApiKey'), |
|
|
|
'active' => Yii::$app->controller->id == 'producer-invoice', |
|
|
|
'template' => '<a href="{url}">{icon} {label}' . $countProducerInvoicesUnpaidLabel . '</a>' |
|
|
|
], |
|
|
|
['label' => 'Tarifs & modules', 'icon' => 'euro', 'url' => ['/producer/billing'], 'visible' => $isUserCurrentGrantedAsProducer], |
|
|
|
[ |