]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Fixes erp 5
authorMarina Zozirova <marina.zozirova@erp-flowers.ru>
Mon, 17 Jun 2024 05:58:38 +0000 (05:58 +0000)
committerAleksey Filippov <aleksey.filippov@erp-flowers.ru>
Mon, 17 Jun 2024 05:58:38 +0000 (05:58 +0000)
erp24/api2/config/api2.config.php
erp24/records/TimetableFactModel.php
erp24/views/timetable-fact/index.php
erp24/views/timetable-fact/view.php

index 6ef9ed8351ce035233630d5228a7f15ab7dd78df..8aaaf73315dc6eca4ede45b761d1acb2ccdceb94 100644 (file)
@@ -88,6 +88,7 @@ return [
         '@bower' => '@vendor/bower-asset',
         '@npm' => '@vendor/npm-asset',
         '@dist' => '@app/dist',
+        '@uploads' => "@app/uploads",
     ],
     'params' => require dirname(__DIR__, 2) . '/config/params.php',
     'timeZone' => 'Europe/Moscow',
index 06626b9766f35a688b30f43c457d3623715eda7a..4f8c318ae817d8610832e76373fc6da10e31b2a9 100644 (file)
@@ -113,7 +113,7 @@ class TimetableFactModel extends ActiveRecord
             $model->time_end = date("H:i:s", strtotime($adminCheckin->time));
             $model->is_close = true;
             $model->is_opening = false;
-            $model->work_time = min((strtotime($model->time_end) - strtotime($model->time_start)) / 3600, self::WORK_HOURS_TIME);
+            $model->work_time = min(abs(strtotime($model->time_end) - strtotime($model->time_start)) / 3600, self::WORK_HOURS_TIME);
             $model->status = AdminCheckin::TYPE_END;
             $model->checkin_end_id = $adminCheckin->id;
 
index 11ddd103d40247bec6c35ab8555f9bc5fc150b1f..be6f0ced2bbbcde18bf93c31f8ebe4f1cfa62956 100644 (file)
@@ -49,7 +49,7 @@ $this->params['breadcrumbs'][] = $this->title;
                 'attribute' => 'work_time',
                 'format' => 'raw',
                 'value' => function ($model) {
-                    return intval($model->work_time);
+                    return abs(intval($model->work_time));
                 },
             ],
             [
index 9b15140229bb5cde047935e4f3abe9d8ef3faef3..83437bc17e4915f7ad096b8ba9b5286667a2348f 100644 (file)
@@ -95,7 +95,7 @@ $this->title = "Фактический табель #$model->id";
                 'attribute' => 'work_time',
                 'format' => 'raw',
                 'value' => function ($model) {
-                    return intval($model->work_time);
+                    return abs(intval($model->work_time));
                 },
             ],
             [