@foreach($customFields as $field) @endforeach @if($invoice->discount_per_item === 'YES') @endif @if($invoice->tax_per_item === 'YES') @endif @php $index = 1 @endphp @foreach ($invoice->items as $item) @foreach($customFields as $field) @endforeach @if($invoice->discount_per_item === 'YES') @endif @if($invoice->tax_per_item === 'YES') @endif @php $index += 1 @endphp @endforeach
# @lang('pdf_items_label'){{ $field->label }}@lang('pdf_quantity_label') @lang('pdf_price_label')@lang('pdf_discount_label')@lang('pdf_tax_label')@lang('pdf_amount_label')
{{$index}} {{ $item->name }}
{!! nl2br(htmlspecialchars($item->description)) !!}
{{ $item->getCustomFieldValueBySlug($field->slug) }} {{$item->quantity}} @if($item->unit_name) {{$item->unit_name}} @endif {!! format_money_pdf($item->price, $invoice->customer->currency) !!} @if($item->discount_type === 'fixed') {!! format_money_pdf($item->discount_val, $invoice->customer->currency) !!} @endif @if($item->discount_type === 'percentage') {{$item->discount}}% @endif {!! format_money_pdf($item->tax, $invoice->customer->currency) !!} {!! format_money_pdf($item->total, $invoice->customer->currency) !!}

@if($invoice->discount > 0) @if ($invoice->discount_per_item === 'NO') @endif @endif @if ($invoice->tax_per_item === 'YES') @foreach ($taxes as $tax) @endforeach @else @foreach ($invoice->taxes as $tax) @endforeach @endif
@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
{{$tax->name.' ('.$tax->percent.'%)'}} {!! format_money_pdf($tax->amount, $invoice->customer->currency) !!}
{{$tax->name.' ('.$tax->percent.'%)'}} {!! format_money_pdf($tax->amount, $invoice->customer->currency) !!}
@lang('pdf_total') {!! format_money_pdf($invoice->total, $invoice->customer->currency)!!}