From 44d63c9a4304a9e22ea3e7f37b973b601fedb37d Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Wed, 4 Sep 2024 19:44:57 +0300 Subject: [PATCH] =?utf8?q?[ERP-140]=20=D0=9E=D0=BA=D1=80=D1=83=D0=B3=D0=BB?= =?utf8?q?=D1=8F=D0=B5=D0=BC=20=D0=B4=D0=B0=D1=82=D1=8B=20=D0=BF=D0=BE?= =?utf8?q?=D1=81=D0=BB=D0=B5=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=B0?= =?utf8?q?=20=D0=BA=20sales?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/services/MotivationService.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/erp24/services/MotivationService.php b/erp24/services/MotivationService.php index 6789d8e5..4fe20963 100644 --- a/erp24/services/MotivationService.php +++ b/erp24/services/MotivationService.php @@ -1769,11 +1769,7 @@ class MotivationService */ public static function getSelfCostSumByStore($startDate, $endDate, $storeId) { - $storeId = (int)$storeId; - $startDate = date('Y-m-d', strtotime($startDate)); - $endDate = date('Y-m-d', strtotime($endDate)); - $salesRecords = Sales::find() ->select(['id', 'date']) @@ -1783,6 +1779,8 @@ class MotivationService ->asArray() ->all(); + $startDate = date('Y-m-d', strtotime($startDate)); + $endDate = date('Y-m-d', strtotime($endDate)); $endDatePlusThreeWeeks = date('Y-m-d', strtotime($endDate . ' +3 weeks')); -- 2.39.5