|
@@ -312,7 +312,7 @@ class StatisticService extends StatisticCommonService
|
|
|
$item_device_list = $this->getDeviceItemSalary($month_start, $month_end, $data, $user);
|
|
$item_device_list = $this->getDeviceItemSalary($month_start, $month_end, $data, $user);
|
|
|
//第四步其他费用
|
|
//第四步其他费用
|
|
|
list($item_fee_list, $fee_type_list) = $this->getFeeItemSalary($month_start, $month_end, $data, $user);
|
|
list($item_fee_list, $fee_type_list) = $this->getFeeItemSalary($month_start, $month_end, $data, $user);
|
|
|
-
|
|
|
|
|
|
|
+// dd($item_device_list);
|
|
|
//组合所有数据
|
|
//组合所有数据
|
|
|
$return = [];
|
|
$return = [];
|
|
|
foreach ($item_key_list as $v) {
|
|
foreach ($item_key_list as $v) {
|
|
@@ -322,8 +322,8 @@ class StatisticService extends StatisticCommonService
|
|
|
"code" => $v['code'],
|
|
"code" => $v['code'],
|
|
|
"title" => $v['title'],
|
|
"title" => $v['title'],
|
|
|
"state" => $v['state'] == 3 ? "完结" : "进行中",
|
|
"state" => $v['state'] == 3 ? "完结" : "进行中",
|
|
|
- "employee_salary" => isset($item_employee_list[$v['id']]['salary']) ? round($item_employee_list[$v['id']]['salary']/100,2) : 0,
|
|
|
|
|
- "device_depreciation" => isset($item_device_list[$v['id']]['depreciation']) ? round($item_device_list[$v['id']]['depreciation']/100,2): 0,
|
|
|
|
|
|
|
+ "employee_salary" => isset($item_employee_list[$v['id']]['salary']) ? round($item_employee_list[$v['id']]['salary'],2) : 0,
|
|
|
|
|
+ "device_depreciation" => isset($item_device_list[$v['id']]['allocated_depreciation']) ? round($item_device_list[$v['id']]['allocated_depreciation'],2): 0,
|
|
|
"expense_type" => "费用化支出",
|
|
"expense_type" => "费用化支出",
|
|
|
"fee_list" => collect($item_fee_list[$v['id']] ?? [])->values()->all(),
|
|
"fee_list" => collect($item_fee_list[$v['id']] ?? [])->values()->all(),
|
|
|
];
|
|
];
|
|
@@ -511,6 +511,7 @@ class StatisticService extends StatisticCommonService
|
|
|
'sort' => $sort,
|
|
'sort' => $sort,
|
|
|
'id' => $rootId,
|
|
'id' => $rootId,
|
|
|
'title' => $title,
|
|
'title' => $title,
|
|
|
|
|
+ 'is_after' => $other,
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -597,7 +598,7 @@ class StatisticService extends StatisticCommonService
|
|
|
"voucher_remark" => $v['voucher_remark'],
|
|
"voucher_remark" => $v['voucher_remark'],
|
|
|
"voucher_amount" => $v['voucher_amount'],
|
|
"voucher_amount" => $v['voucher_amount'],
|
|
|
"aggregation_amount" => $v['aggregation_amount'],
|
|
"aggregation_amount" => $v['aggregation_amount'],
|
|
|
- "total_amount" => $v['type'] == 1 ?round( $item_salary[$vv['id'] . "_" . date("Y-m", $v['voucher_date'])]['allocated_salary']/100,2) : (isset($device_depreciation[$vv['id'] . "_" . date("Y-m", $v['voucher_date'])]['depreciation']) ?round($device_depreciation[$vv['id'] . "_" . date("Y-m", $v['voucher_date'])]['depreciation']/100,2) : 0),
|
|
|
|
|
|
|
+ "total_amount" => $v['type'] == 1 ?round( $item_salary[$vv['id'] . "_" . date("Y-m", $v['voucher_date'])]['allocated_salary'],2) : (isset($device_depreciation[$vv['id'] . "_" . date("Y-m", $v['voucher_date'])]['depreciation']) ?round($device_depreciation[$vv['id'] . "_" . date("Y-m", $v['voucher_date'])]['depreciation'],2) : 0),
|
|
|
"fee_id" => $v['fee_id'],
|
|
"fee_id" => $v['fee_id'],
|
|
|
"entrust1_amount" => $v['entrust1_amount'],
|
|
"entrust1_amount" => $v['entrust1_amount'],
|
|
|
"entrust2_amount" => $v['entrust2_amount'],
|
|
"entrust2_amount" => $v['entrust2_amount'],
|