@php use App\Support\ThaiAddressHelper; $branch = $invoice->branch; $customer = $invoice->customer; $items = $invoice->items; @endphp

ใบกำกับภาษี

ออกโดย:
{{ $branch->name }}
เลขประจำตัวผู้เสียภาษี {{ $branch->tax_id ?: '-' }}
{{ $branch->address_line1 }} {{ $branch->address_line2 }}
{{ ThaiAddressHelper::getSubdistrictName($branch->subdistrict_code) }} {{ ThaiAddressHelper::getDistrictName($branch->district_code) }} {{ ThaiAddressHelper::getProvinceName($branch->province_code) }} {{ $branch->postal_code }}
โทร. {{ $branch->phone }} | อีเมล {{ $branch->email }}
ลูกค้า:
{{ $customer->name }}
เลขประจำตัวผู้เสียภาษี {{ $customer->tax_id ?: '-' }}
{{ $customer->address_line1 }} {{ $customer->address_line2 }}
{{ ThaiAddressHelper::getSubdistrictName($customer->subdistrict_code) }} {{ ThaiAddressHelper::getDistrictName($customer->district_code) }} {{ ThaiAddressHelper::getProvinceName($customer->province_code) }} {{ $customer->postal_code }}
โทร. {{ $customer->phone }} | อีเมล {{ $customer->email }}
เลขที่เอกสาร: {{ $invoice->invoice_number }} วันที่ออก: {{ optional($invoice->issue_date)->format('d/m/Y') }} ครบกำหนด: {{ optional($invoice->due_date)->format('d/m/Y') ?: '-' }}
ประเภทภาษี: {{ ($invoice->tax_type instanceof \App\Support\Enums\TaxType ? $invoice->tax_type : \App\Support\Enums\TaxType::from($invoice->tax_type))->label() }}
@foreach ($items as $index => $item) @endforeach
# รายละเอียด จำนวน ราคาต่อหน่วย รวมก่อนภาษี
{{ $index + 1 }} {{ $item->description }} {{ number_format($item->quantity, 2) }} {{ number_format($item->unit_price, 2) }} {{ number_format($item->line_total, 2) }}
@if($invoice->withholding_amount > 0) @endif
ยอดก่อนภาษี {{ number_format($invoice->sub_total, 2) }} บาท
VAT {{ number_format($invoice->vat_rate, 2) }}% {{ number_format($invoice->vat_amount, 2) }} บาท
หัก ณ ที่จ่าย {{ number_format($invoice->withholding_rate, 2) }}% -{{ number_format($invoice->withholding_amount, 2) }} บาท
ยอดสุทธิ {{ number_format($invoice->net_total, 2) }} บาท
ลงชื่อ _________________________
(ผู้รับสินค้า/บริการ)
ลงชื่อ _________________________
(ผู้ให้บริการ)