@php
    function warna($w)
    {
        if ($w == 1) {
            $isi = 'bg-primary';
        } elseif ($w == 2) {
            $isi = 'bg-danger';
        } elseif ($w == 3) {
            $isi = 'bg-success';
        } elseif ($w == 4) {
            $isi = 'bg-warning';
        } elseif ($w == 5) {
            $isi = 'bg-info';
        }
        return $isi;
    }
@endphp
@forelse ($transaksi as $t)
    <div class="progress-group">
        {{ $t->nm }}
        <span class="float-right"><b>
                {{ number_format($t->jml, 0, ',', '.') }}</b>/{{ number_format($item->jml, 0, ',', '.') }}</span>
        <div class="progress progress-sm">
            <div class="progress-bar bg-danger" style="width: {{ ($t->jml / $item->jml) * 100 }}%"></div>
        </div>
    </div>
@empty
    <div class="progress-group">
        -
        <span class="float-right"><b>0</b>/0</span>
        <div class="progress progress-sm">
            <div class="progress-bar bg-primary" style="width: 0%"></div>
        </div>
    </div>
    <!-- /.progress-group -->

    <div class="progress-group">
        -
        <span class="float-right"><b>0</b>/0</span>
        <div class="progress progress-sm">
            <div class="progress-bar bg-danger" style="width: 0%"></div>
        </div>
    </div>

    <!-- /.progress-group -->
    <div class="progress-group">
        <span class="progress-text">-</span>
        <span class="float-right"><b>0</b>/0</span>
        <div class="progress progress-sm">
            <div class="progress-bar bg-success" style="width: 0%"></div>
        </div>
    </div>

    <!-- /.progress-group -->
    <div class="progress-group">
        -
        <span class="float-right"><b>0</b>/0</span>
        <div class="progress progress-sm">
            <div class="progress-bar bg-warning" style="width: 0%"></div>
        </div>
    </div>

    <div class="progress-group">
        -
        <span class="float-right"><b>0</b>/0</span>
        <div class="progress progress-sm">
            <div class="progress-bar bg-info" style="width: 0%"></div>
        </div>
    </div>
@endforelse
