Преглед на файлове

封装的报表类方法

gogs преди 2 месеца
родител
ревизия
4654639447
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      app/Service/BIService.php

+ 1 - 1
app/Service/BIService.php

@@ -27,7 +27,7 @@ class BIService extends Service
             $data['month_end'] = date("Y-m-d", $end);
         }
 
-        if (!isset($data['month_start'])) $month_start = date('Y-01-01');
+        if (!isset($data['month_start'])) $month_start = date('Y-01-01', strtotime('-1 year'));
         else $month_start = date('Y-m-01', strtotime($data['month_start']));
         if (!isset($data['month_end'])) $month_end = date('Y-01-01', strtotime('+1 year', strtotime($month_start)));
         else {