]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
[ERP-117] Правки по выводу сотрудников в лк feature_filippov_erp-117_lk_sales_table_fix origin/feature_filippov_erp-117_lk_sales_table_fix
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Sat, 20 Jul 2024 13:35:00 +0000 (16:35 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Sat, 20 Jul 2024 13:35:00 +0000 (16:35 +0300)
erp24/services/CabinetService.php
erp24/web/index.php

index 81c0b123a96726a61bb29af02f811386d46edebf..ccc1a9ce5414b35c57e865335a89f6e867d66946 100755 (executable)
@@ -4143,9 +4143,12 @@ Group BY admin_id
             foreach ($timetableFactPrepared as $key => $row) {
                 if (!array_key_exists($row['date_shift'], $listDateCount)) {
                     $listDateCount[$row['date_shift']] = 1;
-                    $timetableFact[$key] = $row;
-                    $timetableFact[$key]['date'] = $row['date_shift'];
+
+                } else {
+                    $listDateCount[$row['date_shift']] = $listDateCount[$row['date_shift']] + 1;
                 }
+                $timetableFact[$key] = $row;
+                $timetableFact[$key]['date'] = $row['date_shift'];
             }
         }
 
index 7c88b0945982802ffffcc6f636e323d1df20450d..a32daaef47489799715c4eae8c577538b1cde589 100644 (file)
@@ -32,7 +32,7 @@ if (
     $post = \yii\helpers\Json::encode($postJson);
     $post = str_replace('"', '\'', $post);
     $app->db->createCommand(
-        'INSERT INTO page_statistics (admin_id, url, post, created_at) VALUES (\'' . $_SESSION['admin_id'] . '\', \''
+        'INSERT INTO public.page_statistics (admin_id, url, post, created_at) VALUES (\'' . $_SESSION['admin_id'] . '\', \''
         . $url . '\', :post, NOW())'
     )->bindParam(':post', $post, PDO::PARAM_STR)->execute();
 }