@forelse ($received_accounts as $ra)
    <tr class=" text-center">
        <td class="bg-warning">{{ $loop->iteration }}</td>
        <td>
            @if($ra->payment_type=='cash')
                <span class="badge badge-info"> کیش</span>

            @endif
            @if($ra->payment_type=='opening_balance')
            <span class=""> اوپنینگ بیلنس
            </span>

            @endif

            @if($ra->payment_type=='bank')
                <span class="badge badge-warning">  بینک</span>

                {{ $ra->bank->name }}
            @endif
            @if($ra->payment_type=='on_account')
                <span class="badge badge-info"> ان اکاؤنٹ</span>
                @if($ra->party_name == 'broker')
                    {{ $ra->broker->name }}
                @endif
                @if($ra->party_name =='pump')
                    {{ $ra->pump->name }}
                @endif
                @if($ra->party_name =='cusomer')
                    {{ $ra->pump->name }}
                @endif
            @endif
        </td>
        <td>{{ date('F j,Y', strtotime($ra->received_date)) }}</td>
        <td>{{ $ra->description }}</td>
        <td>{{ number_format($ra->amount, 0) }}</td>

        <td>
            @if (auth()->user()->hasPermissionTo('edit trip oil'))

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

                <button type="button" class="btn-link delete_trip_receivings"
                        data-id="{{ $ra->id }}"><span class="text-danger">
                                            ڈیلیٹ</span></button>
            @endif
        </td>
    </tr>
@empty
    <tr>
        <td colspan="5" class="text-center">
            No Data Available
        </td>
    </tr>
@endforelse
