@php $formatMailDate = static function ($value): string { if (empty($value)) { return '—'; } if ($value instanceof \Carbon\CarbonInterface) { return $value->format('d/m/Y'); } if (is_numeric($value)) { return date('d/m/Y', (int) $value); } try { return \Carbon\Carbon::parse($value)->format('d/m/Y'); } catch (\Throwable) { return '—'; } }; @endphp

{{ ($type ?? 'invoice') === 'renewal' ? 'Thông báo gia hạn cước' : 'Thông báo hóa đơn' }}

Xin chào {{ $customerName }},

{{ $bodyMessage ?? '' }}

Số hóa đơn #{{ $invoice->order_num }}
Ngày tạo {{ $formatMailDate($invoice->date) }}
Hạn thanh toán {{ $formatMailDate($invoice->due_date) }}
Tổng tiền {{ number_format($invoice->total) }} VNĐ
Trạng thái @if($invoice->status == 2) Đã thanh toán @elseif($invoice->status == 1) Chưa thanh toán @else Đã hủy @endif
@if(($type ?? 'invoice') === 'renewal') File PDF hóa đơn gia hạn đã được đính kèm trong email này. Vui lòng hoàn tất thanh toán trước hạn để dịch vụ không bị gián đoạn. @else File PDF hóa đơn đã được đính kèm trong email này để quý khách tiện lưu trữ và đối chiếu. @endif
@if(!empty($paymentUrl))

Hoặc sao chép liên kết thanh toán: {{ $paymentUrl }}

@endif @if($attachments->isNotEmpty())

File đính kèm

@endif @if($invoice->note)
Ghi chú: {{ $invoice->note }}
@endif

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ợ.

Trân trọng,
{{ $companyName }}