{{-- Inset lives on this div, not on the table: the table sets border-collapse: collapse, and padding does not apply to a table in that mode. dompdf applies it anyway, Chromium follows the spec. The hr and the totals block below carry their own insets already. --}}
| # | @lang('pdf_items_label') | @foreach($customFields as $field){{ $field->label }} | @endforeach@lang('pdf_quantity_label') | @lang('pdf_price_label') | @if($invoice->discount_per_item === 'YES')@lang('pdf_discount_label') | @endif @if($invoice->tax_per_item === 'YES')@lang('pdf_tax_label') | @endif@lang('pdf_amount_label') |
|---|---|---|---|---|---|---|---|
| {{$index}} |
{{ $item->name }} {!! nl2br(htmlspecialchars($item->description)) !!} |
@foreach($customFields as $field)
{{ $item->getCustomFieldValueBySlug($field->slug) }} | @endforeach{{$item->quantity}} @if($item->unit_name) {{$item->unit_name}} @endif | {!! format_money_pdf($item->price, $invoice->customer->currency) !!} | @if($invoice->discount_per_item === 'YES')@if($item->discount_type === 'fixed') {!! format_money_pdf($item->discount_val, $invoice->customer->currency) !!} @endif @if($item->discount_type === 'percentage') {{$item->discount}}% @endif | @endif @if($invoice->tax_per_item === 'YES'){!! format_money_pdf($item->tax, $invoice->customer->currency) !!} | @endif{!! format_money_pdf($item->total, $invoice->customer->currency) !!} |
| @lang('pdf_subtotal') | {!! format_money_pdf($invoice->sub_total, $invoice->customer->currency) !!} |
| @if($invoice->discount_type === 'fixed') @lang('pdf_discount_label') @endif @if($invoice->discount_type === 'percentage') @lang('pdf_discount_label') ({{$invoice->discount}}%) @endif | @if($invoice->discount_type === 'fixed') {!! format_money_pdf($invoice->discount_val, $invoice->customer->currency) !!} @endif @if($invoice->discount_type === 'percentage') {!! format_money_pdf($invoice->discount_val, $invoice->customer->currency) !!} @endif |
| @lang('pdf_net_total') | {!! format_money_pdf($invoice->sub_total - $invoice->discount - $invoice->tax, $invoice->customer->currency) !!} |
| @if($tax->calculation_type === 'fixed') {{$tax->name }} ({!! format_money_pdf($tax->fixed_amount, $invoice->customer->currency) !!}) @else {{$tax->name.' ('.$tax->percent.'%)'}} @endif | {!! format_money_pdf($tax->amount, $invoice->customer->currency) !!} |
| @if($tax->calculation_type === 'fixed') {{$tax->name }} ({!! format_money_pdf($tax->fixed_amount, $invoice->customer->currency) !!}) @else {{$tax->name.' ('.$tax->percent.'%)'}} @endif | {!! format_money_pdf($tax->amount, $invoice->customer->currency) !!} |
| @lang('pdf_total') | {!! format_money_pdf($invoice->total, $invoice->customer->currency)!!} |
| @lang('pdf_amount_credited') | {!! format_money_pdf($creditedTotal, $invoice->customer->currency)!!} |
| @lang('pdf_amount_paid') | {!! format_money_pdf($amountPaid, $invoice->customer->currency)!!} |
| @lang('pdf_amount_due') | {!! format_money_pdf($invoice->due_amount, $invoice->customer->currency)!!} |