@@ -344,6 +344,7 @@ class DistributionController extends BackendController | |||
]) | |||
->where([ | |||
'id_producer' => $producer->id, | |||
'status' => 1 | |||
]) | |||
->asArray() | |||
->all(); |
@@ -37,7 +37,7 @@ | |||
*/ | |||
return [ | |||
'version' => '23.4.A', | |||
'version' => '23.6.A', | |||
'adminEmail' => 'contact@opendistrib.net', | |||
'supportEmail' => 'contact@opendistrib.net', | |||
'user.passwordResetTokenExpire' => 3600, |
@@ -2,6 +2,7 @@ | |||
namespace common\logic\Order\Order\Repository; | |||
use common\helpers\MeanPayment; | |||
use common\logic\AbstractRepository; | |||
use common\logic\Distribution\Distribution\Model\Distribution; | |||
use common\logic\Distribution\ProductDistribution\Repository\ProductDistributionRepository; | |||
@@ -313,11 +314,13 @@ class OrderRepository extends AbstractRepository | |||
$creditFunctioning = $this->producerRepository->getPointSaleCreditFunctioning($pointSale); | |||
if ($order->id_user && $this->producerRepository->getConfig('credit') && $pointSale->credit) { | |||
if ($creditFunctioning == Producer::CREDIT_FUNCTIONING_OPTIONAL) { | |||
return 0; | |||
} elseif ($creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY) { | |||
if($order->mean_payment == MeanPayment::CREDIT || $creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY) { | |||
return 1; | |||
} elseif ($creditFunctioning == Producer::CREDIT_FUNCTIONING_USER) { | |||
} | |||
elseif ($creditFunctioning == Producer::CREDIT_FUNCTIONING_OPTIONAL) { | |||
return 0; | |||
} | |||
elseif ($creditFunctioning == Producer::CREDIT_FUNCTIONING_USER) { | |||
$userProducer = UserProducer::searchOne([ | |||
'id_user' => $order->id_user, | |||
'id_producer' => $distribution->id_producer |
@@ -0,0 +1,13 @@ | |||
<h4>Date de sortie</h4> | |||
<ul> | |||
<li>12/06/2023</li> | |||
</ul> | |||
<h4>Maintenance</h4> | |||
<ul> | |||
<li>[Administration] Logiciel de caisse Tiller : synchroniser automatiquement les commandes payées avec le crédit</li> | |||
<li>[Administration] Correction affichage des points de vente supprimés</li> | |||
<li>[Administration] Distribution > ajout commande : gestion de 5 chiffres après la virgule pour les prix HT</li> | |||
<li>[Espace producteur] Produits : mise en évidence des noms de produit</li> | |||
<li>[Site] Profil utilisateur : permettre édition adresse email</li> | |||
</ul> |
@@ -558,12 +558,13 @@ class OrderController extends ProducerBaseController | |||
{ | |||
$orderManager = $this->getOrderManager(); | |||
$order = $this->getOrderManager()->findOneOrderById($id); | |||
$orderManager->initOrder($order); | |||
if (!$order) { | |||
throw new \yii\web\NotFoundHttpException('Commande introuvable'); | |||
} | |||
$orderManager->initOrder($order); | |||
if (!$orderManager->isOrderStateOpen($order)) { | |||
throw new UserException('Vous ne pouvez plus annuler cette commande.'); | |||
} |
@@ -98,7 +98,10 @@ $this->setTitle('Confirmation de commande') ; | |||
<?php endif; ?> | |||
</li> | |||
<?php | |||
$strInfos = ''; | |||
if($order->pointSale) { | |||
$strInfos = $pointSaleManager->getStrInfos($order->pointSale, strtolower(date('l',strtotime($order->distribution->date)))); | |||
} | |||
?> | |||
<?php if(strlen($strInfos) > 0): ?> | |||
<li><span class="glyphicon glyphicon-info-sign"></span> |