@php $c = $document->company; @endphp
@if($c->logo_path)@endif
{{ $c->name }}
{{ $c->address }}
{{ $c->phone }} · {{ $c->email }} · {{ $c->website }}
@if($c->tax_number)
Tax No: {{ $c->tax_number }}
@endif
{{ \App\Models\Document::typeLabel($document->type) }}
No: {{ $document->number }}
Date: {{ $document->issue_date?->format('Y-m-d') }}
@if($document->due_date)
Due: {{ $document->due_date->format('Y-m-d') }}
@endif
Bill To
{{ $document->customer->name }}
@if($document->customer->company_name)
{{ $document->customer->company_name }}
@endif
{{ $document->customer->address }}
{{ $document->customer->phone }} · {{ $document->customer->email }}
@foreach($document->items as $i => $it) @endforeach
#Product QtyUnit PriceTotal
{{ $i+1 }}
{{ $it->product_code }}
{{ $it->product_name }}
@if($it->description)
{{ $it->description }}
@endif @if($it->quantity_mode!=='pcs')
@if($it->quantity_mode==='area') {{ $it->length }} × {{ $it->width }} × {{ (int)$it->pieces }} pcs @endif @if($it->quantity_mode==='linear') {{ $it->length }} m × {{ (int)$it->pieces }} pcs @endif @if($it->quantity_mode==='volume') {{ $it->length }} × {{ $it->width }} × {{ $it->height }} × {{ (int)$it->pieces }} pcs @endif
@endif
{{ rtrim(rtrim(number_format($it->quantity,3,'.',''),'0'),'.') }} {{ $it->unit_type }} {{ number_format($it->unit_price, 2) }} {{ number_format($it->line_total, 2) }}
@if($document->discount_amount > 0) @endif @if($document->tax_amount > 0) @endif
Subtotal{{ $document->currency }} {{ number_format($document->subtotal, 2) }}
Discount @if($document->discount_type==='percent')({{ rtrim(rtrim(number_format($document->discount_value,2),'0'),'.') }}%)@endif -{{ number_format($document->discount_amount, 2) }}
Tax ({{ rtrim(rtrim(number_format($document->tax_rate,2),'0'),'.') }}%) {{ number_format($document->tax_amount, 2) }}
Total{{ $document->currency }} {{ number_format($document->total, 2) }}
@if($document->payment_terms)
Payment terms: {{ $document->payment_terms }}
@endif @if($document->notes)
Notes: {{ $document->notes }}
@endif @if($c->footer_text)
{{ $c->footer_text }}
@endif