<table>
    <thead>
        <tr></tr>
    </thead>
    <tbody>
        <td></td>
    </tbody>
</table>

<table>
    <thead>
        <tr>
            <th>#</th>
            <th>Code</th>
            <th>Barcode</th>
            <th>Name</th>
            <th>Price</th>
            <th>OnHand</th>
            <th>Opname</th>
            <th>Difference</th>
        </tr>
    </thead>

    <tbody >
        @foreach($opnames as $key => $opname)
        <tr>
            <th>{{ $key + 1 }}</td>
            <td>{{ $opname->code }}</td>
            <td>{{ $opname->barcode }}</td>
            <td>{{ $opname->name }}</td>
            <td>{{ number_format($opname->price) }}</td>
            <td>{{ number_format($opname->onhand) }}</td>
            <td>{{ number_format($opname->opname) }}</td>
            <td>{{ number_format($opname->difference) }}</td>
        </tr>
        @endforeach
    </tbody>
</table>

