Silent 7 anni fa
parent
commit
5a8fcad192
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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();
         }