Silent 6 years ago
parent
commit
5a8fcad192
1 changed files with 1 additions and 1 deletions
  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();
         }