79 lines
3.6 KiB
PHP
79 lines
3.6 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Receipt #{{ $sale->id }}</title>
|
|
<style>
|
|
body { font-family: sans-serif; color: #333; margin: 0; padding: 20px; font-size: 14px; }
|
|
.header { text-align: center; margin-bottom: 30px; border-bottom: 2px solid #eee; padding-bottom: 10px; }
|
|
.logo { color: #16a34a; font-weight: bold; font-size: 24px; letter-spacing: -1px; }
|
|
.info-grid { width: 100%; margin-bottom: 30px; }
|
|
.info-grid td { padding: 5px 0; vertical-align: top; }
|
|
.label { color: #666; font-size: 12px; font-weight: bold; text-transform: uppercase; }
|
|
.value { font-weight: bold; }
|
|
.table { width: 100%; border-collapse: collapse; margin-bottom: 30px; }
|
|
.table th { background: #f9fafb; text-align: left; padding: 10px; border-bottom: 1px solid #eee; font-size: 12px; }
|
|
.table td { padding: 10px; border-bottom: 1px solid #eee; }
|
|
.total-section { text-align: right; margin-top: 20px; }
|
|
.total-label { font-size: 16px; color: #666; }
|
|
.total-amount { font-size: 24px; font-weight: bold; color: #000; }
|
|
.footer { text-align: center; color: #999; font-size: 11px; margin-top: 50px; border-top: 1px solid #eee; padding-top: 10px; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<div class="logo">VERDE</div>
|
|
<div style="font-size: 12px; color: #666; margin-top: 5px;">Transaction Receipt</div>
|
|
</div>
|
|
|
|
<table class="info-grid">
|
|
<tr>
|
|
<td width="50%">
|
|
<div class="label">Issued By</div>
|
|
<div class="value">{{ $sale->store?->name }}</div>
|
|
<div style="font-size: 12px;">{{ $sale->store?->address }}</div>
|
|
</td>
|
|
<td width="50%" style="text-align: right;">
|
|
<div class="label">Receipt Number</div>
|
|
<div class="value">#{{ str_pad($sale->id, 8, '0', STR_PAD_LEFT) }}</div>
|
|
<div class="label" style="margin-top: 10px;">Date</div>
|
|
<div class="value">{{ $sale->sold_at?->format('M d, Y h:i A') }}</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div class="label" style="margin-bottom: 5px;">Customer Details</div>
|
|
<div class="value">{{ $sale->household?->head?->full_name }}</div>
|
|
<div style="font-size: 12px; margin-bottom: 30px;">{{ $sale->household?->address_line }}, {{ $sale->household?->barangay?->name }}</div>
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Description</th>
|
|
<th style="text-align: center;">Qty</th>
|
|
<th style="text-align: right;">Unit Price</th>
|
|
<th style="text-align: right;">Total</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Verde QR Code Stickers (Retail)</td>
|
|
<td style="text-align: center;">{{ $sale->quantity }}</td>
|
|
<td style="text-align: right;">₱{{ number_format($sale->retail_price_centavos / 100, 2) }}</td>
|
|
<td style="text-align: right;">₱{{ number_format(($sale->retail_price_centavos * $sale->quantity) / 100, 2) }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="total-section">
|
|
<span class="total-label">Total Amount Paid:</span>
|
|
<div class="total-amount">₱{{ number_format(($sale->retail_price_centavos * $sale->quantity) / 100, 2) }}</div>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>Thank you for choosing Verde. Let's keep our environment clean together!</p>
|
|
<p>This is a computer-generated receipt and does not require a signature.</p>
|
|
</div>
|
|
</body>
|
|
</html>
|