Browse Source

Merge branch 'feature/point_sale_payment_method' into develop

feature/rotating_product
Guillaume Bourgeois 8 months ago
parent
commit
5bdf65d781
32 changed files with 519 additions and 247 deletions
  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 View File

@@ -99,6 +99,7 @@ class PointSaleController extends BackendController
if ($pointSale->load(\Yii::$app->request->post()) && $pointSale->save()) {
$pointSaleModule->updatePointSalePointProduction($pointSale);
$pointSaleModule->processRestrictedAccess($pointSale);
$this->initPaymentMethodsByCreditFunctioning($pointSale);
$distributionModule->addPointSaleIncomingDistributions($pointSale);

return $this->redirect(['index']);
@@ -127,6 +128,7 @@ class PointSaleController extends BackendController

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

$this->setFlash('success', 'Point de vente modifié.');
@@ -139,6 +141,13 @@ class PointSaleController extends BackendController
}
}

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.
*/

+ 3
- 3
backend/views/distribution/index.php View File

@@ -341,7 +341,7 @@ $this->setPageTitle('Distributions') ;
</div>
<div v-if="producer.credit && pointSaleActive">
<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-else-if="pointSaleActive.credit_functioning == 'user'">Basé sur l'utilisateur</template>
<template v-else-if="pointSaleActive.credit_functioning == 'optional'">Optionnel</template>
@@ -362,7 +362,7 @@ $this->setPageTitle('Distributions') ;
<th class="column-point-sale" v-if="idActivePointSale == 0">Point de vente</th>
<th class="column-amount">Montant</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-tiller" v-if="producer && producer.tiller">Tiller</th>
</tr>
@@ -420,7 +420,7 @@ $this->setPageTitle('Distributions') ;
<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>
</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">
<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;€' }}

+ 2
- 2
backend/views/distribution/report-bourlingue.php View File

@@ -142,7 +142,7 @@ foreach ($pointsSaleArray as $pointSale) {
}
$html .= '</td>' ;

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

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

+ 3
- 3
backend/views/order/report.php View File

@@ -52,7 +52,7 @@ foreach ($pointsSaleArray as $pointSale) {
if (count($pointSale->orders) && strlen($pointSale->$fieldInfosPointSale)) {
$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">'
. '<thead>'
@@ -103,7 +103,7 @@ foreach ($pointsSaleArray as $pointSale) {
$html .= '<td>'.substr($strProducts, 0, strlen($strProducts) - 2).'</td>';
$html .= '<td>'.$order->comment.'</td>';
if($pointSale->credit) {
if($pointSale->payment_method_credit) {
$credit = '' ;
if(isset($order->user) && isset($order->user->userProducer)) {
$credit = number_format($order->user->userProducer[0]->credit,2).' €' ;
@@ -147,7 +147,7 @@ foreach ($pointsSaleArray as $pointSale) {
$strProducts = substr($strProducts, 0, strlen($strProducts) - 2) ;
$html .= '<td>'.$strProducts.'</td><td></td>' ;
if($pointSale->credit) {
if($pointSale->payment_method_credit) {
$html .= '<td></td>' ;
}
$html .= '<td><strong>'.number_format($pointSale->revenues, 2) . ' €</strong></td>';

+ 42
- 10
backend/views/point-sale/_form.php View File

@@ -38,6 +38,8 @@

use domain\Distribution\Distribution\DistributionModule;
use domain\Distribution\Distribution\ExportManager;
use domain\Feature\Feature\Feature;
use domain\Feature\Feature\FeatureModule;
use domain\Producer\Producer\Producer;
use domain\Producer\Producer\ProducerModule;
use lo\widgets\Toggle;
@@ -49,6 +51,7 @@ use yii\widgets\ActiveForm;
$producerModule = ProducerModule::getInstance();
$userModule = UserModule::getInstance();
$distributionModule = DistributionModule::getInstance();
$featureChecker = FeatureModule::getInstance()->getChecker();

?>

@@ -78,19 +81,32 @@ $distributionModule = DistributionModule::getInstance();
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<span class="glyphicon glyphicon-piggy-bank"></span>
Cagnotte
<span class="glyphicon glyphicon-credit-card"></span>
Modes de paiement
</h3>
</div>
<div class="panel-body">
<div id="credit">
<?php

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

$addHintCredit = '';
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;

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' => [
'data-id' => $model->id,
@@ -98,16 +114,32 @@ $distributionModule = DistributionModule::getInstance();
'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([
'' => 'Paramètres globaux (' . Producer::$creditFunctioningArray[$producerModule->getConfig('credit_functioning')] . ')',
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); ?>
]);
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>

+ 13
- 7
backend/views/point-sale/index.php View File

@@ -135,18 +135,24 @@ $this->addButton(
}
],
[
'attribute' => 'credit',
'label' => 'Cagnotte',
'label' => 'Modes de paiement',
'format' => 'raw',
'headerOptions' => ['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) {
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 View File

@@ -352,13 +352,6 @@ $this->addBreadcrumb($this->getTitle());
. '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.'); ?>

<?= $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')
->dropDownList(Dropdown::noYesChoices())
->hint('Utilisation optionnelle de la cagnotte.'); ?>
@@ -382,11 +375,11 @@ $this->addBreadcrumb($this->getTitle());
->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([
'credit' => 'Alimentation de la cagnotte',
'order' => 'Paiement à la commande',
], []); ?>
], []);*/ ?>
<?= $form->field($model, 'option_stripe_public_key')->textInput(); ?>
<?= $form->field($model, 'option_stripe_private_key')->textInput(); ?>
<?= $form->field($model, 'option_stripe_endpoint_secret')->textInput(); ?>

+ 120
- 100
backend/web/css/screen.css View File

@@ -1541,41 +1541,45 @@ a.btn.btn-primary .glyphicon-triangle-bottom, button.btn.btn-primary .glyphicon-
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 {
background-color: white;
font-family: 'highvoltageregular';
font-size: 23px;
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 {
background-color: white;
text-decoration: none;
}
/* line 15, ../sass/_adminlte.scss */
/* line 21, ../sass/_adminlte.scss */
body.skin-black .main-header .logo img {
position: relative;
max-width: 300px;
max-height: 300px;
height: auto;
}
/* line 23, ../sass/_adminlte.scss */
/* line 29, ../sass/_adminlte.scss */
body.skin-black .main-header .logo .logo-lg img {
width: 90px;
top: -2px;
}
/* line 29, ../sass/_adminlte.scss */
/* line 35, ../sass/_adminlte.scss */
body.skin-black .main-header .logo .logo-mini img {
width: 50px;
}
/* line 34, ../sass/_adminlte.scss */
/* line 40, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar {
display: block;
background-color: white;
padding: 0px;
}
/* line 39, ../sass/_adminlte.scss */
/* line 45, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel {
position: relative;
float: left;
@@ -1583,11 +1587,11 @@ body.skin-black .main-header .navbar .producer-panel {
padding-left: 50px;
margin-left: 7px;
}
/* line 46, ../sass/_adminlte.scss */
/* line 52, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel.without-logo {
padding-left: 10px;
}
/* line 50, ../sass/_adminlte.scss */
/* line 56, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .logo {
position: absolute;
top: 5px;
@@ -1602,7 +1606,7 @@ body.skin-black .main-header .navbar .producer-panel .logo {
text-align: center;
overflow: hidden;
}
/* line 62, ../sass/_adminlte.scss */
/* line 68, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .logo .img-logo {
position: absolute;
top: 50%;
@@ -1611,202 +1615,207 @@ body.skin-black .main-header .navbar .producer-panel .logo .img-logo {
max-width: 35px;
max-height: 35px;
}
/* line 72, ../sass/_adminlte.scss */
/* line 78, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title {
position: relative;
top: 2px;
text-transform: uppercase;
}
/* line 79, ../sass/_adminlte.scss */
/* line 85, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .sidebar-toggle {
color: #333;
}
/* line 83, ../sass/_adminlte.scss */
/* line 89, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support {
float: left;
padding: 15px 15px;
border-right: solid 1px #e0e0e0;
color: #333;
}
/* line 89, ../sass/_adminlte.scss */
/* line 95, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support:hover {
text-decoration: none;
color: #F39C12;
}
/* line 95, ../sass/_adminlte.scss */
/* line 101, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .navbar-custom-menu .nav {
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-right > li > a {
border-left: solid 1px #e0e0e0;
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 .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 {
color: #F39C12;
}
/* line 111, ../sass/_adminlte.scss */
/* line 117, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .dropdown-menu {
-moz-box-shadow: 0px 0px 4px gray;
-webkit-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 {
border-right: solid 1px #e0e0e0;
}
/* line 120, ../sass/_adminlte.scss */
/* line 126, ../sass/_adminlte.scss */
body.skin-black .main-header .link-control-sidebar {
display: none;
}
/* line 125, ../sass/_adminlte.scss */
/* line 131, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu {
max-height: 300px;
}
/* line 128, ../sass/_adminlte.scss */
/* line 134, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a {
padding-top: 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 {
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 {
float: right;
}
/* line 140, ../sass/_adminlte.scss */
/* line 146, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a p {
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 {
width: 400px;
}
/* line 155, ../sass/_adminlte.scss */
/* line 161, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .search-producer {
margin: 10px;
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 {
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 {
margin-bottom: 0px;
margin-left: 10px;
margin-right: 10px;
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 {
position: relative;
top: -2px;
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 {
color: #F39C12;
}
/* line 181, ../sass/_adminlte.scss */
/* line 187, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .offline {
display: none;
}
/* line 188, ../sass/_adminlte.scss */
/* line 194, ../sass/_adminlte.scss */
body.skin-black .sidebar .sidebar-menu > li.header {
color: #899397;
}
/* line 192, ../sass/_adminlte.scss */
/* line 198, ../sass/_adminlte.scss */
body.skin-black .sidebar .label {
padding-top: 5px;
position: relative;
top: -3px;
}
/* line 199, ../sass/_adminlte.scss */
/* line 205, ../sass/_adminlte.scss */
body.skin-black .sidebar-menu > li.active > a {
border-color: #F39C12;
}
/* line 204, ../sass/_adminlte.scss */
/* line 210, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel {
text-align: center;
}
/* line 207, ../sass/_adminlte.scss */
/* line 213, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .image {
margin-bottom: 3px;
}
/* line 211, ../sass/_adminlte.scss */
/* line 217, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .title {
font-weight: bold;
color: white;
}
/* line 218, ../sass/_adminlte.scss */
/* line 224, ../sass/_adminlte.scss */
body.skin-black .content-wrapper {
background-color: #f5f5f5;
}
/* line 221, ../sass/_adminlte.scss */
/* line 227, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header {
background-color: #F5F5F5;
padding-bottom: 15px;
border-bottom: 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 {
padding: 3px 6px;
font-size: 10px;
font-family: Arial;
text-transform: uppercase;
}
/* line 234, ../sass/_adminlte.scss */
/* line 240, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header h1 {
font-family: 'myriadpro-light';
font-size: 20px;
}
/* line 240, ../sass/_adminlte.scss */
/* line 246, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-left {
padding-left: 0px;
}
/* line 244, ../sass/_adminlte.scss */
/* line 250, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-right {
padding-right: 0px;
}
/* line 248, ../sass/_adminlte.scss */
/* line 254, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a {
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 {
padding-top: 4px;
padding-bottom: 1px;
}
/* line 257, ../sass/_adminlte.scss */
/* line 268, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn {
color: white;
}
/* line 261, ../sass/_adminlte.scss */
/* line 272, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-default {
color: #333;
background-color: white;
}
/* line 266, ../sass/_adminlte.scss */
/* line 277, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-primary {
background-color: #F39C12;
color: white;
border-color: #F39C12;
}
/* line 273, ../sass/_adminlte.scss */
/* line 284, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .nav.nav-tabs .badge {
margin-left: 4px;
background-color: #e0e0e0;
color: #444;
}
/* line 280, ../sass/_adminlte.scss */
/* line 291, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .tab-content {
border-left: solid 1px #ddd;
border-bottom: solid 1px #ddd;
@@ -1814,20 +1823,20 @@ body.skin-black .content-wrapper .tab-content {
padding: 30px 15px 15px 15px;
background-color: white;
}
/* line 288, ../sass/_adminlte.scss */
/* line 299, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert {
position: relative;
}
/* line 291, ../sass/_adminlte.scss */
/* line 302, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a {
color: white;
}
/* line 294, ../sass/_adminlte.scss */
/* line 305, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a.btn {
color: #333;
text-decoration: none;
}
/* line 299, ../sass/_adminlte.scss */
/* line 310, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close {
font-size: 30px;
position: absolute;
@@ -1837,83 +1846,83 @@ body.skin-black .content-wrapper .alert .close {
color: white;
opacity: 0.6;
}
/* line 308, ../sass/_adminlte.scss */
/* line 319, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close:hover {
opacity: 1;
}
/* line 313, ../sass/_adminlte.scss */
/* line 324, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert.alert-dark {
background-color: #ece4d8;
color: black;
}
/* line 320, ../sass/_adminlte.scss */
/* line 331, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box h3 {
font-size: 28px;
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 {
top: -2px;
}
/* line 329, ../sass/_adminlte.scss */
/* line 340, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .small-box-footer {
color: white;
padding-top: 6px;
padding-bottom: 2px;
}
/* line 338, ../sass/_adminlte.scss */
/* line 349, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout h4 .fa {
margin-right: 7px;
}
/* line 341, ../sass/_adminlte.scss */
/* line 352, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout a {
color: white;
}
/* line 344, ../sass/_adminlte.scss */
/* line 355, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout .btn {
color: #333;
text-decoration: none;
}
/* line 351, ../sass/_adminlte.scss */
/* line 362, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th {
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 {
width: 172px;
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 {
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 {
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 {
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 {
background-color: #F39C12;
border: solid 1px #F39C12;
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 {
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 {
color: #c87f0a;
}
/* line 390, ../sass/_adminlte.scss */
/* line 401, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .submenu {
margin-bottom: 25px;
}
/* line 394, ../sass/_adminlte.scss */
/* line 405, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions {
position: fixed;
bottom: 0;
@@ -1927,71 +1936,71 @@ body.skin-black .content-wrapper .form-actions {
z-index: 10;
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 {
margin-left: 10px;
}
/* line 412, ../sass/_adminlte.scss */
/* line 423, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-buttons {
margin-top: 25px;
text-align: right;
}
/* line 419, ../sass/_adminlte.scss */
/* line 430, ../sass/_adminlte.scss */
body.skin-black .main-footer a {
color: #F39C12;
}
/* line 424, ../sass/_adminlte.scss */
/* line 435, ../sass/_adminlte.scss */
body.skin-black .gridview-pagesize {
float: right;
margin-bottom: 8px;
}
/* line 429, ../sass/_adminlte.scss */
/* line 440, ../sass/_adminlte.scss */
body.skin-black #yii-debug-toolbar {
bottom: 64px;
}

/* line 434, ../sass/_adminlte.scss */
/* line 445, ../sass/_adminlte.scss */
body.login-page {
background: none;
background-color: white;
}
/* line 438, ../sass/_adminlte.scss */
/* line 449, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo {
text-align: center;
font-family: 'worksans_bold';
}
/* line 442, ../sass/_adminlte.scss */
/* line 453, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo img {
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 input#loginform-email,
body.login-page .login-box .login-box-body input#loginform-password,
body.login-page .login-box .login-box-body .btn-primary {
font-size: 14px;
}
/* line 455, ../sass/_adminlte.scss */
/* line 466, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary {
background-color: #F39C12;
border-color: #F39C12;
padding: 5px 10px;
margin-bottom: 15px;
}
/* line 461, ../sass/_adminlte.scss */
/* line 472, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary:active {
background-color: #f4a62a;
border-color: #F39C12;
}
/* line 467, ../sass/_adminlte.scss */
/* line 478, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a {
color: #F39C12;
}
/* line 469, ../sass/_adminlte.scss */
/* line 480, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a:hover {
color: #f4a62a;
}
/* line 474, ../sass/_adminlte.scss */
/* line 485, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .checkbox label input {
position: relative;
top: 0px;
@@ -2762,33 +2771,44 @@ termes.
.point-sale-index table .td-default {
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;
}
/* line 13, ../sass/point_sale/_form.scss */
/* line 15, ../sass/point_sale/_form.scss */
.point-sale-create #days-distribution .form-group,
.point-sale-update #days-distribution .form-group {
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-update #days-distribution .form-group label {
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-update #days-distribution .form-group.has-success label {
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-update #days-distribution .form-group .help-block {
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_tuesday,
.point-sale-create #days-distribution .field-pointsale-infos_wednesday,
@@ -2805,7 +2825,7 @@ termes.
.point-sale-update #days-distribution .field-pointsale-infos_sunday {
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_tuesday label,
.point-sale-create #days-distribution .field-pointsale-infos_wednesday label,
@@ -2822,23 +2842,23 @@ termes.
.point-sale-update #days-distribution .field-pointsale-infos_sunday label {
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-update #delivery-note-generation .form-group {
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-update #delivery-note-generation .form-group label {
margin-bottom: 0px;
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-update #home-delivery .field-pointsale-is_home_delivery label {
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-update #bread-box .field-pointsale-is_bread_box label {
display: block;

+ 3
- 1
backend/web/js/backend.js View File

@@ -407,7 +407,9 @@ function opendistrib_product_prices_event_reduction_increase() {
}

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

function opendistrib_nl2br(str, is_xhtml) {

+ 6
- 0
backend/web/sass/_adminlte.scss View File

@@ -1,5 +1,11 @@

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 {
.logo {
background-color: white ;

+ 3
- 1
backend/web/sass/point_sale/_form.scss View File

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

+ 8
- 0
backend/web/sass/point_sale/_index.scss View File

@@ -4,5 +4,13 @@
.td-default {
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 View File

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

}
}

+ 49
- 0
console/commands/InitPointSalePaymentMethodsFromSettingsController.php View File

@@ -0,0 +1,49 @@
<?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 View File

@@ -0,0 +1,30 @@
<?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 View File

@@ -149,7 +149,7 @@ class DistributionReportPdfGenerator extends AbstractGenerator implements Distri

$html .= '<h3>'.$pointSale->name.'</h3>' ;
$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="">'
. '<thead>'
@@ -197,7 +197,7 @@ class DistributionReportPdfGenerator extends AbstractGenerator implements Distri
}

$html .= '<td>'.$strProducts.'</td><td></td>' ;
if($pointSale->credit) {
if($pointSale->payment_method_credit) {
$html .= '<td></td>' ;
}
if($producer->option_export_display_column_delivery_note) {
@@ -282,7 +282,7 @@ class DistributionReportPdfGenerator extends AbstractGenerator implements Distri

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

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

+ 1
- 1
domain/Order/Order/OrderBuilder.php View File

@@ -176,7 +176,7 @@ class OrderBuilder extends AbstractBuilder

$order->auto_payment = 0;
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) {
$order->auto_payment = 0;
} elseif ($creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY) {

+ 4
- 4
domain/Order/Order/OrderRepository.php View File

@@ -357,7 +357,7 @@ class OrderRepository extends AbstractRepository
if($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) {
return true;
}
@@ -387,7 +387,7 @@ class OrderRepository extends AbstractRepository

if($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
|| $creditFunctioning == Producer::CREDIT_FUNCTIONING_OPTIONAL) {
@@ -665,7 +665,7 @@ class OrderRepository extends AbstractRepository
public function isOrderCreditFunctioningMandatory(Order $order): bool
{
$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
@@ -678,7 +678,7 @@ class OrderRepository extends AbstractRepository
$userProducer = $this->userProducerRepository->findOneUserProducer($order->user);

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

+ 5
- 3
domain/PointSale/PointSale/PointSale.php View File

@@ -77,8 +77,8 @@ class PointSale extends ActiveRecordCommon
[['address', 'locality', 'infos_monday', 'infos_tuesday',
'infos_wednesday', 'infos_thursday', 'infos_friday',
'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',
'button_generate_delivery_note_point_sale', 'button_generate_delivery_note_each_user',
'exclude_export_shopping_cart_labels', 'is_home_delivery'], 'boolean'],
@@ -109,7 +109,9 @@ class PointSale extends ActiveRecordCommon
'infos_saturday' => 'Samedi',
'infos_sunday' => 'Dimanche',
'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_tuesday' => 'Mardi',
'delivery_wednesday' => 'Mercredi',

+ 23
- 0
domain/PointSale/PointSale/PointSaleBuilder.php View File

@@ -89,4 +89,27 @@ class PointSaleBuilder extends AbstractBuilder
{
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 View File

@@ -54,7 +54,7 @@ class PointSaleSearch extends PointSale
[['address', 'locality', 'infos_monday', 'infos_tuesday',
'infos_wednesday', 'infos_thursday', 'infos_friday',
'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_saturday', 'delivery_sunday'], 'boolean'],
['id_producer', 'integer'],
@@ -78,7 +78,7 @@ class PointSaleSearch extends PointSale
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort' => ['attributes' => ['name', 'locality','point_production','credit']],
'sort' => ['attributes' => ['name', 'locality','point_production']],
'pagination' => [
'pageSize' => 20,
],

+ 7
- 8
domain/Producer/Producer/Producer.php View File

@@ -56,16 +56,15 @@ class Producer extends ActiveRecordCommon
const CREDIT_FUNCTIONING_OPTIONAL = 'optional';
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 = [
self::CREDIT_FUNCTIONING_MANDATORY => 'Obligatoire',
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';
@@ -440,7 +439,7 @@ class Producer extends ActiveRecordCommon
'option_allow_user_gift' => 'Autoriser les utilisateurs à effectuer un don à la plateforme lors de leur commande',
'credit_functioning' => 'Fonctionnement de la cagnotte',
'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',
'option_behavior_cancel_order' => 'Comportement lors de la suppression d\'une commande',
'tiller' => 'Tiller',

+ 11
- 5
domain/Producer/Producer/ProducerSolver.php View File

@@ -212,17 +212,23 @@ class ProducerSolver extends AbstractService implements SolverInterface
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->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';
}


+ 10
- 7
producer/controllers/OrderController.php View File

@@ -239,7 +239,7 @@ class OrderController extends ProducerBaseController
return ['status' => 'error', 'errors' => $errors];
}

if ($producerModule->isOnlinePaymentActiveAndTypeOrder($producer)) {
if ($producerModule->getSolver()->isOnlinePaymentActive($producer) && $posts['payment_method'] == 'online') {
$order = $orderModule->findOneOrderById($order->id);
\Stripe\Stripe::setApiKey(
$producerModule->getPrivateKeyApiStripe($producer)
@@ -457,10 +457,12 @@ class OrderController extends ProducerBaseController
$order = $orderModule->findOneOrderById($order->id);
$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
if ($orderModule->getPaymentStatus($order) == Order::PAYMENT_UNPAID) {
@@ -709,9 +711,10 @@ class OrderController extends ProducerBaseController

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

+ 1
- 1
producer/views/order/_form.php View File

@@ -153,7 +153,7 @@ $orderModule = OrderModule::getInstance();
}
}
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>' .
'<div class="name">' .$htmlCode. Html::encode($pointSale->name) . '</div>' .
'<div class="address">à ' . Html::encode($pointSale->locality) . '</div>' .

+ 1
- 1
producer/views/order/confirm.php View File

@@ -53,7 +53,7 @@ $producer = GlobalParam::getCurrentProducer() ;
?>

<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">
<h5>Le paiement en ligne a échoué.</h5>
<strong>Attention</strong>, votre commande ne sera effective qu'à la réception du paiement.<br />

+ 3
- 5
producer/views/order/history.php View File

@@ -145,11 +145,9 @@ $this->setTitle('Mes commandes') ;
'value' => function($order) use ($producer, $producerModule, $orderModule) {
$html = '' ;
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 {
$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 View File

@@ -479,71 +479,95 @@ $this->setTitle('Commander');
</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 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>
</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>

<?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 class="card-title">
<h5>Informations personnelles</h5>

+ 12
- 7
producer/web/css/screen.css View File

@@ -1046,7 +1046,7 @@ termes.
.order-create #main #content .order-form #bar-fixed #block-confirm-order,
.order-update #main #content .order-form #bar-fixed #block-confirm-order {
text-align: right;
margin-top: 20px;
margin-top: 40px;
}
/* line 377, ../sass/order/_form.scss */
.order-create #main #content .order-form #bar-fixed #block-confirm-order button,
@@ -1403,7 +1403,7 @@ termes.
/* line 211, ../sass/order/_order.scss */
.order-order #main #app-order-order .block-actions {
text-align: center;
margin-top: 20px;
margin-top: 40px;
}
/* line 218, ../sass/order/_order.scss */
.order-order #main #app-order-order table#points-sale td.name .the-name {
@@ -1599,25 +1599,30 @@ termes.
color: white;
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 {
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 {
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 {
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 {
margin-left: 20px;
color: gray;
}

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

+ 51
- 2
producer/web/js/vuejs/order-order.js View File

@@ -23,6 +23,7 @@ var app = new Vue({
categoryCurrent: null,
comment: '',
creditCheckbox: false,
paymentMethod: 'onsite',
useCredit: false,
errors: [],
disableConfirmButton: false,
@@ -209,6 +210,7 @@ var app = new Vue({
app.user = response.data.user;
app.useCredit = response.data.producer.use_credit_checked_default;


if (response.data.points_sale) {
app.pointsSale = [];
var orderPointSale = 0;
@@ -227,6 +229,21 @@ var app = new Vue({
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')) {
app.date = null ;
app.dateFormat = null ;
@@ -529,7 +546,39 @@ var app = new Vue({
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() {

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

+ 1
- 1
producer/web/sass/order/_form.scss View File

@@ -372,7 +372,7 @@ termes.

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

button {
width: 340px ;

+ 8
- 2
producer/web/sass/order/_order.scss View File

@@ -210,7 +210,7 @@
.block-actions {
text-align: center ;
margin-top: 20px ;
margin-top: 40px ;
}
table#points-sale {
@@ -430,9 +430,15 @@
}
}
}

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

.delivery {
margin-bottom: 20px ;


Loading…
Cancel
Save