Browse Source

Product : correctif initialisation taxRate

feature/souke
Guillaume Bourgeois 11 months ago
parent
commit
45c020be6b
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      common/helpers/GlobalParam.php

+ 4
- 0
common/helpers/GlobalParam.php View File



public static function getCurrentProducer() public static function getCurrentProducer()
{ {
if(\Yii::$app->controller->module->id == 'app-console') {
return \Yii::$app->logic->getProducerContext();
}

$producerModule = ProducerModule::getInstance(); $producerModule = ProducerModule::getInstance();
if(!\Yii::$app->parameterBag->has('producer') || !\Yii::$app->parameterBag->get('producer')) { if(!\Yii::$app->parameterBag->has('producer') || !\Yii::$app->parameterBag->get('producer')) {
\Yii::$app->parameterBag->set('producer', $producerModule->findOneProducerById(self::getCurrentProducerId())); \Yii::$app->parameterBag->set('producer', $producerModule->findOneProducerById(self::getCurrentProducerId()));

Loading…
Cancel
Save