Pārlūkot izejas kodu

[Administration] Modules : page spécifique de présentation des modules

feature/souke
Guillaume Bourgeois pirms 10 mēnešiem
vecāks
revīzija
584f3868e5
4 mainītis faili ar 84 papildinājumiem un 84 dzēšanām
  1. +1
    -1
      backend/views/layouts/header.php
  2. +1
    -2
      backend/views/layouts/left.php
  3. +1
    -24
      backend/views/producer/billing.php
  4. +81
    -57
      frontend/views/site/_prices_producer.php

+ 1
- 1
backend/views/layouts/header.php Parādīt failu

@@ -285,7 +285,7 @@ $userCurrent = GlobalParam::getCurrentUser();
</a>
<ul class="dropdown-menu">
<li><a href="<?= Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']); ?>"><i
class="fa fa-chevron-left"></i> Retour à l'accueil</a></li>
class="fa fa-home"></i> Retour à l'accueil</a></li>
<li><a href="<?= Yii::$app->urlManagerFrontend->createAbsoluteUrl(['user/update']); ?>"><i
class="fa fa-user"></i> Mon profil</a></li>
<li><a href="<?= Yii::$app->urlManagerBackend->createUrl(['site/logout']); ?>"><i

+ 1
- 2
backend/views/layouts/left.php Parādīt failu

@@ -159,6 +159,7 @@ $isUserCurrentGrantedAsProducer = $userModule->getAuthorizationChecker()->isGran
'visible' => $isUserCurrentGrantedAsProducer && Yii::$app->parameterBag->get('dolibarrApiKey'),
'active' => Yii::$app->controller->id == 'producer-invoice',
],
['label' => 'Tarifs & modules', 'icon' => 'euro', 'url' => ['/producer/billing'], 'visible' => $isUserCurrentGrantedAsProducer],
[
'label' => 'Développement',
'icon' => 'code',
@@ -167,8 +168,6 @@ $isUserCurrentGrantedAsProducer = $userModule->getAuthorizationChecker()->isGran
'active' => Yii::$app->controller->id == 'development',
'template' => '<a href="{url}">{icon} {label}' . $newVersionOpendistribLabel . '</a>'
],
['label' => 'Tarifs', 'icon' => 'euro', 'url' => ['/producer/billing'], 'visible' => $isUserCurrentGrantedAsProducer],

['label' => 'Administration', 'options' => ['class' => 'header'], 'visible' => $isUserCurrentGrantedAsAdministrator],
[
'label' => 'Tickets',

+ 1
- 24
backend/views/producer/billing.php Parādīt failu

@@ -41,34 +41,11 @@ use common\helpers\Price;
$producerModule = $this->getProducerModule();
$producerPriceRangeModule = $this->getProducerPriceRangeModule();

$this->setTitle('Tarifs') ;
$this->setTitle('Tarifs hébergement & modules') ;
$this->addBreadcrumb($this->getTitle()) ;

?>

<?php

if($producerModule->isBillingTypeFreePrice($producer)) {
echo '<div class="alert alert-info">';
echo "Vous bénéficiez actuellement d'un abonnement à prix libre dont voici le montant : <strong>".$producer->getFreePrice()."</strong>";
echo '</div>';
}
elseif($producerModule->isBillingTypeClassic($producer)) {
$month = date('Y-m', strtotime('-1 month'));
$turnover = $producerModule->getTurnover($producer, $month);
$amountBilledLastMonth = $producerPriceRangeModule->getAmountToBeBilledByTurnover($turnover);

if($amountBilledLastMonth) {
echo '<div class="alert alert-info">';
echo "À titre d'information, voici le tarif retenu pour le mois dernier (".strftime('%B', strtotime('-1 month')).") : <strong>".$producerModule->getAmountToBeBilledByMonth($producer, $month, true)."</strong>";
echo "<br />Le chiffre d'affaire pris en compte pour ce calcul est : <strong>".Price::format($turnover)." HT</strong>";
echo '<br /><a href="'.Yii::$app->urlManager->createUrl(['stats/index']).'">Voir l\'évolution de mon chiffre d\'affaire</a>';
echo '</div>';
}
}

?>

<?=

$this->render('@frontend/views/site/_prices_producer', [

+ 81
- 57
frontend/views/site/_prices_producer.php Parādīt failu

@@ -42,64 +42,88 @@ use yii\helpers\Html;

?>

<div class="alert alert-warning" role="alert">
Découvrez ci-dessous la <strong>grille tarifaire</strong> pour l'hébergement de votre circuit court sur Opendistrib.
Le montant qui vous est facturé mensuellement dépend de votre chiffre d’affaire hors taxe réalisé sur le logiciel.
Il est donc adapté chaque mois en fonction de l’évolution de votre activité.<br>
Le service est <strong>sans engagement</strong>, vous arrêtez quand vous voulez sur simple désactivation de votre compte.
</div>

<?=
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<div class="glyphicon glyphicon-hdd"></div>
Hébergement
</h3>
</div>
<div class="panel-body">
<div class="alert alert-warning" role="alert">
Découvrez ci-dessous la <strong>grille tarifaire</strong> pour l'hébergement de votre circuit court sur Opendistrib.
Le montant qui vous est facturé mensuellement dépend de votre chiffre d’affaire hors taxe réalisé sur le logiciel.
Il est donc adapté chaque mois en fonction de l’évolution de votre activité. Le service est
<strong>sans engagement</strong>, vous arrêtez quand vous voulez sur simple désactivation de votre compte.
</div>
<?=
GridView::widget([
'dataProvider' => $dataProviderPrices,
'summary' => '',
'columns' => [
[
'label' => 'Tranches (CA HT / mois)',
'format' => 'raw',
'value' => function ($model) {
if ($model->range_begin == 0) {
$html = 'Moins de ' . $model->range_end . ' &euro;';
} elseif ($model->range_end == null) {
$html = 'Plus de ' . $model->range_begin . ' &euro;';
} else {
$html = 'Entre ' . $model->range_begin . ' &euro;';
$html .= ' et ' . $model->range_end . ' &euro;';
}
return $html;
}
],
[
'label' => 'Tarif (HT)',
'format' => 'raw',
'value' => function ($model) {
$html = $model->price . ' &euro;';

GridView::widget([
'dataProvider' => $dataProviderPrices,
'summary' => '',
'columns' => [
[
'label' => 'Tranches (CA HT / mois)',
'format' => 'raw',
'value' => function ($model) {
if ($model->range_begin == 0) {
$html = 'Moins de ' . $model->range_end . ' &euro;';
} elseif ($model->range_end == null) {
$html = 'Plus de ' . $model->range_begin . ' &euro;';
} else {
$html = 'Entre ' . $model->range_begin . ' &euro;';
$html .= ' et ' . $model->range_end . ' &euro;';
}
return $html;
}
],
[
'label' => 'Tarifs (HT)',
'format' => 'raw',
'value' => function ($model) {
$html = $model->price . ' &euro;';
return $html;
}
],
]
]);
?>
</div>
</div>

return $html;
}
],
]
]);
?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<span class="glyphicon glyphicon-th-large"></span>
Modules
</h3>
</div>
<div class="panel-body">
<div class="alert alert-warning" role="alert">
Retrouvez ici les modules payants d'Opendistrib correspondant aux développements qui n'ont pas encore
été totalement financés et aux fonctionnalités nécessitant une configuration spécifique. Contactez-moi
pour demander l'activation d'un module.
</div>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Module</th>
<th>Tarif (HT)</th>
</tr>
</thead>
<tbody>
<?php foreach($paidFeaturesArray as $paidFeature): ?>
<tr>
<td>
<div><strong><?= Html::encode($paidFeature->name) ?></strong></div>
<div><?= $paidFeature->description ?></div>
</td>
<td><?= Price::format($paidFeature->price, 0) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>

<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Module</th>
<th>Activation du module (HT)</th>
</tr>
</thead>
<tbody>
<?php foreach($paidFeaturesArray as $paidFeature): ?>
<tr>
<td>
<div><strong><?= Html::encode($paidFeature->name) ?></strong></div>
<div><?= $paidFeature->description ?></div>
</td>
<td><?= Price::format($paidFeature->price, 0) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>


Notiek ielāde…
Atcelt
Saglabāt