@php $companyLogo = $companyLogo ?? ''; $companyName = $companyName ?? ''; $companyAddress = $companyAddress ?? ''; $companyPhone = $companyPhone ?? ''; $companyEmail = $companyEmail ?? ''; $companyTaxCode = $companyTaxCode ?? ''; $brandColor = $brandColor ?? '#1a56db'; $cfg = array_merge([ 'accent_color' => $brandColor, 'show_logo' => true, 'show_company_info' => true, 'show_customer_info' => true, 'show_order_info' => true, 'show_items_table' => true, 'show_summary' => true, 'show_note' => true, 'footer_text' => 'Cảm ơn quý khách đã sử dụng dịch vụ.', 'footer_note' => 'Đây là hóa đơn điện tử được tạo tự động, không cần chữ ký số.', ], $cfg ?? []); @endphp
|
@if(($cfg['show_logo'] ?? true) && $companyLogo)
|
HÓA ĐƠN ĐẶT HÀNG(INVOICE ORDER)
Ngày {{ $invoice->created_at?->format('d') ?? '—' }}
tháng {{ $invoice->created_at?->format('m') ?? '—' }}
năm {{ $invoice->created_at?->format('Y') ?? '—' }}
|
|
{{ $companyName }}@if($companyTaxCode)Mã số thuế (Tax code): {{ $companyTaxCode }}
@endif
@if($companyAddress)
Địa chỉ (Address): {{ $companyAddress }}
@endif
@if($companyPhone)
Điện thoại (Tel): {{ $companyPhone }}
@endif
@if($companyEmail)
Email: {{ $companyEmail }}
@endif
|
|
Hình thức thanh toán:
{{ $invoice->payment_method ? strtoupper($invoice->payment_method) : 'TM/CK' }}
|
Email: {{ $customer?->email ?? '—' }}
|
| STT | Tên hàng hóa, dịch vụ | Đơn vị tính | Số lượng | Đơn giá (đ) | Thành tiền (đ) |
|---|---|---|---|---|---|
| {{ $i + 1 }} | {{ $item->description ?? ($item->product?->name ?? 'Dịch vụ') }} | {{ ($item->months && $item->months > 0) ? 'Tháng' : 'Lần' }} | {{ number_format($item->quantity ?? 1, 2, ',', '.') }} | {{ number_format($item->unit_price, 0, ',', '.') }} | {{ number_format($item->total_price, 0, ',', '.') }} |
| Cộng tiền hàng (Total amount excl. VAT) | {{ number_format($invoice->sub_total, 0, ',', '.') }} | ||||
| Giảm giá (Discount) | -{{ number_format($invoice->discount_amount, 0, ',', '.') }} | ||||
| Thuế suất GTGT (VAT rate): {{ $taxRate > 0 ? $taxRate.'%' : 'Không áp dụng' }} | Tiền thuế GTGT (VAT amount) | {{ number_format($invoice->tax, 0, ',', '.') }} | |||
| Tổng tiền thanh toán (Total amount) | {{ number_format($invoice->total, 0, ',', '.') }} | ||||
Người mua hàng
|
Người bán hàng
|