Quellcode durchsuchen

Merge branch 'feature/point_sale_payment_method' into develop

feature/rotating_product
Guillaume Bourgeois vor 5 Monaten
Ursprung
Commit
5bdf65d781
32 geänderte Dateien mit 519 neuen und 247 gelöschten Zeilen
  1. +9
    -0
      backend/controllers/PointSaleController.php
  2. +3
    -3
      backend/views/distribution/index.php
  3. +2
    -2
      backend/views/distribution/report-bourlingue.php
  4. +3
    -3
      backend/views/order/report.php
  5. +42
    -10
      backend/views/point-sale/_form.php
  6. +13
    -7
      backend/views/point-sale/index.php
  7. +2
    -9
      backend/views/producer/update.php
  8. +120
    -100
      backend/web/css/screen.css
  9. +3
    -1
      backend/web/js/backend.js
  10. +6
    -0
      backend/web/sass/_adminlte.scss
  11. +3
    -1
      backend/web/sass/point_sale/_form.scss
  12. +8
    -0
      backend/web/sass/point_sale/_index.scss
  13. +1
    -1
      common/web/js/common.js
  14. +49
    -0
      console/commands/InitPointSalePaymentMethodsFromSettingsController.php
  15. +30
    -0
      console/migrations/m240424_071154_add_columns_point_sale_payment_method.php
  16. +3
    -3
      domain/Distribution/Distribution/Export/DistributionReportPdfGenerator.php
  17. +1
    -1
      domain/Order/Order/OrderBuilder.php
  18. +4
    -4
      domain/Order/Order/OrderRepository.php
  19. +5
    -3
      domain/PointSale/PointSale/PointSale.php
  20. +23
    -0
      domain/PointSale/PointSale/PointSaleBuilder.php
  21. +2
    -2
      domain/PointSale/PointSale/PointSaleSearch.php
  22. +7
    -8
      domain/Producer/Producer/Producer.php
  23. +11
    -5
      domain/Producer/Producer/ProducerSolver.php
  24. +10
    -7
      producer/controllers/OrderController.php
  25. +1
    -1
      producer/views/order/_form.php
  26. +1
    -1
      producer/views/order/confirm.php
  27. +3
    -5
      producer/views/order/history.php
  28. +82
    -58
      producer/views/order/order.php
  29. +12
    -7
      producer/web/css/screen.css
  30. +51
    -2
      producer/web/js/vuejs/order-order.js
  31. +1
    -1
      producer/web/sass/order/_form.scss
  32. +8
    -2
      producer/web/sass/order/_order.scss

+ 9
- 0
backend/controllers/PointSaleController.php Datei anzeigen

if ($pointSale->load(\Yii::$app->request->post()) && $pointSale->save()) { if ($pointSale->load(\Yii::$app->request->post()) && $pointSale->save()) {
$pointSaleModule->updatePointSalePointProduction($pointSale); $pointSaleModule->updatePointSalePointProduction($pointSale);
$pointSaleModule->processRestrictedAccess($pointSale); $pointSaleModule->processRestrictedAccess($pointSale);
$this->initPaymentMethodsByCreditFunctioning($pointSale);
$distributionModule->addPointSaleIncomingDistributions($pointSale); $distributionModule->addPointSaleIncomingDistributions($pointSale);


return $this->redirect(['index']); return $this->redirect(['index']);


$pointSaleModule->updatePointSalePointProduction($model); $pointSaleModule->updatePointSalePointProduction($model);
$pointSaleModule->processRestrictedAccess($model); $pointSaleModule->processRestrictedAccess($model);
$this->initPaymentMethodsByCreditFunctioning($model);
$distributionModule->addPointSaleIncomingDistributions($model); $distributionModule->addPointSaleIncomingDistributions($model);


$this->setFlash('success', 'Point de vente modifié.'); $this->setFlash('success', 'Point de vente modifié.');
} }
} }


public function initPaymentMethodOnsiteByCreditFunctioning(PointSale $pointSale)
{
if($this->getPointSaleModule()->getBuilder()->initPaymentMethodsByCreditFunctioning($pointSale)) {
$this->addFlash('info', 'Le paiement sur place a été ajusté par rapport au fonctionnement de la cagnotte.');
}
}

/** /**
* Initialise le formulaire de création/modification. * Initialise le formulaire de création/modification.
*/ */

+ 3
- 3
backend/views/distribution/index.php Datei anzeigen

</div> </div>
<div v-if="producer.credit && pointSaleActive"> <div v-if="producer.credit && pointSaleActive">
<span class="title">Cagnotte</span> <span class="title">Cagnotte</span>
<template v-if="pointSaleActive.credit && pointSaleActive.credit == 1">
<template v-if="pointSaleActive.payment_method_credit && pointSaleActive.payment_method_credit == 1">
<template v-if="pointSaleActive.credit_functioning == 'mandatory'">Obligatoire</template> <template v-if="pointSaleActive.credit_functioning == 'mandatory'">Obligatoire</template>
<template v-else-if="pointSaleActive.credit_functioning == 'user'">Basé sur l'utilisateur</template> <template v-else-if="pointSaleActive.credit_functioning == 'user'">Basé sur l'utilisateur</template>
<template v-else-if="pointSaleActive.credit_functioning == 'optional'">Optionnel</template> <template v-else-if="pointSaleActive.credit_functioning == 'optional'">Optionnel</template>
<th class="column-point-sale" v-if="idActivePointSale == 0">Point de vente</th> <th class="column-point-sale" v-if="idActivePointSale == 0">Point de vente</th>
<th class="column-amount">Montant</th> <th class="column-amount">Montant</th>
<th class="column-state-payment">Paiement</th> <th class="column-state-payment">Paiement</th>
<th class="column-credit" v-if="!idActivePointSale || (pointSaleActive && pointSaleActive.credit == 1)">Cagnotte</th>
<th class="column-credit" v-if="!idActivePointSale || (pointSaleActive && pointSaleActive.payment_method_credit == 1)">Cagnotte</th>
<th class="column-actions">Actions</th> <th class="column-actions">Actions</th>
<th class="column-tiller" v-if="producer && producer.tiller">Tiller</th> <th class="column-tiller" v-if="producer && producer.tiller">Tiller</th>
</tr> </tr>
<span class="glyphicon glyphicon-time" title="Débit automatique de la cagnotte la veille de la distribution" v-if="order.amount != 0 && order.isCreditAutoPayment && (order.amount_paid == 0 || order.amount_paid < order.amount)"></span> <span class="glyphicon glyphicon-time" title="Débit automatique de la cagnotte la veille de la distribution" v-if="order.amount != 0 && order.isCreditAutoPayment && (order.amount_paid == 0 || order.amount_paid < order.amount)"></span>
</template> </template>
</td> </td>
<td class="column-credit" v-if="!idActivePointSale || (pointSaleActive && pointSaleActive.credit == 1)">
<td class="column-credit" v-if="!idActivePointSale || (pointSaleActive && pointSaleActive.payment_method_credit == 1)">
<template v-if="order.isCreditContext"> <template v-if="order.isCreditContext">
<a :href="baseUrl+'/user/credit?id='+order.id_user" target="_blank" :class="order.user.credit >= 0 ? 'positive' : 'negative'"> <a :href="baseUrl+'/user/credit?id='+order.id_user" target="_blank" :class="order.user.credit >= 0 ? 'positive' : 'negative'">
{{ order.user.credit.toFixed(2).replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+'&nbsp;€' }} {{ order.user.credit.toFixed(2).replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+'&nbsp;€' }}

+ 2
- 2
backend/views/distribution/report-bourlingue.php Datei anzeigen

} }
$html .= '</td>' ; $html .= '</td>' ;


if($pointSale->credit) {
if($pointSale->payment_method_credit) {
$credit = '' ; $credit = '' ;


if(isset($order->user) && $order->user->id) { if(isset($order->user) && $order->user->id) {
$strProducts = substr($strProducts, 0, strlen($strProducts) - 6) ; $strProducts = substr($strProducts, 0, strlen($strProducts) - 6) ;
$html .= '<td>'.$strProducts.'</td><td></td><td></td><td></td>' ; $html .= '<td>'.$strProducts.'</td><td></td><td></td><td></td>' ;
if($pointSale->credit) {
if($pointSale->payment_method_credit) {
$html .= '<td></td>' ; $html .= '<td></td>' ;
} }
$html .= '<td><strong>'.Price::format($pointSale->revenues_with_tax) . '</strong></td>'; $html .= '<td><strong>'.Price::format($pointSale->revenues_with_tax) . '</strong></td>';

+ 3
- 3
backend/views/order/report.php Datei anzeigen

if (count($pointSale->orders) && strlen($pointSale->$fieldInfosPointSale)) { if (count($pointSale->orders) && strlen($pointSale->$fieldInfosPointSale)) {
$html .= '<h3>'.$pointSale->name.'</h3>' ; $html .= '<h3>'.$pointSale->name.'</h3>' ;
$colCredit = ($pointSale->credit) ? '<th>Cagnotte</th>' : '' ;
$colCredit = ($pointSale->payment_method_credit) ? '<th>Cagnotte</th>' : '' ;
$html .= '<table class="table table-bordered">' $html .= '<table class="table table-bordered">'
. '<thead>' . '<thead>'
$html .= '<td>'.substr($strProducts, 0, strlen($strProducts) - 2).'</td>'; $html .= '<td>'.substr($strProducts, 0, strlen($strProducts) - 2).'</td>';
$html .= '<td>'.$order->comment.'</td>'; $html .= '<td>'.$order->comment.'</td>';
if($pointSale->credit) {
if($pointSale->payment_method_credit) {
$credit = '' ; $credit = '' ;
if(isset($order->user) && isset($order->user->userProducer)) { if(isset($order->user) && isset($order->user->userProducer)) {
$credit = number_format($order->user->userProducer[0]->credit,2).' €' ; $credit = number_format($order->user->userProducer[0]->credit,2).' €' ;
$strProducts = substr($strProducts, 0, strlen($strProducts) - 2) ; $strProducts = substr($strProducts, 0, strlen($strProducts) - 2) ;
$html .= '<td>'.$strProducts.'</td><td></td>' ; $html .= '<td>'.$strProducts.'</td><td></td>' ;
if($pointSale->credit) {
if($pointSale->payment_method_credit) {
$html .= '<td></td>' ; $html .= '<td></td>' ;
} }
$html .= '<td><strong>'.number_format($pointSale->revenues, 2) . ' €</strong></td>'; $html .= '<td><strong>'.number_format($pointSale->revenues, 2) . ' €</strong></td>';

+ 42
- 10
backend/views/point-sale/_form.php Datei anzeigen



use domain\Distribution\Distribution\DistributionModule; use domain\Distribution\Distribution\DistributionModule;
use domain\Distribution\Distribution\ExportManager; use domain\Distribution\Distribution\ExportManager;
use domain\Feature\Feature\Feature;
use domain\Feature\Feature\FeatureModule;
use domain\Producer\Producer\Producer; use domain\Producer\Producer\Producer;
use domain\Producer\Producer\ProducerModule; use domain\Producer\Producer\ProducerModule;
use lo\widgets\Toggle; use lo\widgets\Toggle;
$producerModule = ProducerModule::getInstance(); $producerModule = ProducerModule::getInstance();
$userModule = UserModule::getInstance(); $userModule = UserModule::getInstance();
$distributionModule = DistributionModule::getInstance(); $distributionModule = DistributionModule::getInstance();
$featureChecker = FeatureModule::getInstance()->getChecker();


?> ?>


<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h3 class="panel-title"> <h3 class="panel-title">
<span class="glyphicon glyphicon-piggy-bank"></span>
Cagnotte
<span class="glyphicon glyphicon-credit-card"></span>
Modes de paiement
</h3> </h3>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div id="credit"> <div id="credit">
<?php <?php

echo $form->field($model, 'payment_method_onsite')->widget(Toggle::class,
[
'options' => [
'data-id' => $model->id,
'data-on' => 'Oui',
'data-off' => 'Non',
],
]
);

$addHintCredit = ''; $addHintCredit = '';
if (!$producerModule->getConfig('credit')): if (!$producerModule->getConfig('credit')):
$addHintCredit = '<br /><strong>Attention, le système de cagnotte est désactivé au niveau des ' . Html::a('paramètres globaux', ['producer/update']) . '.</strong>';
$addHintCredit = 'Attention, le système de cagnotte est désactivé au niveau des ' . Html::a('paramètres globaux', ['producer/update']);
endif; endif;


echo $form->field($model, 'credit')->widget(Toggle::class,
echo '<div class="row">';
echo '<div class="col-md-4">';
echo $form->field($model, 'payment_method_credit')->widget(Toggle::class,
[ [
'options' => [ 'options' => [
'data-id' => $model->id, 'data-id' => $model->id,
'data-off' => 'Non', 'data-off' => 'Non',
], ],
] ]
)->hint('Activez cette option si vous souhaitez que vos clients puissent régler leurs commandes via leur cagnotte pour ce point de vente.'
. $addHintCredit); ?>

<?= $form->field($model, 'credit_functioning')
)->hint($addHintCredit);
echo '</div>';
echo '<div class="col-md-8">';
echo $form->field($model, 'credit_functioning')
->label('Fonctionnement de la cagnotte <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="bottom" title="'.Producer::HINT_CREDIT_FUNCTIONING.'" data-html="true"></span>')
->dropDownList([ ->dropDownList([
'' => 'Paramètres globaux (' . Producer::$creditFunctioningArray[$producerModule->getConfig('credit_functioning')] . ')',
Producer::CREDIT_FUNCTIONING_OPTIONAL => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_OPTIONAL], Producer::CREDIT_FUNCTIONING_OPTIONAL => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_OPTIONAL],
Producer::CREDIT_FUNCTIONING_MANDATORY => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_MANDATORY], Producer::CREDIT_FUNCTIONING_MANDATORY => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_MANDATORY],
Producer::CREDIT_FUNCTIONING_USER => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_USER], Producer::CREDIT_FUNCTIONING_USER => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_USER],
], [])->hint(Producer::HINT_CREDIT_FUNCTIONING); ?>
]);
echo '</div>';
echo '</div>';

if($featureChecker->isEnabled(Feature::ALIAS_ONLINE_PAYMENT)) {
echo $form->field($model, 'payment_method_online')->widget(Toggle::class,
[
'options' => [
'data-id' => $model->id,
'data-on' => 'Oui',
'data-off' => 'Non',
],
]
);
}

?>
</div> </div>
</div> </div>
</div> </div>

+ 13
- 7
backend/views/point-sale/index.php Datei anzeigen

} }
], ],
[ [
'attribute' => 'credit',
'label' => 'Cagnotte',
'label' => 'Modes de paiement',
'format' => 'raw', 'format' => 'raw',
'headerOptions' => ['class' => 'column-hide-on-mobile'], 'headerOptions' => ['class' => 'column-hide-on-mobile'],
'filterOptions' => ['class' => 'column-hide-on-mobile'], 'filterOptions' => ['class' => 'column-hide-on-mobile'],
'contentOptions' => ['class' => 'column-hide-on-mobile'],
'contentOptions' => ['class' => 'column-hide-on-mobile column-payment-method'],
'value' => function ($model) { 'value' => function ($model) {
if ($model->credit && isset(Producer::$creditFunctioningArray[$model->credit_functioning])) {
return '<span class="glyphicon glyphicon-euro"></span> ' . Producer::$creditFunctioningArray[$model->credit_functioning];
$html = '<ul>';
if($model->payment_method_onsite) {
$html .= '<li><i class="bi bi-wallet2"></i> Sur place</li>';
} }

return '';
if ($model->payment_method_credit && isset(Producer::$creditFunctioningArray[$model->credit_functioning])) {
$html .= '<li><i class="bi bi-piggy-bank"></i> Cagnotte ('. strtolower(Producer::$creditFunctioningArray[$model->credit_functioning]).')</li>';
}
if ($model->payment_method_online) {
$html .= '<li><i class="bi bi-credit-card"></i> Paiement en ligne</li>';
}
$html .= '</ul>';
return $html;
} }
], ],
[ [

+ 2
- 9
backend/views/producer/update.php Datei anzeigen

. 'Ils créditent leur compte en vous donnant la somme de leur choix et c\'est ensuite à vous de ' . Html::a('mettre à jour', ['user/index']) . ' leur cagnotte en ligne.<br />' . 'Ils créditent leur compte en vous donnant la somme de leur choix et c\'est ensuite à vous de ' . Html::a('mettre à jour', ['user/index']) . ' leur cagnotte en ligne.<br />'
. 'Ceci fait, les clients paient leur commande directement via leur cagnotte.'); ?> . 'Ceci fait, les clients paient leur commande directement via leur cagnotte.'); ?>


<?= $form->field($model, 'credit_functioning')
->dropDownList([
Producer::CREDIT_FUNCTIONING_OPTIONAL => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_OPTIONAL],
Producer::CREDIT_FUNCTIONING_MANDATORY => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_MANDATORY],
Producer::CREDIT_FUNCTIONING_USER => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_USER],
], [])->hint(Producer::HINT_CREDIT_FUNCTIONING); ?>

<?= $form->field($model, 'use_credit_checked_default') <?= $form->field($model, 'use_credit_checked_default')
->dropDownList(Dropdown::noYesChoices()) ->dropDownList(Dropdown::noYesChoices())
->hint('Utilisation optionnelle de la cagnotte.'); ?> ->hint('Utilisation optionnelle de la cagnotte.'); ?>
->dropDownList(Dropdown::noYesChoices()); ?> ->dropDownList(Dropdown::noYesChoices()); ?>


<?= $form->field($model, 'option_stripe_mode_test')->dropDownList(Dropdown::noYesChoices()); ?> <?= $form->field($model, 'option_stripe_mode_test')->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'option_online_payment_type')
<?php /*$form->field($model, 'option_online_payment_type')
->dropDownList([ ->dropDownList([
'credit' => 'Alimentation de la cagnotte', 'credit' => 'Alimentation de la cagnotte',
'order' => 'Paiement à la commande', 'order' => 'Paiement à la commande',
], []); ?>
], []);*/ ?>
<?= $form->field($model, 'option_stripe_public_key')->textInput(); ?> <?= $form->field($model, 'option_stripe_public_key')->textInput(); ?>
<?= $form->field($model, 'option_stripe_private_key')->textInput(); ?> <?= $form->field($model, 'option_stripe_private_key')->textInput(); ?>
<?= $form->field($model, 'option_stripe_endpoint_secret')->textInput(); ?> <?= $form->field($model, 'option_stripe_endpoint_secret')->textInput(); ?>

+ 120
- 100
backend/web/css/screen.css Datei anzeigen

text-align: center; text-align: center;
} }


/* line 4, ../sass/_adminlte.scss */
/* line 5, ../sass/_adminlte.scss */
body.skin-black .ui-tooltip {
white-space: pre-wrap;
}
/* line 10, ../sass/_adminlte.scss */
body.skin-black .main-header .logo { body.skin-black .main-header .logo {
background-color: white; background-color: white;
font-family: 'highvoltageregular'; font-family: 'highvoltageregular';
font-size: 23px; font-size: 23px;
position: relative; position: relative;
} }
/* line 10, ../sass/_adminlte.scss */
/* line 16, ../sass/_adminlte.scss */
body.skin-black .main-header .logo:hover, body.skin-black .main-header .logo:focus { body.skin-black .main-header .logo:hover, body.skin-black .main-header .logo:focus {
background-color: white; background-color: white;
text-decoration: none; text-decoration: none;
} }
/* line 15, ../sass/_adminlte.scss */
/* line 21, ../sass/_adminlte.scss */
body.skin-black .main-header .logo img { body.skin-black .main-header .logo img {
position: relative; position: relative;
max-width: 300px; max-width: 300px;
max-height: 300px; max-height: 300px;
height: auto; height: auto;
} }
/* line 23, ../sass/_adminlte.scss */
/* line 29, ../sass/_adminlte.scss */
body.skin-black .main-header .logo .logo-lg img { body.skin-black .main-header .logo .logo-lg img {
width: 90px; width: 90px;
top: -2px; top: -2px;
} }
/* line 29, ../sass/_adminlte.scss */
/* line 35, ../sass/_adminlte.scss */
body.skin-black .main-header .logo .logo-mini img { body.skin-black .main-header .logo .logo-mini img {
width: 50px; width: 50px;
} }
/* line 34, ../sass/_adminlte.scss */
/* line 40, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar { body.skin-black .main-header .navbar {
display: block; display: block;
background-color: white; background-color: white;
padding: 0px; padding: 0px;
} }
/* line 39, ../sass/_adminlte.scss */
/* line 45, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel { body.skin-black .main-header .navbar .producer-panel {
position: relative; position: relative;
float: left; float: left;
padding-left: 50px; padding-left: 50px;
margin-left: 7px; margin-left: 7px;
} }
/* line 46, ../sass/_adminlte.scss */
/* line 52, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel.without-logo { body.skin-black .main-header .navbar .producer-panel.without-logo {
padding-left: 10px; padding-left: 10px;
} }
/* line 50, ../sass/_adminlte.scss */
/* line 56, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .logo { body.skin-black .main-header .navbar .producer-panel .logo {
position: absolute; position: absolute;
top: 5px; top: 5px;
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
} }
/* line 62, ../sass/_adminlte.scss */
/* line 68, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .logo .img-logo { body.skin-black .main-header .navbar .producer-panel .logo .img-logo {
position: absolute; position: absolute;
top: 50%; top: 50%;
max-width: 35px; max-width: 35px;
max-height: 35px; max-height: 35px;
} }
/* line 72, ../sass/_adminlte.scss */
/* line 78, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title { body.skin-black .main-header .navbar .producer-panel .title {
position: relative; position: relative;
top: 2px; top: 2px;
text-transform: uppercase; text-transform: uppercase;
} }
/* line 79, ../sass/_adminlte.scss */
/* line 85, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .sidebar-toggle { body.skin-black .main-header .navbar .sidebar-toggle {
color: #333; color: #333;
} }
/* line 83, ../sass/_adminlte.scss */
/* line 89, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support { body.skin-black .main-header .navbar .link-support {
float: left; float: left;
padding: 15px 15px; padding: 15px 15px;
border-right: solid 1px #e0e0e0; border-right: solid 1px #e0e0e0;
color: #333; color: #333;
} }
/* line 89, ../sass/_adminlte.scss */
/* line 95, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support:hover { body.skin-black .main-header .navbar .link-support:hover {
text-decoration: none; text-decoration: none;
color: #F39C12; color: #F39C12;
} }
/* line 95, ../sass/_adminlte.scss */
/* line 101, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .navbar-custom-menu .nav { body.skin-black .main-header .navbar .navbar-custom-menu .nav {
display: block; display: block;
} }
/* line 99, ../sass/_adminlte.scss */
/* line 105, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .navbar-custom-menu .navbar-nav > li > a, body.skin-black .main-header .navbar .navbar-custom-menu .navbar-nav > li > a,
body.skin-black .main-header .navbar .navbar-right > li > a { body.skin-black .main-header .navbar .navbar-right > li > a {
border-left: solid 1px #e0e0e0; border-left: solid 1px #e0e0e0;
color: #333; color: #333;
} }
/* line 105, ../sass/_adminlte.scss */
/* line 111, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav > li > a:hover, body.skin-black .main-header .navbar .nav > li > a:active, body.skin-black .main-header .navbar .nav > li > a:focus, body.skin-black .main-header .navbar .nav > li > a:hover, body.skin-black .main-header .navbar .nav > li > a:active, body.skin-black .main-header .navbar .nav > li > a:focus,
body.skin-black .main-header .navbar .nav .open > a, body.skin-black .main-header .navbar .nav .open > a:hover, body.skin-black .main-header .navbar .nav .open > a:focus, body.skin-black .main-header .navbar .nav .open > a, body.skin-black .main-header .navbar .nav .open > a:hover, body.skin-black .main-header .navbar .nav .open > a:focus,
body.skin-black .main-header .navbar .nav > .active > a { body.skin-black .main-header .navbar .nav > .active > a {
color: #F39C12; color: #F39C12;
} }
/* line 111, ../sass/_adminlte.scss */
/* line 117, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .dropdown-menu { body.skin-black .main-header .navbar .dropdown-menu {
-moz-box-shadow: 0px 0px 4px gray; -moz-box-shadow: 0px 0px 4px gray;
-webkit-box-shadow: 0px 0px 4px gray; -webkit-box-shadow: 0px 0px 4px gray;
box-shadow: 0px 0px 4px gray; box-shadow: 0px 0px 4px gray;
} }
/* line 116, ../sass/_adminlte.scss */
/* line 122, ../sass/_adminlte.scss */
body.skin-black .main-header .logo, body.skin-black .main-header .navbar .sidebar-toggle { body.skin-black .main-header .logo, body.skin-black .main-header .navbar .sidebar-toggle {
border-right: solid 1px #e0e0e0; border-right: solid 1px #e0e0e0;
} }
/* line 120, ../sass/_adminlte.scss */
/* line 126, ../sass/_adminlte.scss */
body.skin-black .main-header .link-control-sidebar { body.skin-black .main-header .link-control-sidebar {
display: none; display: none;
} }
/* line 125, ../sass/_adminlte.scss */
/* line 131, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu { body.skin-black .main-header .notifications-menu ul.menu {
max-height: 300px; max-height: 300px;
} }
/* line 128, ../sass/_adminlte.scss */
/* line 134, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a { body.skin-black .main-header .notifications-menu ul.menu li a {
padding-top: 4px; padding-top: 4px;
padding-bottom: 4px; padding-bottom: 4px;
} }
/* line 132, ../sass/_adminlte.scss */
/* line 138, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a h5 { body.skin-black .main-header .notifications-menu ul.menu li a h5 {
margin-bottom: 2px; margin-bottom: 2px;
} }
/* line 135, ../sass/_adminlte.scss */
/* line 141, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a h5 small { body.skin-black .main-header .notifications-menu ul.menu li a h5 small {
float: right; float: right;
} }
/* line 140, ../sass/_adminlte.scss */
/* line 146, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a p { body.skin-black .main-header .notifications-menu ul.menu li a p {
margin-left: 10px; margin-left: 10px;
} }
/* line 151, ../sass/_adminlte.scss */
/* line 157, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .dropdown-menu { body.skin-black .main-header .navbar .nav li.producer-menu .dropdown-menu {
width: 400px; width: 400px;
} }
/* line 155, ../sass/_adminlte.scss */
/* line 161, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .search-producer { body.skin-black .main-header .navbar .nav li.producer-menu .search-producer {
margin: 10px; margin: 10px;
width: 94%; width: 94%;
} }
/* line 160, ../sass/_adminlte.scss */
/* line 166, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results { body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results {
display: none; display: none;
} }
/* line 163, ../sass/_adminlte.scss */
/* line 169, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results .alert { body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results .alert {
margin-bottom: 0px; margin-bottom: 0px;
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 10px;
padding: 15px 15px 10px 15px; padding: 15px 15px 10px 15px;
} }
/* line 171, ../sass/_adminlte.scss */
/* line 177, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .label { body.skin-black .main-header .navbar .nav li.producer-menu .label {
position: relative; position: relative;
top: -2px; top: -2px;
left: 0px; left: 0px;
} }
/* line 177, ../sass/_adminlte.scss */
/* line 183, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu #link-display-producers-offline { body.skin-black .main-header .navbar .nav li.producer-menu #link-display-producers-offline {
color: #F39C12; color: #F39C12;
} }
/* line 181, ../sass/_adminlte.scss */
/* line 187, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .offline { body.skin-black .main-header .navbar .nav li.producer-menu .offline {
display: none; display: none;
} }
/* line 188, ../sass/_adminlte.scss */
/* line 194, ../sass/_adminlte.scss */
body.skin-black .sidebar .sidebar-menu > li.header { body.skin-black .sidebar .sidebar-menu > li.header {
color: #899397; color: #899397;
} }
/* line 192, ../sass/_adminlte.scss */
/* line 198, ../sass/_adminlte.scss */
body.skin-black .sidebar .label { body.skin-black .sidebar .label {
padding-top: 5px; padding-top: 5px;
position: relative; position: relative;
top: -3px; top: -3px;
} }
/* line 199, ../sass/_adminlte.scss */
/* line 205, ../sass/_adminlte.scss */
body.skin-black .sidebar-menu > li.active > a { body.skin-black .sidebar-menu > li.active > a {
border-color: #F39C12; border-color: #F39C12;
} }
/* line 204, ../sass/_adminlte.scss */
/* line 210, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel { body.skin-black section.sidebar .user-panel {
text-align: center; text-align: center;
} }
/* line 207, ../sass/_adminlte.scss */
/* line 213, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .image { body.skin-black section.sidebar .user-panel .image {
margin-bottom: 3px; margin-bottom: 3px;
} }
/* line 211, ../sass/_adminlte.scss */
/* line 217, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .title { body.skin-black section.sidebar .user-panel .title {
font-weight: bold; font-weight: bold;
color: white; color: white;
} }
/* line 218, ../sass/_adminlte.scss */
/* line 224, ../sass/_adminlte.scss */
body.skin-black .content-wrapper { body.skin-black .content-wrapper {
background-color: #f5f5f5; background-color: #f5f5f5;
} }
/* line 221, ../sass/_adminlte.scss */
/* line 227, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header { body.skin-black .content-wrapper .content-header {
background-color: #F5F5F5; background-color: #F5F5F5;
padding-bottom: 15px; padding-bottom: 15px;
border-bottom: solid 1px #e0e0e0; border-bottom: solid 1px #e0e0e0;
border-top: solid 1px #e0e0e0; border-top: solid 1px #e0e0e0;
} }
/* line 227, ../sass/_adminlte.scss */
/* line 233, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header .btn { body.skin-black .content-wrapper .content-header .btn {
padding: 3px 6px; padding: 3px 6px;
font-size: 10px; font-size: 10px;
font-family: Arial; font-family: Arial;
text-transform: uppercase; text-transform: uppercase;
} }
/* line 234, ../sass/_adminlte.scss */
/* line 240, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header h1 { body.skin-black .content-wrapper .content-header h1 {
font-family: 'myriadpro-light'; font-family: 'myriadpro-light';
font-size: 20px; font-size: 20px;
} }
/* line 240, ../sass/_adminlte.scss */
/* line 246, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-left { body.skin-black .content-wrapper .col-no-padding-left {
padding-left: 0px; padding-left: 0px;
} }
/* line 244, ../sass/_adminlte.scss */
/* line 250, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-right { body.skin-black .content-wrapper .col-no-padding-right {
padding-right: 0px; padding-right: 0px;
} }
/* line 248, ../sass/_adminlte.scss */
/* line 254, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a { body.skin-black .content-wrapper a {
color: #e08e0b; color: #e08e0b;
} }
/* line 252, ../sass/_adminlte.scss */
/* line 257, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a.disable {
pointer-events: none;
cursor: default;
}
/* line 263, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .label { body.skin-black .content-wrapper .label {
padding-top: 4px; padding-top: 4px;
padding-bottom: 1px; padding-bottom: 1px;
} }
/* line 257, ../sass/_adminlte.scss */
/* line 268, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn { body.skin-black .content-wrapper .btn {
color: white; color: white;
} }
/* line 261, ../sass/_adminlte.scss */
/* line 272, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-default { body.skin-black .content-wrapper .btn-default {
color: #333; color: #333;
background-color: white; background-color: white;
} }
/* line 266, ../sass/_adminlte.scss */
/* line 277, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-primary { body.skin-black .content-wrapper .btn-primary {
background-color: #F39C12; background-color: #F39C12;
color: white; color: white;
border-color: #F39C12; border-color: #F39C12;
} }
/* line 273, ../sass/_adminlte.scss */
/* line 284, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .nav.nav-tabs .badge { body.skin-black .content-wrapper .nav.nav-tabs .badge {
margin-left: 4px; margin-left: 4px;
background-color: #e0e0e0; background-color: #e0e0e0;
color: #444; color: #444;
} }
/* line 280, ../sass/_adminlte.scss */
/* line 291, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .tab-content { body.skin-black .content-wrapper .tab-content {
border-left: solid 1px #ddd; border-left: solid 1px #ddd;
border-bottom: solid 1px #ddd; border-bottom: solid 1px #ddd;
padding: 30px 15px 15px 15px; padding: 30px 15px 15px 15px;
background-color: white; background-color: white;
} }
/* line 288, ../sass/_adminlte.scss */
/* line 299, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert { body.skin-black .content-wrapper .alert {
position: relative; position: relative;
} }
/* line 291, ../sass/_adminlte.scss */
/* line 302, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a { body.skin-black .content-wrapper .alert a {
color: white; color: white;
} }
/* line 294, ../sass/_adminlte.scss */
/* line 305, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a.btn { body.skin-black .content-wrapper .alert a.btn {
color: #333; color: #333;
text-decoration: none; text-decoration: none;
} }
/* line 299, ../sass/_adminlte.scss */
/* line 310, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close { body.skin-black .content-wrapper .alert .close {
font-size: 30px; font-size: 30px;
position: absolute; position: absolute;
color: white; color: white;
opacity: 0.6; opacity: 0.6;
} }
/* line 308, ../sass/_adminlte.scss */
/* line 319, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close:hover { body.skin-black .content-wrapper .alert .close:hover {
opacity: 1; opacity: 1;
} }
/* line 313, ../sass/_adminlte.scss */
/* line 324, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert.alert-dark { body.skin-black .content-wrapper .alert.alert-dark {
background-color: #ece4d8; background-color: #ece4d8;
color: black; color: black;
} }
/* line 320, ../sass/_adminlte.scss */
/* line 331, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box h3 { body.skin-black .content-wrapper .small-box h3 {
font-size: 28px; font-size: 28px;
font-family: 'Source Sans Pro',sans-serif; font-family: 'Source Sans Pro',sans-serif;
} }
/* line 325, ../sass/_adminlte.scss */
/* line 336, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .icon { body.skin-black .content-wrapper .small-box .icon {
top: -2px; top: -2px;
} }
/* line 329, ../sass/_adminlte.scss */
/* line 340, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .small-box-footer { body.skin-black .content-wrapper .small-box .small-box-footer {
color: white; color: white;
padding-top: 6px; padding-top: 6px;
padding-bottom: 2px; padding-bottom: 2px;
} }
/* line 338, ../sass/_adminlte.scss */
/* line 349, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout h4 .fa { body.skin-black .content-wrapper .callout h4 .fa {
margin-right: 7px; margin-right: 7px;
} }
/* line 341, ../sass/_adminlte.scss */
/* line 352, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout a { body.skin-black .content-wrapper .callout a {
color: white; color: white;
} }
/* line 344, ../sass/_adminlte.scss */
/* line 355, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout .btn { body.skin-black .content-wrapper .callout .btn {
color: #333; color: #333;
text-decoration: none; text-decoration: none;
} }
/* line 351, ../sass/_adminlte.scss */
/* line 362, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th { body.skin-black .content-wrapper .table th {
font-size: 13px; font-size: 13px;
} }
/* line 354, ../sass/_adminlte.scss */
/* line 365, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th.column-actions, body.skin-black .content-wrapper .table td.column-actions { body.skin-black .content-wrapper .table th.column-actions, body.skin-black .content-wrapper .table td.column-actions {
width: 172px; width: 172px;
text-align: right; text-align: right;
} }
/* line 358, ../sass/_adminlte.scss */
/* line 369, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table td.text-small, body.skin-black .content-wrapper .table th.text-small { body.skin-black .content-wrapper .table td.text-small, body.skin-black .content-wrapper .table th.text-small {
font-size: 12px; font-size: 12px;
} }
/* line 362, ../sass/_adminlte.scss */
/* line 373, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > th, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > td, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > td { body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > th, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > td, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > td {
border: 1px solid #ddd; border: 1px solid #ddd;
} }
/* line 371, ../sass/_adminlte.scss */
/* line 382, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td { body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td {
border-bottom-width: 2px; border-bottom-width: 2px;
} }
/* line 377, ../sass/_adminlte.scss */
/* line 388, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > .active > a, body.skin-black .content-wrapper .pagination > .active > span, body.skin-black .content-wrapper .pagination > .active > a:hover, body.skin-black .content-wrapper .pagination > .active > span:hover, body.skin-black .content-wrapper .pagination > .active > a:focus, body.skin-black .content-wrapper .pagination > .active > span:focus { body.skin-black .content-wrapper .pagination > .active > a, body.skin-black .content-wrapper .pagination > .active > span, body.skin-black .content-wrapper .pagination > .active > a:hover, body.skin-black .content-wrapper .pagination > .active > span:hover, body.skin-black .content-wrapper .pagination > .active > a:focus, body.skin-black .content-wrapper .pagination > .active > span:focus {
background-color: #F39C12; background-color: #F39C12;
border: solid 1px #F39C12; border: solid 1px #F39C12;
color: white; color: white;
} }
/* line 383, ../sass/_adminlte.scss */
/* line 394, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a, body.skin-black .content-wrapper .pagination > li > span { body.skin-black .content-wrapper .pagination > li > a, body.skin-black .content-wrapper .pagination > li > span {
color: #F39C12; color: #F39C12;
} }
/* line 385, ../sass/_adminlte.scss */
/* line 396, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a:hover, body.skin-black .content-wrapper .pagination > li > span:hover { body.skin-black .content-wrapper .pagination > li > a:hover, body.skin-black .content-wrapper .pagination > li > span:hover {
color: #c87f0a; color: #c87f0a;
} }
/* line 390, ../sass/_adminlte.scss */
/* line 401, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .submenu { body.skin-black .content-wrapper .submenu {
margin-bottom: 25px; margin-bottom: 25px;
} }
/* line 394, ../sass/_adminlte.scss */
/* line 405, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions { body.skin-black .content-wrapper .form-actions {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
z-index: 10; z-index: 10;
border-top: solid 1px #e0e0e0; border-top: solid 1px #e0e0e0;
} }
/* line 407, ../sass/_adminlte.scss */
/* line 418, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions a, body.skin-black .content-wrapper .form-actions button { body.skin-black .content-wrapper .form-actions a, body.skin-black .content-wrapper .form-actions button {
margin-left: 10px; margin-left: 10px;
} }
/* line 412, ../sass/_adminlte.scss */
/* line 423, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-buttons { body.skin-black .content-wrapper .form-buttons {
margin-top: 25px; margin-top: 25px;
text-align: right; text-align: right;
} }
/* line 419, ../sass/_adminlte.scss */
/* line 430, ../sass/_adminlte.scss */
body.skin-black .main-footer a { body.skin-black .main-footer a {
color: #F39C12; color: #F39C12;
} }
/* line 424, ../sass/_adminlte.scss */
/* line 435, ../sass/_adminlte.scss */
body.skin-black .gridview-pagesize { body.skin-black .gridview-pagesize {
float: right; float: right;
margin-bottom: 8px; margin-bottom: 8px;
} }
/* line 429, ../sass/_adminlte.scss */
/* line 440, ../sass/_adminlte.scss */
body.skin-black #yii-debug-toolbar { body.skin-black #yii-debug-toolbar {
bottom: 64px; bottom: 64px;
} }


/* line 434, ../sass/_adminlte.scss */
/* line 445, ../sass/_adminlte.scss */
body.login-page { body.login-page {
background: none; background: none;
background-color: white; background-color: white;
} }
/* line 438, ../sass/_adminlte.scss */
/* line 449, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo { body.login-page .login-box .login-logo {
text-align: center; text-align: center;
font-family: 'worksans_bold'; font-family: 'worksans_bold';
} }
/* line 442, ../sass/_adminlte.scss */
/* line 453, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo img { body.login-page .login-box .login-logo img {
width: 150px; width: 150px;
} }
/* line 448, ../sass/_adminlte.scss */
/* line 459, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body, body.login-page .login-box .login-box-body,
body.login-page .login-box .login-box-body input#loginform-email, body.login-page .login-box .login-box-body input#loginform-email,
body.login-page .login-box .login-box-body input#loginform-password, body.login-page .login-box .login-box-body input#loginform-password,
body.login-page .login-box .login-box-body .btn-primary { body.login-page .login-box .login-box-body .btn-primary {
font-size: 14px; font-size: 14px;
} }
/* line 455, ../sass/_adminlte.scss */
/* line 466, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary { body.login-page .login-box .login-box-body .btn-primary {
background-color: #F39C12; background-color: #F39C12;
border-color: #F39C12; border-color: #F39C12;
padding: 5px 10px; padding: 5px 10px;
margin-bottom: 15px; margin-bottom: 15px;
} }
/* line 461, ../sass/_adminlte.scss */
/* line 472, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary:active { body.login-page .login-box .login-box-body .btn-primary:active {
background-color: #f4a62a; background-color: #f4a62a;
border-color: #F39C12; border-color: #F39C12;
} }
/* line 467, ../sass/_adminlte.scss */
/* line 478, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a { body.login-page .login-box .login-box-body a {
color: #F39C12; color: #F39C12;
} }
/* line 469, ../sass/_adminlte.scss */
/* line 480, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a:hover { body.login-page .login-box .login-box-body a:hover {
color: #f4a62a; color: #f4a62a;
} }
/* line 474, ../sass/_adminlte.scss */
/* line 485, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .checkbox label input { body.login-page .login-box .login-box-body .checkbox label input {
position: relative; position: relative;
top: 0px; top: 0px;
.point-sale-index table .td-default { .point-sale-index table .td-default {
text-align: center; text-align: center;
} }
/* line 8, ../sass/point_sale/_index.scss */
.point-sale-index table .column-payment-method ul {
list-style-type: none;
padding: 0px;
padding-left: 5px;
margin: 0px;
}


/* line 6, ../sass/point_sale/_form.scss */
.point-sale-create #credit .field-pointsale-credit label,
.point-sale-update #credit .field-pointsale-credit label {
/* line 8, ../sass/point_sale/_form.scss */
.point-sale-create #credit .field-pointsale-payment_method_onsite label,
.point-sale-create #credit .field-pointsale-payment_method_credit label,
.point-sale-create #credit .field-pointsale-payment_method_online label,
.point-sale-update #credit .field-pointsale-payment_method_onsite label,
.point-sale-update #credit .field-pointsale-payment_method_credit label,
.point-sale-update #credit .field-pointsale-payment_method_online label {
display: block; display: block;
} }
/* line 13, ../sass/point_sale/_form.scss */
/* line 15, ../sass/point_sale/_form.scss */
.point-sale-create #days-distribution .form-group, .point-sale-create #days-distribution .form-group,
.point-sale-update #days-distribution .form-group { .point-sale-update #days-distribution .form-group {
margin-bottom: 0px; margin-bottom: 0px;
} }
/* line 15, ../sass/point_sale/_form.scss */
/* line 17, ../sass/point_sale/_form.scss */
.point-sale-create #days-distribution .form-group label, .point-sale-create #days-distribution .form-group label,
.point-sale-update #days-distribution .form-group label { .point-sale-update #days-distribution .form-group label {
font-weight: normal; font-weight: normal;
} }
/* line 18, ../sass/point_sale/_form.scss */
/* line 20, ../sass/point_sale/_form.scss */
.point-sale-create #days-distribution .form-group.has-success label, .point-sale-create #days-distribution .form-group.has-success label,
.point-sale-update #days-distribution .form-group.has-success label { .point-sale-update #days-distribution .form-group.has-success label {
color: #333; color: #333;
} }
/* line 21, ../sass/point_sale/_form.scss */
/* line 23, ../sass/point_sale/_form.scss */
.point-sale-create #days-distribution .form-group .help-block, .point-sale-create #days-distribution .form-group .help-block,
.point-sale-update #days-distribution .form-group .help-block { .point-sale-update #days-distribution .form-group .help-block {
display: none; display: none;
} }
/* line 26, ../sass/point_sale/_form.scss */
/* line 28, ../sass/point_sale/_form.scss */
.point-sale-create #days-distribution .field-pointsale-infos_monday, .point-sale-create #days-distribution .field-pointsale-infos_monday,
.point-sale-create #days-distribution .field-pointsale-infos_tuesday, .point-sale-create #days-distribution .field-pointsale-infos_tuesday,
.point-sale-create #days-distribution .field-pointsale-infos_wednesday, .point-sale-create #days-distribution .field-pointsale-infos_wednesday,
.point-sale-update #days-distribution .field-pointsale-infos_sunday { .point-sale-update #days-distribution .field-pointsale-infos_sunday {
margin-bottom: 10px; margin-bottom: 10px;
} }
/* line 34, ../sass/point_sale/_form.scss */
/* line 36, ../sass/point_sale/_form.scss */
.point-sale-create #days-distribution .field-pointsale-infos_monday label, .point-sale-create #days-distribution .field-pointsale-infos_monday label,
.point-sale-create #days-distribution .field-pointsale-infos_tuesday label, .point-sale-create #days-distribution .field-pointsale-infos_tuesday label,
.point-sale-create #days-distribution .field-pointsale-infos_wednesday label, .point-sale-create #days-distribution .field-pointsale-infos_wednesday label,
.point-sale-update #days-distribution .field-pointsale-infos_sunday label { .point-sale-update #days-distribution .field-pointsale-infos_sunday label {
display: none; display: none;
} }
/* line 41, ../sass/point_sale/_form.scss */
/* line 43, ../sass/point_sale/_form.scss */
.point-sale-create #delivery-note-generation .form-group, .point-sale-create #delivery-note-generation .form-group,
.point-sale-update #delivery-note-generation .form-group { .point-sale-update #delivery-note-generation .form-group {
margin-bottom: 0px; margin-bottom: 0px;
} }
/* line 44, ../sass/point_sale/_form.scss */
/* line 46, ../sass/point_sale/_form.scss */
.point-sale-create #delivery-note-generation .form-group label, .point-sale-create #delivery-note-generation .form-group label,
.point-sale-update #delivery-note-generation .form-group label { .point-sale-update #delivery-note-generation .form-group label {
margin-bottom: 0px; margin-bottom: 0px;
font-weight: normal; font-weight: normal;
} }
/* line 52, ../sass/point_sale/_form.scss */
/* line 54, ../sass/point_sale/_form.scss */
.point-sale-create #home-delivery .field-pointsale-is_home_delivery label, .point-sale-create #home-delivery .field-pointsale-is_home_delivery label,
.point-sale-update #home-delivery .field-pointsale-is_home_delivery label { .point-sale-update #home-delivery .field-pointsale-is_home_delivery label {
display: block; display: block;
} }
/* line 58, ../sass/point_sale/_form.scss */
/* line 60, ../sass/point_sale/_form.scss */
.point-sale-create #bread-box .field-pointsale-is_bread_box label, .point-sale-create #bread-box .field-pointsale-is_bread_box label,
.point-sale-update #bread-box .field-pointsale-is_bread_box label { .point-sale-update #bread-box .field-pointsale-is_bread_box label {
display: block; display: block;

+ 3
- 1
backend/web/js/backend.js Datei anzeigen

} }


function opendistrib_tooltip() { function opendistrib_tooltip() {
$('[data-toggle="tooltip"]').tooltip({container: 'body'});
$('[data-toggle="tooltip"]').tooltip({
container: 'body'
});
} }


function opendistrib_nl2br(str, is_xhtml) { function opendistrib_nl2br(str, is_xhtml) {

+ 6
- 0
backend/web/sass/_adminlte.scss Datei anzeigen



body.skin-black { body.skin-black {

// Gestion des retours à la ligne (à cause de la difficulté à gérer du HTMl dans les tooltip)
.ui-tooltip {
white-space: pre-wrap;
}

.main-header { .main-header {
.logo { .logo {
background-color: white ; background-color: white ;

+ 3
- 1
backend/web/sass/point_sale/_form.scss Datei anzeigen

.point-sale-create, .point-sale-create,
.point-sale-update { .point-sale-update {
#credit { #credit {
.field-pointsale-credit {
.field-pointsale-payment_method_onsite,
.field-pointsale-payment_method_credit,
.field-pointsale-payment_method_online {
label { label {
display: block; display: block;
} }

+ 8
- 0
backend/web/sass/point_sale/_index.scss Datei anzeigen

.td-default { .td-default {
text-align: center ; text-align: center ;
} }
.column-payment-method {
ul {
list-style-type: none;
padding: 0px;
padding-left: 5px;
margin: 0px;
}
}
} }
} }

+ 1
- 1
common/web/js/common.js Datei anzeigen

var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl); return new bootstrap.Tooltip(tooltipTriggerEl);
})
});


} }
} }

+ 49
- 0
console/commands/InitPointSalePaymentMethodsFromSettingsController.php Datei anzeigen

<?php

namespace console\commands;

use domain\Distribution\Distribution\DistributionModule;
use domain\PointSale\PointSale\PointSaleModule;
use domain\Producer\Producer\Producer;
use domain\Producer\Producer\ProducerModule;
use yii\console\Controller;

class InitPointSalePaymentMethodsFromSettingsController extends Controller
{
// ./yii init-point-sale-payment-methods-from-settings/index
public function actionIndex()
{
$producerModule = ProducerModule::getInstance();
$pointSaleModule = PointSaleModule::getInstance();

$producersArray = $producerModule->findProducers();
foreach($producersArray as $producer) {
echo '> '.$producer->name."\n";
\Yii::$app->logic->setProducerContext($producer);
$pointSaleArray = $pointSaleModule->getRepository()->findPointSales();
$creditFunctioningProducer = $producerModule->getConfig('credit_functioning');
$isOnlinePaymentActiveAndTypeOrder = $producerModule->isOnlinePaymentActiveAndTypeOrder($producer, false);
foreach($pointSaleArray as $pointSale) {
if($pointSale->payment_method_credit && !$pointSale->credit_functioning) {
$pointSale->credit_functioning = $creditFunctioningProducer;
if($pointSale->credit_functioning == Producer::CREDIT_FUNCTIONING_OPTIONAL) {
$pointSale->payment_method_onsite = true;
}
$pointSale->save();
echo 'Point de vente "'.$pointSale->name. '" configuré sur "'.$pointSale->credit_functioning.'"'."\n";
}
$return = $pointSaleModule->getBuilder()->initPaymentMethodsByCreditFunctioning($pointSale);
if($return) {
echo 'Point de vente "'.$pointSale->name. '" : modes de paiements adaptés'."\n";
}
if($isOnlinePaymentActiveAndTypeOrder) {
$pointSale->payment_method_online = true;
$pointSale->save();
echo 'Point de vente "'.$pointSale->name. '" : paiement en ligne activé'."\n";
}
}
}
}
}

?>

+ 30
- 0
console/migrations/m240424_071154_add_columns_point_sale_payment_method.php Datei anzeigen

<?php

use yii\db\Migration;
use yii\db\Schema;

/**
* Class m240424_071154_add_columns_point_sale_payment_method
*/
class m240424_071154_add_columns_point_sale_payment_method extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('point_sale', 'payment_method_onsite', Schema::TYPE_BOOLEAN);
$this->addColumn('point_sale', 'payment_method_online', Schema::TYPE_BOOLEAN);
$this->renameColumn('point_sale', 'credit', 'payment_method_credit');
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropColumn('point_sale', 'payment_method_onsite');
$this->dropColumn('point_sale', 'payment_method_online');
$this->renameColumn('point_sale', 'payment_method_credit', 'credit');
}
}

+ 3
- 3
domain/Distribution/Distribution/Export/DistributionReportPdfGenerator.php Datei anzeigen



$html .= '<h3>'.$pointSale->name.'</h3>' ; $html .= '<h3>'.$pointSale->name.'</h3>' ;
$columnDeliveryNote = ($producer->option_export_display_column_delivery_note) ? '<th>BL</th>' : ''; $columnDeliveryNote = ($producer->option_export_display_column_delivery_note) ? '<th>BL</th>' : '';
$colCredit = ($pointSale->credit) ? '<th>Cagnotte</th>' : '' ;
$colCredit = ($pointSale->payment_method_credit) ? '<th>Cagnotte</th>' : '' ;


$html .= '<table class="">' $html .= '<table class="">'
. '<thead>' . '<thead>'
} }


$html .= '<td>'.$strProducts.'</td><td></td>' ; $html .= '<td>'.$strProducts.'</td><td></td>' ;
if($pointSale->credit) {
if($pointSale->payment_method_credit) {
$html .= '<td></td>' ; $html .= '<td></td>' ;
} }
if($producer->option_export_display_column_delivery_note) { if($producer->option_export_display_column_delivery_note) {


public function columnCredit(Order $order, PointSale $pointSale): string public function columnCredit(Order $order, PointSale $pointSale): string
{ {
if($pointSale->credit) {
if($pointSale->payment_method_credit) {
$credit = '' ; $credit = '' ;


if(isset($order->user) && $order->user->id) { if(isset($order->user) && $order->user->id) {

+ 1
- 1
domain/Order/Order/OrderBuilder.php Datei anzeigen



$order->auto_payment = 0; $order->auto_payment = 0;
if ($subscription->auto_payment == Subscription::AUTO_PAYMENT_DEDUCTED) { if ($subscription->auto_payment == Subscription::AUTO_PAYMENT_DEDUCTED) {
if ($order->id_user && $this->producerSolver->getConfig('credit') && $pointSale->credit) {
if ($order->id_user && $this->producerSolver->getConfig('credit') && $pointSale->payment_method_credit) {
if ($creditFunctioning == Producer::CREDIT_FUNCTIONING_OPTIONAL) { if ($creditFunctioning == Producer::CREDIT_FUNCTIONING_OPTIONAL) {
$order->auto_payment = 0; $order->auto_payment = 0;
} elseif ($creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY) { } elseif ($creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY) {

+ 4
- 4
domain/Order/Order/OrderRepository.php Datei anzeigen

if($pointSale) { if($pointSale) {
$creditFunctioning = $this->producerRepository->getPointSaleCreditFunctioning($pointSale); $creditFunctioning = $this->producerRepository->getPointSaleCreditFunctioning($pointSale);


if ($order->id_user && $this->producerSolver->getConfig('credit') && $pointSale->credit) {
if ($order->id_user && $this->producerSolver->getConfig('credit') && $pointSale->payment_method_credit) {
if($order->mean_payment == MeanPayment::CREDIT || $creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY) { if($order->mean_payment == MeanPayment::CREDIT || $creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY) {
return true; return true;
} }


if($pointSale) { if($pointSale) {
$creditFunctioning = $this->producerRepository->getPointSaleCreditFunctioning($pointSale); $creditFunctioning = $this->producerRepository->getPointSaleCreditFunctioning($pointSale);
if ($order->id_user && $this->producerSolver->getConfig('credit') && $pointSale->credit) {
if ($order->id_user && $this->producerSolver->getConfig('credit') && $pointSale->payment_method_credit) {
if($order->mean_payment == MeanPayment::CREDIT if($order->mean_payment == MeanPayment::CREDIT
|| $creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY || $creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY
|| $creditFunctioning == Producer::CREDIT_FUNCTIONING_OPTIONAL) { || $creditFunctioning == Producer::CREDIT_FUNCTIONING_OPTIONAL) {
public function isOrderCreditFunctioningMandatory(Order $order): bool public function isOrderCreditFunctioningMandatory(Order $order): bool
{ {
$pointSale = $order->pointSale; $pointSale = $order->pointSale;
return $pointSale && $pointSale->credit && $pointSale->credit_functioning == Producer::CREDIT_FUNCTIONING_MANDATORY;
return $pointSale && $pointSale->payment_method_credit && $pointSale->credit_functioning == Producer::CREDIT_FUNCTIONING_MANDATORY;
} }


public function isOrderCreditFunctioningUser(Order $order): bool public function isOrderCreditFunctioningUser(Order $order): bool
$userProducer = $this->userProducerRepository->findOneUserProducer($order->user); $userProducer = $this->userProducerRepository->findOneUserProducer($order->user);


return $pointSale return $pointSale
&& $pointSale->credit
&& $pointSale->payment_method_credit
&& $pointSale->credit_functioning == Producer::CREDIT_FUNCTIONING_USER && $pointSale->credit_functioning == Producer::CREDIT_FUNCTIONING_USER
&& $userProducer && $userProducer
&& $userProducer->credit_active; && $userProducer->credit_active;

+ 5
- 3
domain/PointSale/PointSale/PointSale.php Datei anzeigen

[['address', 'locality', 'infos_monday', 'infos_tuesday', [['address', 'locality', 'infos_monday', 'infos_tuesday',
'infos_wednesday', 'infos_thursday', 'infos_friday', 'infos_wednesday', 'infos_thursday', 'infos_friday',
'infos_saturday', 'infos_sunday', 'credit_functioning', 'bread_box_code'], 'string'], 'infos_saturday', 'infos_sunday', 'credit_functioning', 'bread_box_code'], 'string'],
[['point_production', 'credit', 'delivery_monday', 'delivery_tuesday',
'delivery_wednesday', 'delivery_thursday', 'delivery_friday',
[['point_production', 'payment_method_onsite', 'payment_method_credit', 'payment_method_online',
'delivery_monday', 'delivery_tuesday', 'delivery_wednesday', 'delivery_thursday', 'delivery_friday',
'delivery_saturday', 'delivery_sunday', 'default', 'is_bread_box', 'delivery_saturday', 'delivery_sunday', 'default', 'is_bread_box',
'button_generate_delivery_note_point_sale', 'button_generate_delivery_note_each_user', 'button_generate_delivery_note_point_sale', 'button_generate_delivery_note_each_user',
'exclude_export_shopping_cart_labels', 'is_home_delivery'], 'boolean'], 'exclude_export_shopping_cart_labels', 'is_home_delivery'], 'boolean'],
'infos_saturday' => 'Samedi', 'infos_saturday' => 'Samedi',
'infos_sunday' => 'Dimanche', 'infos_sunday' => 'Dimanche',
'restricted_access' => 'Accès restreint', 'restricted_access' => 'Accès restreint',
'credit' => 'Activer la cagnotte',
'payment_method_onsite' => 'Sur place',
'payment_method_credit' => 'Cagnotte',
'payment_method_online' => 'Paiement en ligne',
'delivery_monday' => 'Lundi', 'delivery_monday' => 'Lundi',
'delivery_tuesday' => 'Mardi', 'delivery_tuesday' => 'Mardi',
'delivery_wednesday' => 'Mercredi', 'delivery_wednesday' => 'Mercredi',

+ 23
- 0
domain/PointSale/PointSale/PointSaleBuilder.php Datei anzeigen

{ {
return $this->userPointSaleBuilder->createUserPointSaleIfNotExist($user, $pointSale); return $this->userPointSaleBuilder->createUserPointSaleIfNotExist($user, $pointSale);
} }

public function initPaymentMethodsByCreditFunctioning(PointSale $pointSale): bool
{
if($pointSale->payment_method_credit) {
if($pointSale->credit_functioning == Producer::CREDIT_FUNCTIONING_OPTIONAL && !$pointSale->payment_method_onsite) {
$pointSale->payment_method_onsite = true;
$this->update($pointSale);
return true;
}
if($pointSale->credit_functioning == Producer::CREDIT_FUNCTIONING_MANDATORY && $pointSale->payment_method_onsite) {
$pointSale->payment_method_onsite = false;
$this->update($pointSale);
return true;
}
if($pointSale->credit_functioning == Producer::CREDIT_FUNCTIONING_MANDATORY && $pointSale->payment_method_online) {
$pointSale->payment_method_online = false;
$this->update($pointSale);
return true;
}
}

return false;
}
} }

+ 2
- 2
domain/PointSale/PointSale/PointSaleSearch.php Datei anzeigen

[['address', 'locality', 'infos_monday', 'infos_tuesday', [['address', 'locality', 'infos_monday', 'infos_tuesday',
'infos_wednesday', 'infos_thursday', 'infos_friday', 'infos_wednesday', 'infos_thursday', 'infos_friday',
'infos_saturday', 'infos_sunday'], 'string'], 'infos_saturday', 'infos_sunday'], 'string'],
[['point_production', 'credit', 'delivery_monday', 'delivery_tuesday',
[['point_production', 'delivery_monday', 'delivery_tuesday',
'delivery_wednesday', 'delivery_thursday', 'delivery_friday', 'delivery_wednesday', 'delivery_thursday', 'delivery_friday',
'delivery_saturday', 'delivery_sunday'], 'boolean'], 'delivery_saturday', 'delivery_sunday'], 'boolean'],
['id_producer', 'integer'], ['id_producer', 'integer'],
$dataProvider = new ActiveDataProvider([ $dataProvider = new ActiveDataProvider([
'query' => $query, 'query' => $query,
'sort' => ['attributes' => ['name', 'locality','point_production','credit']],
'sort' => ['attributes' => ['name', 'locality','point_production']],
'pagination' => [ 'pagination' => [
'pageSize' => 20, 'pageSize' => 20,
], ],

+ 7
- 8
domain/Producer/Producer/Producer.php Datei anzeigen

const CREDIT_FUNCTIONING_OPTIONAL = 'optional'; const CREDIT_FUNCTIONING_OPTIONAL = 'optional';
const CREDIT_FUNCTIONING_USER = 'user'; const CREDIT_FUNCTIONING_USER = 'user';


const HINT_CREDIT_FUNCTIONING = '<ul>'
. '<li>Optionnelle : l\'utilisateur choisit s\'il utilise sa cagnotte ou non. Les commandes peuvent être payées ou impayées.</li>'
. '<li>Obligatoire : toutes les commandes de l\'utilisateur son comptabilisées au niveau de la cagnotte. Toutes les commandes sont payées.</li>'
. '<li>Basée sur l\'utilisateur : cagnotte obligatoire si l\'utilisateur a sa cagnotte activée au niveau de son compte, cagnotte non affichée sinon.</li>'
. '</ul>';
const HINT_CREDIT_FUNCTIONING =
"- Optionnelle : les utilisateurs choisissent s'ils débitent ou non leur cagnotte. L'éventuel restant à payer est à régler sur place. Le paiement sur place est automatiquement proposé en parallèle.\n
- Obligatoire : tous les utilisateurs payent leurs commandes via la cagnotte. Le paiement sur place et le paiement en ligne ne peuvent pas être proposés en parallèle.\n
- Obligatoire par utilisateur : les utilisateurs avec l'option 'Cagnotte obligatoire' activée au niveau de leur profil payent leurs commandes via la cagnotte. Les autres utilisateurs voient simplement une note explicative au sujet de ce mode de paiement.";


public static $creditFunctioningArray = [ public static $creditFunctioningArray = [
self::CREDIT_FUNCTIONING_MANDATORY => 'Obligatoire',
self::CREDIT_FUNCTIONING_OPTIONAL => 'Optionnelle', self::CREDIT_FUNCTIONING_OPTIONAL => 'Optionnelle',
self::CREDIT_FUNCTIONING_USER => 'Basée sur l\'utilisateur',
self::CREDIT_FUNCTIONING_MANDATORY => 'Obligatoire',
self::CREDIT_FUNCTIONING_USER => 'Obligatoire par utilisateur',
]; ];


const BEHAVIOR_DELETE_ORDER_DELETE = 'delete'; const BEHAVIOR_DELETE_ORDER_DELETE = 'delete';
'option_allow_user_gift' => 'Autoriser les utilisateurs à effectuer un don à la plateforme lors de leur commande', 'option_allow_user_gift' => 'Autoriser les utilisateurs à effectuer un don à la plateforme lors de leur commande',
'credit_functioning' => 'Fonctionnement de la cagnotte', 'credit_functioning' => 'Fonctionnement de la cagnotte',
'credit_limit' => 'Cagnotte : montant limite', 'credit_limit' => 'Cagnotte : montant limite',
'use_credit_checked_default' => 'Cocher par défaut l\'option "Utiliser ma cagnotte" lors de la commande de l\'utilisateur',
'use_credit_checked_default' => 'Sélectionner par défaut le mode de paiement "Cagnotte" lors de la commande de l\'utilisateur (en fonctionnement optionnel)',
'background_color_logo' => 'Couleur de fond du logo', 'background_color_logo' => 'Couleur de fond du logo',
'option_behavior_cancel_order' => 'Comportement lors de la suppression d\'une commande', 'option_behavior_cancel_order' => 'Comportement lors de la suppression d\'une commande',
'tiller' => 'Tiller', 'tiller' => 'Tiller',

+ 11
- 5
domain/Producer/Producer/ProducerSolver.php Datei anzeigen

return $this->getPrivateKeyStripe($this->getFilenamePrivateKeyEndpointStripe($producer)); return $this->getPrivateKeyStripe($this->getFilenamePrivateKeyEndpointStripe($producer));
} }


public function isOnlinePaymentActive(Producer $producer): bool
public function isOnlinePaymentActive(Producer $producer, bool $checkModeTest = true): bool
{ {
return $producer->online_payment
|| ($producer->option_stripe_mode_test
$return = $producer->online_payment;

if($checkModeTest) {
$return = $return
|| ($producer->option_stripe_mode_test
&& !\Yii::$app->user->isGuest && !\Yii::$app->user->isGuest
&& \Yii::$app->user->identity->status > 10); && \Yii::$app->user->identity->status > 10);
}

return (bool) $return;
} }


public function isOnlinePaymentActiveAndTypeOrder(Producer $producer): bool
public function isOnlinePaymentActiveAndTypeOrder(Producer $producer, bool $checkModeTest = true): bool
{ {
return $this->isOnlinePaymentActive($producer)
return $this->isOnlinePaymentActive($producer, $checkModeTest)
&& $producer->option_online_payment_type == 'order'; && $producer->option_online_payment_type == 'order';
} }



+ 10
- 7
producer/controllers/OrderController.php Datei anzeigen

return ['status' => 'error', 'errors' => $errors]; return ['status' => 'error', 'errors' => $errors];
} }


if ($producerModule->isOnlinePaymentActiveAndTypeOrder($producer)) {
if ($producerModule->getSolver()->isOnlinePaymentActive($producer) && $posts['payment_method'] == 'online') {
$order = $orderModule->findOneOrderById($order->id); $order = $orderModule->findOneOrderById($order->id);
\Stripe\Stripe::setApiKey( \Stripe\Stripe::setApiKey(
$producerModule->getPrivateKeyApiStripe($producer) $producerModule->getPrivateKeyApiStripe($producer)
$order = $orderModule->findOneOrderById($order->id); $order = $orderModule->findOneOrderById($order->id);
$orderModule->initOrder($order); $orderModule->initOrder($order);


if ($credit && $pointSale->credit &&
(($creditFunctioning == Producer::CREDIT_FUNCTIONING_OPTIONAL && $posts['use_credit']) ||
$creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY ||
($creditFunctioning == Producer::CREDIT_FUNCTIONING_USER && $userProducer->credit_active)
if ($credit
&& $pointSale->payment_method_credit
&& $posts['payment_method'] == 'credit'
&& ($creditFunctioning == Producer::CREDIT_FUNCTIONING_OPTIONAL ||
$creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY ||
($creditFunctioning == Producer::CREDIT_FUNCTIONING_USER && $userProducer->credit_active)
)) { )) {
// à payer // à payer
if ($orderModule->getPaymentStatus($order) == Order::PAYMENT_UNPAID) { if ($orderModule->getPaymentStatus($order) == Order::PAYMENT_UNPAID) {


$dateMini = date('Y-m-d'); $dateMini = date('Y-m-d');
$ordersUserArray = []; $ordersUserArray = [];
if (GlobalParam::getCurrentUserId() && !$producerModule->isOnlinePaymentActiveAndTypeOrder($producer)) {
if (GlobalParam::getCurrentUserId()) {
$conditionsOrdersUser = [ $conditionsOrdersUser = [
'distribution.date > :date'
'distribution.date > :date',
'order.online_payment_url IS NULL'
]; ];
$paramsOrdersUser = [ $paramsOrdersUser = [
':date' => $dateMini ':date' => $dateMini

+ 1
- 1
producer/views/order/_form.php Datei anzeigen

} }
} }
echo '<li class="block point-sale point-sale-' . $pointSale->id . '" data-code="'.$dataCode.'" data-credit="'.(int) $pointSale->credit.'"><div class="contenu">' .
echo '<li class="block point-sale point-sale-' . $pointSale->id . '" data-code="'.$dataCode.'" data-credit="'.(int) $pointSale->payment_method_credit.'"><div class="contenu">' .
'<span style="display:none;" class="id">' . $pointSale->id . '</span>' . '<span style="display:none;" class="id">' . $pointSale->id . '</span>' .
'<div class="name">' .$htmlCode. Html::encode($pointSale->name) . '</div>' . '<div class="name">' .$htmlCode. Html::encode($pointSale->name) . '</div>' .
'<div class="address">à ' . Html::encode($pointSale->locality) . '</div>' . '<div class="address">à ' . Html::encode($pointSale->locality) . '</div>' .

+ 1
- 1
producer/views/order/confirm.php Datei anzeigen

?> ?>


<div id="order-success"> <div id="order-success">
<?php if($producerModule->isOnlinePaymentActiveAndTypeOrder($producer) && $returnPayment != 'success'): ?>
<?php if($producerModule->isOnlinePaymentActive($producer) && $order->online_payment_url && $returnPayment != 'success'): ?>
<div class="alert alert-danger"> <div class="alert alert-danger">
<h5>Le paiement en ligne a échoué.</h5> <h5>Le paiement en ligne a échoué.</h5>
<strong>Attention</strong>, votre commande ne sera effective qu'à la réception du paiement.<br /> <strong>Attention</strong>, votre commande ne sera effective qu'à la réception du paiement.<br />

+ 3
- 5
producer/views/order/history.php Datei anzeigen

'value' => function($order) use ($producer, $producerModule, $orderModule) { 'value' => function($order) use ($producer, $producerModule, $orderModule) {
$html = '' ; $html = '' ;
if($orderModule->getState($order) == Order::STATE_OPEN) { if($orderModule->getState($order) == Order::STATE_OPEN) {
if ($producerModule->isOnlinePaymentActiveAndTypeOrder($producer)) {
$paymentStatus = $orderModule->getPaymentStatus($order);
if($paymentStatus == Order::PAYMENT_UNPAID && $order->online_payment_url) {
$html .= '<a href="'.$order->online_payment_url.'" class="btn btn-default"><i class="bi bi-credit-card"></i> Payer en ligne</a>';
}
$paymentStatus = $orderModule->getPaymentStatus($order);
if ($producerModule->isOnlinePaymentActive($producer) && $paymentStatus == Order::PAYMENT_UNPAID && $order->online_payment_url) {
$html .= '<a href="'.$order->online_payment_url.'" class="btn btn-secondary"><i class="bi bi-credit-card"></i> Payer en ligne</a>';
} }
else { else {
$html .= '<a data-bs-toggle="tooltip" data-bs-placement="top" title="Modifier" href="'.Yii::$app->urlManager->createUrl(['order/order','id'=>$order->id]).'" class="btn btn-secondary"><i class="bi bi-pencil"></i></a> '. $html .= '<a data-bs-toggle="tooltip" data-bs-placement="top" title="Modifier" href="'.Yii::$app->urlManager->createUrl(['order/order','id'=>$order->id]).'" class="btn btn-secondary"><i class="bi bi-pencil"></i></a> '.

+ 82
- 58
producer/views/order/order.php Datei anzeigen

</div> </div>
</div> </div>


<template
v-if="producer.credit == 1 && pointSaleActive.credit == 1 && (pointSaleActive.credit_functioning == 'mandatory' || (pointSaleActive.credit_functioning == 'user' && user.credit_active)) && !checkCreditLimit(order) ">
<div class="alert alert-danger">
Vous devez
<template v-if="producer.online_payment == 1"><a
href="<?= \Yii::$app->urlManager->createUrl(['credit/add']) ?>">recharger
votre cagnotte</a></template>
<template v-else>recharger votre cagnotte</template>
auprès de votre producteur ou supprimer des produits.</span>
Votre producteur n'autorise pas une cagnotte avec un montant inférieur
à <strong>{{ formatPrice(producer.credit_limit) }}</strong>.
</div>
<div class="block-actions">
<a class="btn btn-primary"
href="<?= \Yii::$app->urlManager->createUrl(['site/index']) ?>">Retour à
l'accueil</a>
</div>
</template>
<template v-else>
<div class="card credit" v-if="user && producer.credit == 1 && pointSaleActive.credit == 1 && (pointSaleActive.credit_functioning != 'user' || (pointSaleActive.credit_functioning == 'user' && user.credit_active))">
<div class="card-body">
<h5 class="card-title">
<label for="order-comment">
<i class="bi bi-piggy-bank"></i>
Cagnotte
</label>
</h5>
<div class="card-text">
<input type="checkbox" id="use-credit" v-model="useCredit" disabled="disabled"
v-if="pointSaleActive.credit_functioning == 'mandatory' || (pointSaleActive.credit_functioning == 'user' && user.credit_active)"/>
<input type="checkbox" id="use-credit" v-model="useCredit" v-else/> <label
for="use-credit">Utiliser ma cagnotte ({{ formatPrice(user.credit)
}})</label>

<div class="info" v-if="useCredit">
<template v-if="order == null || order.amount_paid == 0">
<span v-if="checkCreditLimit(order)">{{ priceTotal(true) }} seront débités</span>
<span v-else>
{{ formatPrice(user.credit) }} seront débités. (Limite de cagnotte à {{ formatPrice(producer.credit_limit) }})<br/>
Restera {{ formatPrice(priceTotal() - user.credit) }} à régler.
</span>
</template>
<template
v-else-if="order != null && order.amount_paid > 0 && order.amount_paid < priceTotal()">
<span v-if="checkCreditLimit(order)">{{ formatPrice(priceTotal() - order.amount_paid) }} seront débités</span>
<span v-else>
{{ formatPrice(user.credit) }} seront débités. (Limite de cagnotte à {{ formatPrice(producer.credit_limit) }})<br/>
Restera {{ formatPrice(priceTotal() - order.amount_paid - user.credit) }} à régler.
</span>
<div id="payment-methods" class="card" v-if="pointSaleActive.payment_method_onsite || pointSaleActive.payment_method_credit || pointSaleActive.payment_method_online">
<div class="card-body">
<h5 class="card-title">
<i class="bi bi-currency-euro"></i>
Paiement
</h5>
<div class="card-text">
<div class="row">
<div class="col-md-4" v-if="isPaymentMethodOnsiteActive()">
<input v-model="paymentMethod" type="radio" class="btn-check" name="payment_method" value="onsite" id="payment-method-onsite" autocomplete="off">
<label class="btn btn-outline-success" for="payment-method-onsite">
<i class="bi bi-wallet2"></i>
Sur place
</label>
</div>
<div class="col-md-4" v-if="isPaymentMethodCreditActive()">
<template v-if="(pointSaleActive.credit_functioning == 'mandatory' || (pointSaleActive.credit_functioning == 'user' && user.credit_active)) && !checkCreditLimit(order) ">
<div class="alert alert-danger">
<i class="bi bi-piggy-bank"></i>
Vous devez
<template v-if="producer.online_payment == 1">
<a href="<?= \Yii::$app->urlManager->createUrl(['credit/add']) ?>">
recharger votre cagnotte</a>
</template>
<template v-else>recharger votre cagnotte</template>
auprès de votre producteur ou supprimer des produits.</span>
Votre producteur n'autorise pas une cagnotte avec un montant inférieur
à {{ formatPrice(producer.credit_limit) }}.<br />
Montant de votre cagnotte : {{ formatPrice(user.credit) }}<br />
Montant de votre commande : {{ priceTotal(true) }}
</div>
</template> </template>
<template v-else-if="order != null && order.amount_paid > priceTotal()">
<span>{{ formatPrice(order.amount_paid - priceTotal()) }} seront remboursés</span>
<template v-else>
<input v-model="paymentMethod" type="radio" class="btn-check" name="payment_method" value="credit" id="payment-method-credit" autocomplete="off">
<label class="btn btn-outline-success" for="payment-method-credit">
<i class="bi bi-piggy-bank"></i>
Cagnotte
</label>
<div class="infos">
Montant de ma cagnotte : {{ formatPrice(user.credit) }}<br />
<template v-if="paymentMethod == 'credit'">
<template v-if="order == null || order.amount_paid == 0">
<span v-if="checkCreditLimit(order)">{{ priceTotal(true) }} seront débités</span>
<span v-else>
{{ formatPrice(user.credit) }} seront débités. (Limite de cagnotte à {{ formatPrice(producer.credit_limit) }})<br/>
Restera {{ formatPrice(priceTotal() - user.credit) }} à régler.
</span>
</template>
<template v-else-if="order != null && order.amount_paid > 0 && order.amount_paid < priceTotal()">
<span v-if="checkCreditLimit(order)">{{ formatPrice(priceTotal() - order.amount_paid) }} seront débités</span>
<span v-else>
{{ formatPrice(user.credit) }} seront débités. (Limite de cagnotte à {{ formatPrice(producer.credit_limit) }})<br/>
Restera {{ formatPrice(priceTotal() - order.amount_paid - user.credit) }} à régler.
</span>
</template>
<template v-else-if="order != null && order.amount_paid > priceTotal()">
<span>{{ formatPrice(order.amount_paid - priceTotal()) }} seront remboursés</span>
</template>
</template>
</div>
</template> </template>
</div> </div>
<div class="col-md-4" v-if="isPaymentMethodCreditActiveFunctioningUser(false)">
<input v-model="paymentMethod" type="radio" class="btn-check" name="payment_method" value="credit" id="payment-method-credit" autocomplete="off" disabled>
<label class="btn btn-outline-success" for="payment-method-credit">
<i class="bi bi-piggy-bank"></i>
Cagnotte
</label>
<div class="infos">
Sur demande, vous pouvez mettre en place une cagnotte
chez votre producteur, n'hésitez pas à lui en parler.
</div>
</div>
<div class="col-md-4" v-if="isPaymentMethodOnlineActive()">
<input v-model="paymentMethod" type="radio" class="btn-check" name="payment_method" value="online" id="payment-method-online" autocomplete="off">
<label class="btn btn-outline-success" for="payment-method-online">
<i class="bi bi-credit-card"></i>
Carte bancaire
</label>
<div class="infos">
Paiement sécurisé via la plateforme Stripe.
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>


<?php if ($producerModule->isOnlinePaymentActiveAndTypeOrder($producer)): ?>
<div class="alert alert-info">
<i class="bi bi-credit-card"></i>
La commande est à payer en ligne lors de l'étape suivante.
</div>
<?php endif; ?>

<template>
<div id="signup-guest" class="card" v-if="!user && producer.option_allow_order_guest"> <div id="signup-guest" class="card" v-if="!user && producer.option_allow_order_guest">
<div class="card-title"> <div class="card-title">
<h5>Informations personnelles</h5> <h5>Informations personnelles</h5>

+ 12
- 7
producer/web/css/screen.css Datei anzeigen

.order-create #main #content .order-form #bar-fixed #block-confirm-order, .order-create #main #content .order-form #bar-fixed #block-confirm-order,
.order-update #main #content .order-form #bar-fixed #block-confirm-order { .order-update #main #content .order-form #bar-fixed #block-confirm-order {
text-align: right; text-align: right;
margin-top: 20px;
margin-top: 40px;
} }
/* line 377, ../sass/order/_form.scss */ /* line 377, ../sass/order/_form.scss */
.order-create #main #content .order-form #bar-fixed #block-confirm-order button, .order-create #main #content .order-form #bar-fixed #block-confirm-order button,
/* line 211, ../sass/order/_order.scss */ /* line 211, ../sass/order/_order.scss */
.order-order #main #app-order-order .block-actions { .order-order #main #app-order-order .block-actions {
text-align: center; text-align: center;
margin-top: 20px;
margin-top: 40px;
} }
/* line 218, ../sass/order/_order.scss */ /* line 218, ../sass/order/_order.scss */
.order-order #main #app-order-order table#points-sale td.name .the-name { .order-order #main #app-order-order table#points-sale td.name .the-name {
color: white; color: white;
font-size: 1.2rem; font-size: 1.2rem;
} }
/* line 436, ../sass/order/_order.scss */
/* line 435, ../sass/order/_order.scss */
.order-order #main #app-order-order #payment-methods .infos {
margin-top: 10px;
color: gray;
}
/* line 442, ../sass/order/_order.scss */
.order-order #main #app-order-order #content-step-payment .delivery { .order-order #main #app-order-order #content-step-payment .delivery {
margin-bottom: 20px; margin-bottom: 20px;
} }
/* line 439, ../sass/order/_order.scss */
/* line 445, ../sass/order/_order.scss */
.order-order #main #app-order-order #content-step-payment .delivery .delivery-home { .order-order #main #app-order-order #content-step-payment .delivery .delivery-home {
margin-bottom: 20px; margin-bottom: 20px;
} }
/* line 448, ../sass/order/_order.scss */
/* line 454, ../sass/order/_order.scss */
.order-order #main #app-order-order #content-step-payment .comment { .order-order #main #app-order-order #content-step-payment .comment {
margin-bottom: 20px; margin-bottom: 20px;
} }
/* line 453, ../sass/order/_order.scss */
/* line 459, ../sass/order/_order.scss */
.order-order #main #app-order-order #content-step-payment .credit .info { .order-order #main #app-order-order #content-step-payment .credit .info {
margin-left: 20px; margin-left: 20px;
color: gray; color: gray;
} }


/* line 466, ../sass/order/_order.scss */
/* line 472, ../sass/order/_order.scss */
#main #content .panel h3 { #main #content .panel h3 {
font-family: "worksans_bold"; font-family: "worksans_bold";
margin: 0px; margin: 0px;

+ 51
- 2
producer/web/js/vuejs/order-order.js Datei anzeigen

categoryCurrent: null, categoryCurrent: null,
comment: '', comment: '',
creditCheckbox: false, creditCheckbox: false,
paymentMethod: 'onsite',
useCredit: false, useCredit: false,
errors: [], errors: [],
disableConfirmButton: false, disableConfirmButton: false,
app.user = response.data.user; app.user = response.data.user;
app.useCredit = response.data.producer.use_credit_checked_default; app.useCredit = response.data.producer.use_credit_checked_default;



if (response.data.points_sale) { if (response.data.points_sale) {
app.pointsSale = []; app.pointsSale = [];
var orderPointSale = 0; var orderPointSale = 0;
app.pointSaleActive = app.getPointSale(app.pointSaleActiveId); app.pointSaleActive = app.getPointSale(app.pointSaleActiveId);
} }


if(app.pointSaleActive) {
if(app.pointSaleActive.payment_method_credit
&& (app.pointSaleActive.credit_functioning == 'mandatory'
|| (app.pointSaleActive.credit_functioning == 'user' && app.user.credit_active)
|| (app.pointSaleActive.credit_functioning == 'optional' && response.data.producer.use_credit_checked_default))) {
app.paymentMethod = 'credit';
}
else if(app.pointSaleActive.payment_method_onsite) {
app.paymentMethod = 'onsite';
}
else if(app.pointSaleActive.payment_method_online) {
app.paymentMethod = 'online';
}
}

if(app.isChangeState('point-sale', 'point-sale', 'date')) { if(app.isChangeState('point-sale', 'point-sale', 'date')) {
app.date = null ; app.date = null ;
app.dateFormat = null ; app.dateFormat = null ;
return thePriceWithTax; return thePriceWithTax;
} }
}, },

isPaymentMethodOnsiteActive: function() {
return this.pointSaleActive && this.pointSaleActive.payment_method_onsite
&& !this.isPaymentMethodCreditActiveFunctioningUser(true)
&& !this.isPaymentMethodCreditActiveFunctioningMandatory();
},
isPaymentMethodCreditActive: function() {
return this.isPaymentMethodCreditActiveFunctioningOptional()
|| this.isPaymentMethodCreditActiveFunctioningMandatory()
|| this.isPaymentMethodCreditActiveFunctioningUser(true);
},
isPaymentMethodCreditActiveCheckBase: function() {
return this.producer && this.producer.credit
&& this.pointSaleActive && this.pointSaleActive.payment_method_credit;
},
isPaymentMethodCreditActiveFunctioningUser: function(userCreditActive) {
return this.isPaymentMethodCreditActiveCheckBase()
&& this.pointSaleActive.credit_functioning == 'user'
&& this.user && this.user.credit_active == userCreditActive;
},
isPaymentMethodCreditActiveFunctioningMandatory: function() {
return this.isPaymentMethodCreditActiveCheckBase()
&& this.pointSaleActive.credit_functioning == 'mandatory';
},
isPaymentMethodCreditActiveFunctioningOptional: function() {
return this.isPaymentMethodCreditActiveCheckBase()
&& this.pointSaleActive.credit_functioning == 'optional';
},
isPaymentMethodOnlineActive: function() {
return this.producer && this.producer.online_payment
&& this.pointSaleActive && this.pointSaleActive.payment_method_online
&& !this.isPaymentMethodCreditActiveFunctioningUser(true)
&& !this.isPaymentMethodCreditActiveFunctioningMandatory()
},
confirmClick: function() { confirmClick: function() {


var app = this ; var app = this ;
}, },
code_point_sale: this.pointsSaleCodes[this.pointSaleActive.id], code_point_sale: this.pointsSaleCodes[this.pointSaleActive.id],
products: productsArray, products: productsArray,
use_credit: Number(this.useCredit),
payment_method: this.paymentMethod,
user: user user: user
}).then(function(response) { }).then(function(response) {
if(response.data.status == 'success') { if(response.data.status == 'success') {

+ 1
- 1
producer/web/sass/order/_form.scss Datei anzeigen



#block-confirm-order { #block-confirm-order {
text-align: right ; text-align: right ;
margin-top: 20px ;
margin-top: 40px ;


button { button {
width: 340px ; width: 340px ;

+ 8
- 2
producer/web/sass/order/_order.scss Datei anzeigen

.block-actions { .block-actions {
text-align: center ; text-align: center ;
margin-top: 20px ;
margin-top: 40px ;
} }
table#points-sale { table#points-sale {
} }
} }
} }

#payment-methods {
.infos {
margin-top: 10px;
color: gray;
}
}
#content-step-payment { #content-step-payment {

.delivery { .delivery {
margin-bottom: 20px ; margin-bottom: 20px ;



Laden…
Abbrechen
Speichern