<title>Deposit Fee Report</title>

<p style="font-size:20px" align="center">Deposit Fee Report Between <?php echo e($from); ?> <small>To</small> <?php echo e($to); ?></p>


<table width="100%" cellspacing="0" cellpadding="0" border="1" style="text-align:center">

<tr>
<td><b>SNO</b></td>
<td><b>Student</b></td>
<td><b>Mobile</b></td>
<td><b>City</b></td>
<td><b>Course</b></td>
<td><b>Batch</b></td>
<td><b>Ammount</b></td>
<td><b>Date</b></td>
</tr>

<?php 
$i=0;
foreach($res as $row)
{
	//get student,student course and course name from db
	$student 		= DB::table('student')->find($row->student_id);
	$studentCourse	= DB::table('student_course')->where('student_id',$student->id)->where('status',0)->first();
	$courseName		= DB::table('course')->find($row->course_id);
	
	//date added formate change					
	$d 	= strtotime($row->date_added);
	$od = date("d-M-y", $d);
	
	//count for total
	$totalArray[] = $row->amount;
	$i++;
?>
<tr>
<td><?php echo e($i); ?></td>
<td><?php echo e($student->first_name." ".$student->last_name); ?></td>
<td><?php echo e($student->mobile); ?></td>
<td><?php echo e($student->city); ?></td>
<td><?php echo e($courseName->name); ?></td>
<td><?php echo e($studentCourse->batch); ?></td>
<td>Rs.<?php echo e($row->amount); ?></td>
<td><?php echo e($od); ?></td>
</tr>
<?php } ?>

<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><b>Total</b></td>
<td><b>Rs.<?php echo e(array_sum($totalArray)); ?></b></td>
<td>&nbsp;</td>

</tr>
</table>