Browse Source

Version 23.9.D

feature/souke
Guillaume Bourgeois 1 year ago
parent
commit
a4c36c3c1b
4 changed files with 29 additions and 8 deletions
  1. +1
    -1
      backend/controllers/CronController.php
  2. +1
    -1
      common/config/params.php
  3. +5
    -6
      common/logic/Order/Order/Repository/OrderRepository.php
  4. +22
    -0
      common/versions/23.9.D.php

+ 1
- 1
backend/controllers/CronController.php View File

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++;
} }

+ 1
- 1
common/config/params.php View File

*/ */


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',

+ 5
- 6
common/logic/Order/Order/Repository/OrderRepository.php View File

} }


$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>';
} }

+ 22
- 0
common/versions/23.9.D.php View File

<?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"
]
],
[
[],
[]
],
);

?>

Loading…
Cancel
Save