Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

cqp 1 miesiąc temu
rodzic
commit
ff55eb8385
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      app/Service/Statistic/StatisticCommonService.php

+ 4 - 1
app/Service/Statistic/StatisticCommonService.php

@@ -317,7 +317,10 @@ class StatisticCommonService extends Service
             $item_month_list[$item_key]['total_min'] += $total_salary;
             // B. 计算工资分摊:(项目工时 / 月总工时) * 月工资
             if ($total_min > 0) {
-                $ratio = round($item['total_work'] / $total_min,2);
+//                var_dump(round($item['total_work']/60,2));
+//                var_dump( $item_month_list[$item_key]['total_hours']);die;
+//                var_dump();
+                $ratio = round(round($item['total_work']/60,2) / $item_month_list[$item_key]['total_hours'],6);
                 $allocated_salary = round($ratio * $total_salary);
             } else {
                 $allocated_salary = 0;