From: Alexander Smirnov Date: Fri, 9 Aug 2024 13:03:42 +0000 (+0300) Subject: [ERP-137] Передвинул место вызова метода расчёта X-Git-Tag: 1.4~36^2~10 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=b82359e82094a10d9b990f35301f65e67287002a;p=erp24_rep%2Fyii-erp24%2F.git [ERP-137] Передвинул место вызова метода расчёта --- diff --git a/erp24/actions/motivation/IndexAction.php b/erp24/actions/motivation/IndexAction.php index 86bb32e7..30c8a223 100644 --- a/erp24/actions/motivation/IndexAction.php +++ b/erp24/actions/motivation/IndexAction.php @@ -90,6 +90,9 @@ class IndexAction extends Action // Подсчитываем стоимость услуг по сборке и по доставке. Позже метод будет перенесён в шедулер MotivationService::calculateServiceAssemblyAndDeliveryCost($model->store_id, $model->year, $model->month); + // Подсчитываем прогноз за месяц + MotivationService::calculateMonthForecast($model->store_id, $model->year, $model->month); + $showTable = false; $motivationData = []; $daysInMonth = null; @@ -166,9 +169,6 @@ class IndexAction extends Action } } - // Подсчитываем прогноз за месяц - MotivationService::calculateMonthForecast($model->store_id, $model->year, $model->month); - return $this->controller->render( 'index', compact('model', 'stores', 'years', 'months', 'motivationDataTableSort', 'showTable',