<style>
    .dis {
        display: flex;
        justify-content: center;
    }

    .box {
        border: 1px solid red;
        background-color: rgb(248, 233, 15);
        border-radius: 5px;
        padding: 5px !important;
        width: 8.7cm;
        height: 5.7cm;
        margin: 10px;
    }

    .head {
        width: 100%;
        height: 50px;
        background-color: red;
        border-bottom-right-radius: 15px;
        border-bottom-left-radius: 15px;
        text-align: center;
        position: relative;
        margin-top: -5px;
    }

    .head span {
        font-size: 30px;
        font-weight: bold;
        color: white;
    }

    .nm {
        font-size: 20px;
        font-weight: bold;
        display: flex;
        justify-content: center;
        margin-bottom: 10px;
        margin-top: 10px;
        text-transform: uppercase;
    }

    .bar {
        background-color: white;
        padding: 10px;
        /* margin-left: 20px; */
        margin-bottom: 15px;
        display: flex;
        justify-content: center;
        /* border-radius: 10px; */
    }



    .foot {
        width: 100%;
        height: 30px;
        background-color: black;
        position: relative;
        margin-bottom: -5px;
        border-top-right-radius: 10px;
        border-top-left-radius: 10px;
        text-align: center
    }

    .foot span {
        font-size: 20px;
        font-weight: bold;
        color: white;
    }
</style>
<table class="table table-sm table-bordered">
    <tr>
        <td colspan="3">
            <div class="dis">
                <div class="box">
                    <div class="head">
                        <span>MiniMarket</span>
                    </div>
                    <div class="nm">{{ $m->nm_member }}</div>
                    <div class="bar">{!! DNS1D::getBarcodeHTML($m->kd_member, 'C39', 1.5, 49) !!}</div>

                    <div class="foot">
                        <span>{{ $m->kd_member }}</span>
                    </div>
                </div>
            </div>
        </td>
    </tr>

    <tr>
        <td width="30%">Kode Member</td>
        <td width="2%">:</td>
        <td>{{ $m->kd_member }}</td>
    </tr>
    <tr>
        <td>Kode Member</td>
        <td>:</td>
        <td>{{ $m->nm_member }}</td>
    </tr>
    <tr>
        <td>Hp Member</td>
        <td>:</td>
        <td>{{ $m->hp_member }}</td>
    </tr>
    <tr>
        <td>Email Member</td>
        <td>:</td>
        <td>{{ $m->email_member }}</td>
    </tr>
    <tr>
        <td>Username</td>
        <td>:</td>
        <td>{{ $m->username }}</td>
    </tr>
    <tr>
        <td>Jml. Poin</td>
        <td>:</td>
        <td>{{ poinmasuk($m->id) - poinkeluar($m->id) }}</td>
    </tr>
    <tr>
        <td>Tukar Poin</td>
        <td>:</td>
        <td>{{ poinkeluar($m->id) }}</td>
    </tr>
    <tr>
        <td>Tgl. Daftar</td>
        <td>:</td>
        <td>{{ tgl_inf($m->created_at) }}</td>
    </tr>
    <tr>
        <td>Petugas Entry</td>
        <td>:</td>
        <td>{{ $p->user->nm_user }}</td>
    </tr>
    <tr>
        <td colspan="3" class="text-center">ALAMAT YANG DI AJUKAN</td>
    </tr>
    @foreach ($ongkirmem as $o)
        <tr>
            <td colspan="3" class="text-center">{{ $o->alamat }}</td>
        </tr>
        <tr>
            <td>Tgl. Pengajuan</td>
            <td>:</td>
            <td>{{ tgl_inf($o->created_at) }}</td>
        </tr>
        <tr>
            <td>Kode Ongkir</td>
            <td>:</td>
            <td>{{ $o->ongkir->kd_ongkir }}</td>
        </tr>
        <tr>
            <td>Berat (Kg)</td>
            <td>:</td>
            <td>{{ number_format($o->ongkir->berat, 0, ',', '.') }} Kg</td>
        </tr>
        <tr>
            <td>Harga (Kg)</td>
            <td>:</td>
            <td>Rp. {{ number_format($o->ongkir->harga, 0, ',', '.') }} </td>
        </tr>
    @endforeach
</table>
