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