<div class="table col-md-12" id="result">

    {{-- <div class="table-responsive"> --}}
    <table class="table" >
        <thead class="table-dark">
            <tr>

                <td>Item Name</td>
                <td>Added By</td>
                <td>Approve By</td>
                <td>Client Info</td>
                <td>Quantity</td>
                <td>Status</td>
            </tr>
        </thead>

        <tbody>
            @php

            @endphp
            @foreach ($return_items as $key => $value)
                <tr>
                    @php
                    @endphp
                    <td>{{ $value->item->name  ?? ""}}</td>
                    <td>{{ $value->addedBy->name ?? ""}}</td>
                    <td>{{ $value->approvedBy->name ?? ""}}</td>
                    <td>{{ $value->client->userid }}</td>
                    <td>{{ $value->quantity }}</td>
                    <td>{{ $value->status }}</td>

                </tr>
            @endforeach

        </tbody>
        <tfoot>
            <tr>
                <td colspan="2"></td>
                <td style="font-size: 25px;"> <span class="badge bg-primary"> Total : {{ $return_items->sum('quantity') }}</span> </td>
                <td style="font-size: 20px;">
                    <span class="badge bg-success">Good : {{$return_items->where('status',"Good")->sum('quantity')}}</span>
                    <span class="badge bg-warning">Damage : {{$return_items->where('status',"Damage")->sum('quantity')}}</span>
                    <span class="badge bg-danger">Lost : {{$return_items->where('status',"Lost")->sum('quantity')}}</span>
                </td>
            </tr>
        </tfoot>
    </table>
    {{-- </div> --}}
</div>
