Files
Kent-logistics-Laravel/resources/views/admin/pdf/orderpdf.blade.php

253 lines
7.3 KiB
PHP
Raw Normal View History

2026-03-09 12:27:42 +05:30
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Invoices Report</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'DejaVu Sans', Arial, sans-serif;
font-size: 10px;
color: #1f2937;
padding: 20px;
}
.header {
text-align: center;
margin-bottom: 30px;
border-bottom: 3px solid #3b82f6;
padding-bottom: 15px;
}
.header h1 {
font-size: 24px;
color: #1f2937;
margin-bottom: 5px;
}
.header .date {
font-size: 11px;
color: #6b7280;
}
.stats-grid {
display: table;
width: 100%;
margin-bottom: 25px;
border-collapse: collapse;
}
.stats-row {
display: table-row;
}
.stat-box {
display: table-cell;
width: 25%;
padding: 15px;
text-align: center;
border: 2px solid #e5e7eb;
vertical-align: middle;
}
.stat-box.total {
background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
border-left: 4px solid #3b82f6;
}
.stat-box.paid {
background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
border-left: 4px solid #22c55e;
}
.stat-box.pending {
background: linear-gradient(135deg, #fffbeb 0%, #fef9c3 100%);
border-left: 4px solid #f59e0b;
}
.stat-box.overdue {
background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
border-left: 4px solid #ef4444;
}
.stat-value {
font-size: 28px;
font-weight: bold;
color: #1f2937;
margin-bottom: 5px;
}
.stat-box.total .stat-value { color: #3b82f6; }
.stat-box.paid .stat-value { color: #16a34a; }
.stat-box.pending .stat-value { color: #d97706; }
.stat-box.overdue .stat-value { color: #dc2626; }
.stat-label {
font-size: 11px;
color: #6b7280;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
table.data-table {
width: 100%;
border-collapse: collapse;
margin-top: 10px;
font-size: 9px;
}
table.data-table thead {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
table.data-table th {
padding: 10px 8px;
text-align: center;
color: white;
font-weight: 600;
font-size: 9px;
border: 1px solid #5a67d8;
}
table.data-table td {
padding: 8px;
text-align: center;
border: 1px solid #e5e7eb;
font-size: 8px;
}
table.data-table tbody tr:nth-child(even) {
background: #f9fafb;
}
table.data-table tbody tr:hover {
background: #f3f4f6;
}
.status-badge {
display: inline-block;
padding: 4px 10px;
border-radius: 12px;
font-size: 8px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.3px;
}
.status-paid {
background: linear-gradient(135deg, #10b981, #34d399);
color: white;
}
.status-pending {
background: linear-gradient(135deg, #fef3c7, #fde68a);
color: #d97706;
}
.status-overdue {
background: linear-gradient(135deg, #fef2f2, #fecaca);
color: #dc2626;
}
.footer {
margin-top: 20px;
text-align: center;
font-size: 9px;
color: #9ca3af;
border-top: 1px solid #e5e7eb;
padding-top: 10px;
}
.no-data {
text-align: center;
padding: 40px;
color: #9ca3af;
font-size: 12px;
}
</style>
</head>
<body>
<div class="header">
<h1>📊 Invoices Report</h1>
<div class="date">Generated on: {{ now()->format('d M Y, h:i A') }}</div>
</div>
<!-- Stats Boxes -->
<div class="stats-grid">
<div class="stats-row">
<div class="stat-box total">
<div class="stat-value">{{ $totalInvoices }}</div>
<div class="stat-label">Total Invoices</div>
</div>
<div class="stat-box paid">
<div class="stat-value">{{ $paidInvoices }}</div>
<div class="stat-label">Paid Invoices</div>
</div>
<div class="stat-box pending">
<div class="stat-value">{{ $pendingInvoices }}</div>
<div class="stat-label">Pending Invoices</div>
</div>
<div class="stat-box overdue">
<div class="stat-value">{{ $overdueInvoices }}</div>
<div class="stat-label">Overdue Invoices</div>
</div>
</div>
</div>
<!-- Data Table -->
@if($invoices->count() > 0)
<table class="data-table">
<thead>
<tr>
<th>Invoice No</th>
<th>Date</th>
<th>Mark No</th>
<th>Container</th>
<th>Cont. Date</th>
<th>Company</th>
<th>Customer</th>
<th>Amount</th>
<th>Amount+GST</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@foreach($invoices as $inv)
<tr>
<td>{{ $inv->invoice_number ?? '-' }}</td>
<td>{{ $inv->invoice_date ? \Carbon\Carbon::parse($inv->invoice_date)->format('d-m-Y') : '-' }}</td>
<td>{{ $inv->mark_no ?? '-' }}</td>
<td>{{ $inv->container_number ?? '-' }}</td>
<td>{{ $inv->container_date ? \Carbon\Carbon::parse($inv->container_date)->format('d-m-Y') : '-' }}</td>
<td>{{ $inv->company_name ?? '-' }}</td>
<td>{{ $inv->customer_name ?? '-' }}</td>
<td>{{ $inv->final_amount ? '₹'.number_format($inv->final_amount, 2) : '-' }}</td>
<td>{{ $inv->final_amount_with_gst ? '₹'.number_format($inv->final_amount_with_gst, 2) : '-' }}</td>
<td>
@php
$status = strtolower($inv->invoice_status ?? 'pending');
@endphp
<span class="status-badge status-{{ $status }}">{{ ucfirst($status) }}</span>
</td>
</tr>
@endforeach
</tbody>
</table>
@else
<div class="no-data">
No invoices found matching the criteria.
</div>
@endif
<div class="footer">
Kent Logistics - Invoice Management System | Page 1 of 1
</div>
</body>
</html>