Browse Source

[Administration] Correctif cron

feature/souke
Guillaume Bourgeois 1 year ago
parent
commit
e236d4b56f
3 changed files with 4 additions and 7 deletions
  1. +2
    -5
      backend/controllers/CronController.php
  2. +1
    -1
      common/logic/ProducerContextTrait.php
  3. +1
    -1
      common/logic/User/User/Model/User.php

+ 2
- 5
backend/controllers/CronController.php View File



foreach ($arrayProducers as $producer) { 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; $countOrders = 0;
$mailOrdersSend = false; $mailOrdersSend = false;


if ($arrayOrders && is_array($arrayOrders)) { if ($arrayOrders && is_array($arrayOrders)) {
foreach ($arrayOrders as $order) { foreach ($arrayOrders as $order) {
$orderManager->initOrder($order);
if ($order->auto_payment && $configCredit) { if ($order->auto_payment && $configCredit) {
if ($orderManager->getOrderAmount($order, Order::AMOUNT_REMAINING) > 0) { if ($orderManager->getOrderAmount($order, Order::AMOUNT_REMAINING) > 0) {
$creditHistoryManager->createCreditHistory( $creditHistoryManager->createCreditHistory(

+ 1
- 1
common/logic/ProducerContextTrait.php View File

public function getProducerContext(): Producer public function getProducerContext(): Producer
{ {
if(is_null($this->producerContext)) { if(is_null($this->producerContext)) {
throw new ErrorException("Le contexte producteur n''est pas défini.");
throw new ErrorException("Le contexte producteur n'est pas défini.");
} }


return $this->producerContext; return $this->producerContext;

+ 1
- 1
common/logic/User/User/Model/User.php View File

const STATUS_PRODUCER = 11; const STATUS_PRODUCER = 11;
const STATUS_ADMIN = 13; const STATUS_ADMIN = 13;


const ID_USER_SYSTEM = 0;
const ID_USER_SYSTEM = 2;


var $password_old; var $password_old;
var $password_new; var $password_new;

Loading…
Cancel
Save