<html>
<head>
    <title><?php echo @$title ?></title>
    <style type="text/css">
    body {
        font-family: tahoma;
        font-size: 8pt;
    }
    hr { 
        display: block;
        margin-top: 0.5em;
        margin-bottom: 0.5em;
        margin-left: auto;
        margin-right: auto;
        border-style: inset;
        border-width: 1px;
    } 
    .container {
        padding: 10px 15px 10px 15px;
        aspect-ratio: 100 / 29;
    }
    .tabelku {
        width: 100%;
        font-size: 10pt;
        font-family: calibri;
    }
    .tabelku  td {
        padding-left:5px;
        border-bottom: 1px double black;
        border-left: 1px double black;
        border-right: 1px double black;
    }
    </style>
</head>
<body class="struk" onload="printOut()">
<center>
    <h2>STOK OPNAME</h2>
</center>
<div class="container">
    <table border="0" class="tabelku" width="100%">
    <tr>
        <td  width="35%">Tanggal Proses Stok Opname</td>
        <td width="2%">:</td>
        <td><?php echo @$tanggal ?></td>
    </tr>
    <table>
    <hr>
    <table class="tabelku" border="0">
    <thead>
    <tr>
        <th width="4%">No.</th>
        <th>Kode Barang</th>
        <th>Nama Barang</th>
        <th>Satuan</th>
        <th>Stok Gudang</th>
        <th>Stok Display</th>
        <th>Total</th>
    </tr>
    </thead>
    <tbody>
    <?php
    $no=1;
    foreach ($arrbarang as $key => $value) {
        ?>
        <tr>
            <td><?php echo $no ?></td>
            <td><?php echo $key ?></td>
            <td><?php echo $value['nama'] ?></td>
            <td><?php echo $value['satuan'] ?></td>
            <td align="center"></td>
            <td align="center"></td>
            <td align="center"></td>
        </tr>
        <?php
        $no++;
    }
    ?>
    </tbody>
    </table>
</div>
<script type="text/javascript">
    window.print();
</script>
</body>
</html>