@forelse($details as $detail)
    <tr class="">
        <td>{{$detail->from_city->name}}</td>
        <td>{{ $detail->to_city->name }}</td>
        <td>{{$detail->broker->name}}</td>
        <td>{{ $detail->item_name }}</td>
        <td>{{$detail->item_weight}}  {{ $detail->weight_type }}</td>
        <td>{{ number_format($detail->unit_rate,0) }}</td>
        <td>{{number_format($detail->bill_freight,0)}}</td>
        <td>{{number_format($detail->commission,0)}}</td>
        <td>{{number_format($detail->final_total_amount,0) }}</td>
        <td>{{number_format($detail->received_by_driver,0)}}</td>
        <td>{{ $detail->dehari }}</td>
        <td>{{ $detail->fine }}</td>
        <td>{{ $detail->final_total_amount }}</td>
        <td>
            @if (auth()->user()->hasPermissionTo('edit trip details'))
                <button type="button" class="btn-link edit_trip_detail" data-id="{{$detail->id}}">
                    <span> اپڈیٹ</span>
                </button>
            @endif
            @if (auth()->user()->hasPermissionTo('edit trip details'))
                <button type="button" class="btn-link delete_trip_detail"
                        data-id="{{ $detail->id }}">
                    <span class="text-danger">ڈیلیٹ</span></button>
            @endif
        </td>
    </tr>
@empty
    <tr>
        <td colspan="13">No Record Available</td>
    </tr>
@endforelse
