foreach ($arrayOrders as $order) { | foreach ($arrayOrders as $order) { | ||||
$orderManager->initOrder($order); | $orderManager->initOrder($order); | ||||
if ($order->auto_payment && $configCredit) { | 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); | $paymentManager->payOrder($order, MeanPayment::CREDIT, $userManager->findOneUserById(User::ID_USER_SYSTEM), false); | ||||
$countOrders++; | $countOrders++; | ||||
} | } |
*/ | */ | ||||
return [ | return [ | ||||
'version' => '23.9.C', | |||||
'version' => '23.9.D', | |||||
'siteName' => 'Opendistrib', | 'siteName' => 'Opendistrib', | ||||
'adminEmail' => 'contact@opendistrib.net', | 'adminEmail' => 'contact@opendistrib.net', | ||||
'supportEmail' => 'contact@opendistrib.net', | 'supportEmail' => 'contact@opendistrib.net', |
} | } | ||||
$orderPaymentStatus = $this->orderSolver->getPaymentStatus($order); | $orderPaymentStatus = $this->orderSolver->getPaymentStatus($order); | ||||
if($amountPaid == 0) { | |||||
if($amountPaid == 0 && !$isOrderPaid) { | |||||
$classLabel = 'default'; | $classLabel = 'default'; | ||||
} | } | ||||
elseif($orderPaymentStatus == Order::PAYMENT_UNPAID) { | |||||
$classLabel = 'warning'; | |||||
$titleLabel = 'Paiement partiel'; | |||||
} | |||||
elseif($orderPaymentStatus == Order::PAYMENT_SURPLUS) { | elseif($orderPaymentStatus == Order::PAYMENT_SURPLUS) { | ||||
$classLabel = 'warning'; | $classLabel = 'warning'; | ||||
$titleLabel = 'Paiement en surplus'; | $titleLabel = 'Paiement en surplus'; | ||||
elseif($isOrderPaid) { | elseif($isOrderPaid) { | ||||
$classLabel = 'success'; | $classLabel = 'success'; | ||||
} | } | ||||
elseif($orderPaymentStatus == Order::PAYMENT_UNPAID) { | |||||
$classLabel = 'warning'; | |||||
$titleLabel = 'Paiement partiel'; | |||||
} | |||||
return '<span class="label label-'.$classLabel.'" title="'.$titleLabel.'">'.$label.'</span>'; | return '<span class="label label-'.$classLabel.'" title="'.$titleLabel.'">'.$label.'</span>'; | ||||
} | } |
<?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" | |||||
] | |||||
], | |||||
[ | |||||
[], | |||||
[] | |||||
], | |||||
); | |||||
?> |