@php $counter_key = 0; @endphp @foreach($data['item'] as $item_key => $item_value) @php $counter_key += 1; @endphp @endforeach @if($data['invoice']['total_tax'] != 0) @php $counter_key += 1; @endphp @endif @if($data['invoice']['additional_percentage_amount'] != 0) @php $counter_key += 1; @endphp @endif @if($data['invoice']['additional_fixed_amount'] != 0) @php $counter_key += 1; @endphp @endif @if($data['invoice']['payment_gateway_tax'] != 0) @php $counter_key += 1; @endphp @endif {{-- --}}