Silent 7 年之前
父节点
当前提交
5a8fcad192
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Models/StudentCourse.php

+ 1 - 1
app/Models/StudentCourse.php

xqd
@@ -78,7 +78,7 @@ class StudentCourse extends Model
             return '';
         } else {
             $days = $this['duration'];
-            $leave_days = (int)Leave::where('student_id', $this['id'])->get()->count('days');
+            $leave_days = (int)Leave::where('student_id', $this['student_id'])->get()->count('days');
             $days += $leave_days;
             return Carbon::createFromTimestamp(strtotime($apply_date))->addDays($days)->toDateString();
         }