Browse Source

Les commandes annulées configurées avec paiement automatique ne doivent pas être débitées.

dev
Guillaume Bourgeois 6 years ago
parent
commit
640d37a51b
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      backend/controllers/CronController.php

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

@@ -246,8 +246,10 @@ class CronController extends BackendController
'conditions' => 'date_delete IS NULL'
]) ;

$configCredit = Producer::getConfig('credit', $producer['id']) ;
foreach($arrayOrders as $order) {
if($order->payment_auto && Producer::getConfig('credit', $order->distribution->id_producer)) {
if($order->payment_auto && $configCredit) {
if ($order->getAmount(Order::AMOUNT_REMAINING) > 0) {
$order->saveCreditHistory(

Loading…
Cancel
Save