IMMREX7
<!DOCTYPE html>
<html>
<head>
<!-- <meta charset="utf-8"> -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>School MIS</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<meta name="csrf-token" content="{{ csrf_token() }}">
<style type="text/css">
@page {
header: page-header;
footer: page-footer;
margin-top: 40pt;
margin-bottom: 10px;
}
section{
}
body {
font-family: 'examplefont', sans-serif;
}
</style>
</head>
<body>
@foreach($cnotes as $var)
<table class="table">
<tbody>
<tr>
<th style="vertical-align: middle;text-align: center; width: 40%; padding: 0px; "><img src="{{ asset('storage/schools/'.$school->idSchool.'/'.$school->schoolLogo)}}" height="90" width="90"></th>
<th style="vertical-align: middle;text-align: center; width:60%; padding: 0px; ">
<strong>{{$school->schoolName}}</strong><br>
{{$school->street}} {{$school->landmark}} {{$school->subArea}} {{$school->area}} <br>
{{$school->city}} {{$school->state->stateName}}<br>
Contact No : {{$school->mobile}}
</th>
</tr>
</tbody>
</table>
<section>
<div class="content">
<table border="1" style="width:100% ;border-collapse: collapse;overflow: wrap;">
<thead>
<tr><th style="background-color:blue;color:#FFF; height: 30px;">CREDIT NOTE</th></tr>
<tr>
<?php
$student = \App\AdmEntry::where('idStudent', '=', $var->idStudent)->first();
$class_feeheads = \DB::table('feeheads')->where('idClass', '=', $student->idClass)
->where('idSection', '=', $student->idSection)
->where('studentCategory', '=', $student->studentType)
->whereNull('idStudent');
// ->get();
$allcat_feeheads = \DB::table('feeheads')->where('idClass', '=', $student->idClass)
->where('idSection', '=', $student->idSection)
->where('studentCategory', '=', 'All')
->whereNull('idStudent');
// ->get();
$feeheads = \DB::table('feeheads')->where('idStudent', '=', $student->idStudent)
->union($class_feeheads)
->union($allcat_feeheads)
->orderBy('toDate')
->get();
$feetotal = $feeheads->sum('amount');
$transaction = \App\StudentTransaction::where('idStudent', '=', $student->idStudent)
->select(DB::raw('SUM(totalPaid) as totalPaid'), DB::raw('SUM(discount) as discount'), DB::raw('SUM(fine) as fine'), DB::raw('SUM(penaltyAmount) as penaltyAmount'))
->first();
$balance = $feetotal + $transaction->fine + $transaction->penaltyAmount - $transaction->discount - $transaction->totalPaid; ?>
<th>Total Due: {{$balance}}</th>
</tr>
<tr>
<th style="border: 1px solid black;text-align: center; padding: 10px;">{{$var->creditNote}}</th>
</tr>
</thead>
</table>
<p></p>
<p></p>
</div>
</section>
@endforeach
<htmlpagefooter name="page-footer" >
</htmlpagefooter>
</body>
</html>
Copyright © 2021 -