From: fomichev Date: Wed, 4 Jun 2025 09:40:32 +0000 (+0300) Subject: Правки методов X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=0c4a0415b50142bdfe6ba72e4f634d1f9bb41ab7;p=erp24_rep%2Fyii-erp24%2F.git Правки методов --- diff --git a/erp24/controllers/CategoryPlanController.php b/erp24/controllers/CategoryPlanController.php index 0947df5f..5a1f751e 100644 --- a/erp24/controllers/CategoryPlanController.php +++ b/erp24/controllers/CategoryPlanController.php @@ -355,7 +355,7 @@ class CategoryPlanController extends Controller { $result['without_history'] ); - $productSalesShare = StorePlanService::calculateProductSalesShare( + $productSalesShare = StorePlanService::calculateProductSalesShareProductsWithHistory( $storeId, $selectedMonth, $result['with_history'] diff --git a/erp24/services/StorePlanService.php b/erp24/services/StorePlanService.php index 20d954b5..5b6141b3 100755 --- a/erp24/services/StorePlanService.php +++ b/erp24/services/StorePlanService.php @@ -626,7 +626,7 @@ class StorePlanService ->andWhere([ 'or', ['>=', 'date_to', $weekStart->format('Y-m-d')], - ['date_to' => '2100-01-01 03:00:00+03'] + ['date_to' => '2100-01-01 00:00:00+03'] ]) ->all(); @@ -981,7 +981,7 @@ class StorePlanService * 'monthlyPrice' => [ 'YYYY-MM' => цена ] * ] */ - public static function calculateProductSalesShare($storeId, $selectedMonth, $productsWithHistory) + public static function calculateProductSalesShareProductsWithHistory($storeId, $selectedMonth, $productsWithHistory) { $targetDate = strtotime(date('Y') . "-$selectedMonth-01");