@if($estimate->discount_per_item === 'YES') @endif @php $index = 1 @endphp @foreach ($estimate->items as $item) @if($estimate->discount_per_item === 'YES') @endif @php $index += 1 @endphp @endforeach
# Items Quantity PriceDiscountAmount
{{$index}} {{ $item->name }}
{!! nl2br(htmlspecialchars($item->description)) !!}
{{$item->quantity}} {!! format_money_pdf($item->price, $estimate->user->currency) !!} @if($item->discount_type === 'fixed') {!! format_money_pdf($item->discount_val, $estimate->user->currency) !!} @endif @if($item->discount_type === 'percentage') {{$item->discount}}% @endif {!! format_money_pdf($item->total, $estimate->user->currency) !!}

@if ($estimate->tax_per_item === 'YES') @for ($i = 0; $i < count($labels); $i++) @endfor @else @foreach ($estimate->taxes as $tax) @endforeach @endif @if ($estimate->discount_per_item === 'NO') @endif
Subtotal {!! format_money_pdf($estimate->sub_total, $estimate->user->currency) !!}
{{$labels[$i]}} {!! format_money_pdf($taxes[$i], $estimate->user->currency) !!}
{{$tax->name.' ('.$tax->percent.'%)'}} {!! format_money_pdf($tax->amount, $estimate->user->currency) !!}
@if($estimate->discount_type === 'fixed') Discount @endif @if($estimate->discount_type === 'percentage') Discount ({{$estimate->discount}}%) @endif @if($estimate->discount_type === 'fixed') {!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!} @endif @if($estimate->discount_type === 'percentage') {!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!} @endif
Total {!! format_money_pdf($estimate->total, $estimate->user->currency)!!}