Browse Source

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

refactoring
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

'conditions' => 'date_delete IS NULL' 'conditions' => 'date_delete IS NULL'
]) ; ]) ;


$configCredit = Producer::getConfig('credit', $producer['id']) ;
foreach($arrayOrders as $order) { 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) { if ($order->getAmount(Order::AMOUNT_REMAINING) > 0) {
$order->saveCreditHistory( $order->saveCreditHistory(

Loading…
Cancel
Save