@forelse($trip_payables as $key => $payable)
    <tr class="">
        <td>{{$loop->iteration}}</td>
        <td>
            @if($payable->ref_type =='pump')
                {{ $payable->pump->name }} &nbsp; <span class="badge badge-info badge-sm">PUMP</span>
            @endif

            @if($payable->ref_type =='workshop')
                {{ $payable->workshop->shop_name }} &nbsp; <span class="badge badge-primay badge-sm">WORKSHOP</span>
            @endif
        </td>
        <td>{{date("F j, Y",strtotime($payable->date))}}</td>
        <td>{{number_format($payable->amount, 0)}}</td> 

        <td>
            @if (auth()->user()->hasPermissionTo('edit trip oil'))
                <button type="button" class="btn-link edit_trip_payable"
                        data-id="{{ $payable->id }}"><span>
                                            اپڈیٹ</span></button>
            @endif
            @if (auth()->user()->hasPermissionTo('delete trip oil'))

                <button type="button" class="btn-link delete_trip_payable"
                        data-id="{{ $payable->id }}"><span class="text-danger">
                                            ڈیلیٹ</span></button>
            @endif
        </td>
    </tr>
@empty
    <tr>
        <td colspan="4" class="text-center">NO RECORD AVAILABLE</td>
    </tr>
@endforelse
