@if($invoice->discount_per_item === 'NO') @else @endif @if($invoice->discount_per_item === 'YES') @endif @php $index = 1 @endphp @foreach ($invoice->items as $item) @if($invoice->discount_per_item === 'YES') @endif @php $index += 1 @endphp @endforeach
#ItemsItemsQuantity PriceDiscountAmount
{{$index}} {{ $item->name }}
{{ $item->description }}
{{$item->quantity}} {{$item->price/100}} @if($item->discount_type === 'fixed') {{$item->discount_val/100}} @endif @if($item->discount_type === 'percentage') {{$item->discount}}% @endif {{$item->total/100}}
@if ($invoice->tax_per_item === 'YES') @for ($i = 0; $i < count($labels); $i++) @endfor @else @foreach ($invoice->taxes as $tax) @endforeach @endif @if ($invoice->discount_per_item === 'NO') @endif
Subtotal {!! format_money_pdf($invoice->sub_total) !!}
{{$labels[$i]}} {!! format_money_pdf($taxes[$i]) !!}
{{$tax->name.' ('.$tax->percent.'%)'}} {!! format_money_pdf($tax->amount) !!}
Discount ({{$invoice->discount}}%) @if($invoice->discount_type === 'fixed') {!! format_money_pdf($invoice->discount_val) !!} @endif @if($invoice->discount_type === 'percentage') {!! format_money_pdf($invoice->discount_val) !!} @endif
{!! format_money_pdf($invoice->total)!!}