@forelse($trip_payables as $key => $payable)
    <tr class="">
        <td>{{$loop->iteration}}</td>
        <td>{{ $payable->broker->name }}</td>
        <td>{{date("F j, Y",strtotime($payable->date))}}</td>
        <td>{{number_format($payable->amount, 0)}}</td>

        @if ($payable->payment_type == 'cash')
        <td>کیش </td>

      @elseif ($payable->payment_type == 'bank')
      <td>بینک</td>

      @elseif ($payable->payment_type == 'in-account')
      <td>ان اکاوؑنٹ
      </td>
      @endif

      @if (isset($payable->bank->name))
      <td>{{ $payable->bank->name }}</td>
   @else
    <td></td>


  @endif

        <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
