gogs 2 mesiacov pred
rodič
commit
87a9140bd6
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      app/Service/StatisticService.php

+ 2 - 2
app/Service/StatisticService.php

@@ -184,12 +184,12 @@ class StatisticService extends Service
             $item['allocated_salary'] = round($item['allocated_salary'],2);
             // 如果不是最后一条
             if ($index < $count - 1) {
-                $total_day -= $item['day'];
+                $total_day -= $item['days'];
                 // 关键:递减外部的 $absolute_total_hours
                 $all_salary -= $item['allocated_salary'];
             } else {
                 // 最后一条:直接拿剩下的“余额”
-                $item['day'] = $total_day;
+                $item['days'] = $total_day;
                 $item['allocated_salary'] = $all_salary;
             }
             return $item;