{{ $companyName }}

@if(isset($companyAddress))

{{ $companyAddress }}

@endif @if(isset($companyPhone))

Tel: {{ $companyPhone }}

@endif @if(isset($companyEmail))

Email: {{ $companyEmail }}

@endif

HÓA ĐƠN

Mã hóa đơn: #{{ $invoice->invoice_number }}

Ngày tạo: {{ $invoice->created_at ? $invoice->created_at->format('d/m/Y') : '—' }}

Hạn thanh toán: {{ $invoice->due_date ? \Carbon\Carbon::parse($invoice->due_date)->format('d/m/Y') : '—' }}

Trạng thái: @if($invoice->status == 2) Đã thanh toán @elseif($invoice->status == 1) Chưa thanh toán @else Đã hủy @endif

Thông tin khách hàng

{{ $customer->fullname }}

@if($customer->email)

Email: {{ $customer->email }}

@endif @if($customer->phone)

Điện thoại: {{ $customer->phone }}

@endif @if($customer->address)

Địa chỉ: {{ $customer->address }}

@endif

Thông tin đơn hàng

Mã đơn hàng: #{{ $order->order_num ?? '—' }}

@if(isset($order) && $order->created_at)

Ngày đặt: {{ $order->created_at->format('d/m/Y') }}

@endif
@foreach($invoiceItems as $i => $item) @endforeach
# Dịch vụ Chu kỳ Số lượng Đơn giá Thành tiền
{{ $i + 1 }} {{ $item->description ?? ($item->product?->name ?? 'Dịch vụ') }} {{ $item->billing_label }} {{ $item->quantity ?? 1 }} {{ number_format($item->unit_price, 0, ',', '.') }} đ {{ number_format($item->total_price, 0, ',', '.') }} đ
@if($invoice->discount_amount > 0) @endif @if($invoice->tax > 0) @endif
Tạm tính {{ number_format($invoice->sub_total, 0, ',', '.') }} đ
Giảm giá -{{ number_format($invoice->discount_amount, 0, ',', '.') }} đ
Thuế {{ number_format($invoice->tax, 0, ',', '.') }} đ
Tổng cộng {{ number_format($invoice->total, 0, ',', '.') }} đ
@if($invoice->note)
Ghi chú: {{ $invoice->note }}
@endif