Files
sccs_laravel/resources/views/content/users/course-print2.blade.php
2025-11-04 16:23:40 +05:00

176 lines
4.8 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Course PDF - {{config('app.name')}}</title>
<style>
.clearfix:after {
content: "";
display: table;
clear: both;
}
a {
color: #5D6975;
text-decoration: underline;
}
body {
position: relative;
width: 18cm;
height: 29.7cm;
margin: 0 auto;
color: #001028;
background: #FFFFFF;
font-family: Arial, sans-serif;
font-size: 12px;
font-family: Arial;
}
header {
padding: 10px 0;
margin-bottom: 30px;
}
#logo img {
width: 90px;
}
h1 {
border-top: 1px solid #5D6975;
border-bottom: 1px solid #5D6975;
color: #5D6975;
font-size: 2.4em;
line-height: 1.4em;
font-weight: normal;
text-align: center;
margin: 0 0 20px 0;
}
#project {
float: left;
}
#project span {
color: #5D6975;
text-align: right;
width: 52px;
margin-right: 10px;
display: inline-block;
font-size: 0.8em;
}
#company {
float: right;
}
#company span {
color: #5D6975;
text-align: right;
width: 52px;
margin-right: 10px;
display: inline-block;
font-size: 0.8em;
}
#project div,
#company div {
white-space: nowrap;
}
table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
margin-bottom: 20px;
}
table tr:nth-child(2n-1) td {
background: #F5F5F5;
}
table th,
table td {
text-align: center;
}
table th {
padding: 5px 20px;
color: #5D6975;
border-bottom: 1px solid #C1CED9;
white-space: nowrap;
font-weight: normal;
}
table td {
padding: 20px;
}
footer {
color: #5D6975;
width: 100%;
height: 30px;
position: absolute;
bottom: 0;
border-top: 1px solid #C1CED9;
padding: 8px 0;
text-align: center;
}
</style>
</head>
<body>
<header class="clearfix">
<h1>{{$user->name}}</h1>
<div id="company" class="clearfix">
<div><span>Course Category</span> {{ @$course->category->name}}</div>
<div><span>Start Date</span> {{@$course->start_date}}</div>
<div><span>End Date</span> {{ @$course->end_date }}</div>
<div><span>Total Fee</span> {{ @$course->total_fee }}</div>
<div><span>Remaining Fee</span> {{@$course->total_fee - $course->paidAmount}}</div>
</div>
<div id="project">
<div><span>Student</span> {{$user->name}}</div>
<div><span>Father</span> {{$user->father_name}}</div>
<div><span>Phone</span> {{$user->phone}}</div>
<div><span>Email</span> <a href="mailto:{{$user->email}}">{{$user->email}}</a></div>
<div><span>Cnic</span> {{$user->cnic}}</div>
<div><span>Roll No.</span> #{{$user->id}}</div>
</div>
</header>
<main>
@if(@$course->allTransactions->count()>0 )
<h3 style="text-align: center">Course Transactions</h3>
<table>
<thead>
<tr>
<th class="text-center">#</th>
<th class="text-center">Type</th>
<th class="text-center">Amount</th>
<th class="text-center">Date & Time</th>
</tr>
</thead>
<tbody>
@php
$y = 1;
@endphp
@foreach(@$course->allTransactions as $transaction)
<tr>
<td class="text-center">{{ @$y}}</td>
<td class="text-center">{{ @$transaction->type}}</td>
<td class="text-center"> {{@$transaction->amount}}</td>
<td class="text-center"> {{ date('Y-m-d h:i a',strtotime($transaction->created_at)) }}</td>
</tr>
@php
$y++
@endphp
@endforeach
</tbody>
<tfoot style="margin-top: 20px;">
<tr style="text-align: center !important;">
<td colspan="4" style="text-align: center;">
<span >A product by
<a href="https://magnificentservices.net/">Magnificent Services</a> (<a href="https://magnificentservices.net/">https://magnificentservices.net</a>)
</span>
</td>
</tr>
</tfoot>
</table>
@endif
</main>
<footer>
</footer>
</body>
</html>