103 lines
4.1 KiB
PHP
103 lines
4.1 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="vi">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Thông báo hóa đơn</title>
|
|
<style>
|
|
body { font-family: Arial, sans-serif; background: #f4f4f4; margin: 0; padding: 0; }
|
|
.wrapper { max-width: 640px; margin: 30px auto; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
|
|
.header { background: #1a56db; padding: 24px 32px; }
|
|
.header h1 { color: #fff; margin: 0; font-size: 22px; }
|
|
.body { padding: 32px; color: #374151; }
|
|
.body p { line-height: 1.7; margin: 0 0 12px; }
|
|
.invoice-box { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 20px 24px; margin: 20px 0; }
|
|
.invoice-box table { width: 100%; border-collapse: collapse; }
|
|
.invoice-box td { padding: 6px 0; font-size: 14px; }
|
|
.invoice-box td:first-child { color: #6b7280; width: 160px; }
|
|
.invoice-box td:last-child { font-weight: 600; color: #111827; }
|
|
.status-paid { color: #059669; }
|
|
.status-unpaid { color: #dc2626; }
|
|
.status-cancel { color: #9ca3af; }
|
|
.attachments { margin: 20px 0; }
|
|
.attachments h3 { font-size: 15px; margin-bottom: 10px; color: #374151; }
|
|
.attachments ul { padding-left: 16px; margin: 0; }
|
|
.attachments ul li { margin-bottom: 6px; font-size: 14px; }
|
|
.attachments ul li a { color: #1a56db; text-decoration: none; }
|
|
.note-box { background: #fffbeb; border-left: 4px solid #f59e0b; padding: 12px 16px; margin: 20px 0; font-size: 14px; }
|
|
.footer { background: #f9fafb; border-top: 1px solid #e5e7eb; padding: 20px 32px; text-align: center; font-size: 13px; color: #9ca3af; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="wrapper">
|
|
<div class="header">
|
|
<h1>Thông báo hóa đơn</h1>
|
|
</div>
|
|
|
|
<div class="body">
|
|
<p>Xin chào <strong>{{ $customerName }}</strong>,</p>
|
|
<p>{{ $message }}</p>
|
|
|
|
<div class="invoice-box">
|
|
<table>
|
|
<tr>
|
|
<td>Số hóa đơn</td>
|
|
<td>#{{ $invoice->order_num }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Ngày tạo</td>
|
|
<td>{{ $invoice->date ? date('d/m/Y', $invoice->date) : '—' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Hạn thanh toán</td>
|
|
<td>{{ $invoice->due_date ? date('d/m/Y', $invoice->due_date) : '—' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Tổng tiền</td>
|
|
<td>{{ number_format($invoice->total) }} VNĐ</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Trạng thái</td>
|
|
<td>
|
|
@if($invoice->status == 2)
|
|
<span class="status-paid">Đã thanh toán</span>
|
|
@elseif($invoice->status == 1)
|
|
<span class="status-unpaid">Chưa thanh toán</span>
|
|
@else
|
|
<span class="status-cancel">Đã hủy</span>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
@if($attachments->isNotEmpty())
|
|
<div class="attachments">
|
|
<h3>File đính kèm</h3>
|
|
<ul>
|
|
@foreach($attachments as $file)
|
|
<li>
|
|
<a href="{{ $file->url }}" target="_blank">{{ $file->filename }}</a>
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
|
|
@if($invoice->note)
|
|
<div class="note-box">
|
|
<strong>Ghi chú:</strong> {{ $invoice->note }}
|
|
</div>
|
|
@endif
|
|
|
|
<p>Nếu bạn có bất kỳ thắc mắc nào, vui lòng liên hệ với chúng tôi để được hỗ trợ.</p>
|
|
<p>Trân trọng,<br><strong>{{ $companyName }}</strong></p>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
© {{ date('Y') }} {{ $companyName }}. Đây là email tự động, vui lòng không trả lời.
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|