Explorar o código

封装的报表类方法

gogs hai 1 mes
pai
achega
ec731e42a8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/Service/StatisticService.php

+ 1 - 1
app/Service/StatisticService.php

@@ -998,7 +998,7 @@ class StatisticService extends StatisticCommonService
         }
 //        dd($attendance_key_list);
         foreach ($list as $key => $value){
-            $list[$key]['actual_expenditure'] = round($attendance_key_list[$value['code']]/100,2) ?? 0;
+            $list[$key]['actual_expenditure'] = isset($attendance_key_list[$value['code']]) ? round($attendance_key_list[$value['code']]/100,2) : 0;
             $start_time = $value['start_time'] ? date('Y-m-d', $value['start_time']) : '';
             $end_time = $value['end_time'] ? date('Y-m-d', $value['end_time']) : '';
             $list[$key]['time_range'] = $start_time . ' ' . $end_time;