Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

cqp 1 miesiąc temu
rodzic
commit
266d31c094

+ 1 - 1
app/Service/AuxiliaryAccountService.php

@@ -182,7 +182,7 @@ class AuxiliaryAccountService extends Service
         }
         }
         $model = new ExpenseClaimsDetails();
         $model = new ExpenseClaimsDetails();
         //总金额
         //总金额
-        $list = $model->where('expense_claims_id',$month_ps_order_id)->where('del_time',0)->select("fee_id","amount as total_amount","remark","entrust_type","item_id")->get()->toArray();
+        $list = $model->where('expense_claims_id',$month_ps_order_id)->where('del_time',0)->select("fee_id","amount as total_amount","remark","entrust_type","item_id","r_id")->get()->toArray();
         foreach ($list as &$v){
         foreach ($list as &$v){
             $v['entrust1_amount'] = $v['entrust_type'] == 1 ?  $v['total_amount'] : 0;
             $v['entrust1_amount'] = $v['entrust_type'] == 1 ?  $v['total_amount'] : 0;
             $v['entrust2_amount'] = $v['entrust_type'] == 2 ?  $v['total_amount'] : 0;
             $v['entrust2_amount'] = $v['entrust_type'] == 2 ?  $v['total_amount'] : 0;

+ 5 - 4
app/Service/StatisticService.php

@@ -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'],