@@ -162,7 +162,7 @@ class CronController extends BackendController | |||
foreach ($arrayOrders as $order) { | |||
$orderManager->initOrder($order); | |||
if ($order->auto_payment && $configCredit) { | |||
if ($orderManager->getOrderAmount($order, Order::AMOUNT_REMAINING) > 0) { | |||
if ($orderManager->isCreditAutoPayment($order) && $orderManager->getOrderAmount($order, Order::AMOUNT_REMAINING) > 0) { | |||
$paymentManager->payOrder($order, MeanPayment::CREDIT, $userManager->findOneUserById(User::ID_USER_SYSTEM), false); | |||
$countOrders++; | |||
} |
@@ -37,7 +37,7 @@ | |||
*/ | |||
return [ | |||
'version' => '23.9.C', | |||
'version' => '23.9.D', | |||
'siteName' => 'Opendistrib', | |||
'adminEmail' => 'contact@opendistrib.net', | |||
'supportEmail' => 'contact@opendistrib.net', |
@@ -554,13 +554,9 @@ class OrderRepository extends AbstractRepository | |||
} | |||
$orderPaymentStatus = $this->orderSolver->getPaymentStatus($order); | |||
if($amountPaid == 0) { | |||
if($amountPaid == 0 && !$isOrderPaid) { | |||
$classLabel = 'default'; | |||
} | |||
elseif($orderPaymentStatus == Order::PAYMENT_UNPAID) { | |||
$classLabel = 'warning'; | |||
$titleLabel = 'Paiement partiel'; | |||
} | |||
elseif($orderPaymentStatus == Order::PAYMENT_SURPLUS) { | |||
$classLabel = 'warning'; | |||
$titleLabel = 'Paiement en surplus'; | |||
@@ -568,7 +564,10 @@ class OrderRepository extends AbstractRepository | |||
elseif($isOrderPaid) { | |||
$classLabel = 'success'; | |||
} | |||
elseif($orderPaymentStatus == Order::PAYMENT_UNPAID) { | |||
$classLabel = 'warning'; | |||
$titleLabel = 'Paiement partiel'; | |||
} | |||
return '<span class="label label-'.$classLabel.'" title="'.$titleLabel.'">'.$label.'</span>'; | |||
} |
@@ -0,0 +1,22 @@ | |||
<?php | |||
require_once dirname(__FILE__).'/_macros.php'; | |||
version( | |||
'25/09/2023', | |||
[ | |||
[ | |||
"[Administration] Documents > Factures : gestion des paiements", | |||
"[Administration] Distributions : nouvelle mise en page de la liste des commandes (paiement, crédit, boutons d'action)" | |||
], | |||
[ | |||
"[Administration] Distributions > Nouvelle commande : correctif bug affichage quantités restantes" | |||
] | |||
], | |||
[ | |||
[], | |||
[] | |||
], | |||
); | |||
?> |