|
|
@@ -176,11 +176,7 @@ class CronController extends BackendController |
|
|
|
|
|
|
|
foreach ($arrayProducers as $producer) { |
|
|
|
|
|
|
|
$producerManager->setProducerContext($producer); |
|
|
|
$distributionManager->setProducerContext($producer); |
|
|
|
$orderManager->setProducerContext($producer); |
|
|
|
$creditHistoryManager->setProducerContext($producer); |
|
|
|
$userManager->setProducerContext($producer); |
|
|
|
$this->getLogic()->setProducerContext($producer); |
|
|
|
|
|
|
|
$countOrders = 0; |
|
|
|
$mailOrdersSend = false; |
|
|
@@ -203,6 +199,7 @@ class CronController extends BackendController |
|
|
|
|
|
|
|
if ($arrayOrders && is_array($arrayOrders)) { |
|
|
|
foreach ($arrayOrders as $order) { |
|
|
|
$orderManager->initOrder($order); |
|
|
|
if ($order->auto_payment && $configCredit) { |
|
|
|
if ($orderManager->getOrderAmount($order, Order::AMOUNT_REMAINING) > 0) { |
|
|
|
$creditHistoryManager->createCreditHistory( |