|
@@ -881,7 +881,11 @@ class ExportFileService extends Service
|
|
|
$feeTypes = $result['fee_type_list'] ?? [];
|
|
$feeTypes = $result['fee_type_list'] ?? [];
|
|
|
|
|
|
|
|
// 2. 构造动态表头名称
|
|
// 2. 构造动态表头名称
|
|
|
- $dynamicHeaderTitles = array_column($feeTypes, 'title');
|
|
|
|
|
|
|
+ $dynamicHeaderTitles = [];
|
|
|
|
|
+ foreach ($feeTypes as $value){
|
|
|
|
|
+ if(! $value['is_after']) $dynamicHeaderTitles[] = $value['title'];
|
|
|
|
|
+ }
|
|
|
|
|
+// $dynamicHeaderTitles = array_column($feeTypes, 'title');
|
|
|
$dynamicHeaders = array_merge(['人员人工费用', '折旧费用'], $dynamicHeaderTitles);
|
|
$dynamicHeaders = array_merge(['人员人工费用', '折旧费用'], $dynamicHeaderTitles);
|
|
|
|
|
|
|
|
$items = [];
|
|
$items = [];
|
|
@@ -903,16 +907,16 @@ class ExportFileService extends Service
|
|
|
foreach ($feeTypes as $type) {
|
|
foreach ($feeTypes as $type) {
|
|
|
$feeData = $currentProjectFees->get($type['id']);
|
|
$feeData = $currentProjectFees->get($type['id']);
|
|
|
$amount = (float)($feeData['total_amount'] ?? 0);
|
|
$amount = (float)($feeData['total_amount'] ?? 0);
|
|
|
|
|
+ // 2. 累加委托费用 (8.1 和 8.3)
|
|
|
|
|
+ $val8_1 += (float)($feeData['entrust1_amount'] ?? 0);
|
|
|
|
|
+ $val8_3 += (float)($feeData['entrust2_amount'] ?? 0);
|
|
|
|
|
+ if($feeData['is_other']) continue;
|
|
|
|
|
|
|
|
// 填充到动态科目列
|
|
// 填充到动态科目列
|
|
|
$rowValues[] = $amount;
|
|
$rowValues[] = $amount;
|
|
|
|
|
|
|
|
// 1. 累加其他相关费用合计 (7.1)
|
|
// 1. 累加其他相关费用合计 (7.1)
|
|
|
// if(! empty($feeData['is_other']) && $feeData['is_other'] == Fee::IS_OTHER_ONE) $val7_1 += $amount;
|
|
// if(! empty($feeData['is_other']) && $feeData['is_other'] == Fee::IS_OTHER_ONE) $val7_1 += $amount;
|
|
|
-
|
|
|
|
|
- // 2. 累加委托费用 (8.1 和 8.3)
|
|
|
|
|
- $val8_1 += (float)($feeData['entrust1_amount'] ?? 0);
|
|
|
|
|
- $val8_3 += (float)($feeData['entrust2_amount'] ?? 0);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$items[] = [
|
|
$items[] = [
|