]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
изменение порядка блоков
authorVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Wed, 4 Sep 2024 20:43:17 +0000 (23:43 +0300)
committerVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Wed, 4 Sep 2024 20:43:17 +0000 (23:43 +0300)
erp24/services/MotivationService.php

index 35773ce1da5f7d4743d9db2704540c25421bb618..c51bf8ddb304f7efdf333452bddf89acf5ecd661 100644 (file)
@@ -1385,9 +1385,6 @@ class MotivationService
     {
 
         $storeId = (int)$storeId;
-        $startDate = date('Y-m-d', strtotime($startDate));
-        $endDate = date('Y-m-d', strtotime($endDate));
-
 
         $salesRecords = Sales::find()
             ->select(['id', 'date'])
@@ -1397,6 +1394,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'));