gogs пре 2 месеци
родитељ
комит
93c3bcaf3c
1 измењених фајлова са 1 додато и 2 уклоњено
  1. 1 2
      app/Service/AuxiliaryAccountService.php

+ 1 - 2
app/Service/AuxiliaryAccountService.php

@@ -85,7 +85,7 @@ class AuxiliaryAccountService extends Service
     private  function employeeMonthAmount($month,$user,$monthStart,$monthEnd){
         $data['top_depart_id'] = $user['top_depart_id'];
         $month_ps_order = MonthlyPsOrder::Clear($user,$data);
-        $month_ps_order_id = $month_ps_order->where("month",$monthStart)->first();
+        $month_ps_order_id = $month_ps_order->where('del_time',0)->where("month",$monthStart)->first();
         if(empty($month_ps_order_id)){
             return [false,"请补充对应月份人员月度工资信息"];
         }else{
@@ -94,7 +94,6 @@ class AuxiliaryAccountService extends Service
         $model = MonthlyPsOrderDetails::Clear($user,$data);
         //总金额
         $total_amount = $model->where('main_id',$month_ps_order_id)->where('del_time',0)->sum("salary");
-
         //委内
         $entrust_in_amount = $model->where('main_id',$month_ps_order_id)->where("entrust_type",1)->sum("salary");
         //委外