<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <link rel="stylesheet" href="style.css">
        <title>Rizwan</title>
        <style>
            
            * {
    font-size: 20px;
    font-family: 'Times New Roman';
}

td,
th,
tr,
table {
    border-top: 1px solid black;
    border-collapse: collapse;
}

td.description,
th.description {
    width: 75px;
    max-width: 75px;
}

td.quantity,
th.quantity {
    width: 40px;
    max-width: 40px;
    word-break: break-all;
}

td.price,
th.price {
    width: 75px;
    max-width: 75px;
    
}

.centered {
    text-align: center;
    align-content: center;
}

.ticket {
    width: 235px;
    max-width: 235px;
}

img {
    max-width: inherit;
    width: inherit;
}

@media print {
    .hidden-print,
    .hidden-print * {
        display: none !important;
    }
}
        </style>
    </head>
    <body>
        <div class="ticket">
            <img src="<?php echo base_url();?>assets/logo.png" alt="Logo">

            <p class="centered">RECEIPT</p>
               <p class="centered"><?php 
                    echo date('h:i:s a d/m/Y', strtotime($all_waste[0]['created']));
                 ?></p>
            <p class="centered"><b>Waste Lot# <?php echo $all_waste[0]['wast_lot']; ?>.</b></p>
            <table>
                <thead>
                    <tr>
                       <th class="description">Code</th>
                        <th class="description">Material</th>
                         <th class="description">Qty</th>
                        
                    </tr>
                </thead>
                <tbody>
                    <?php //if(!empty($get_pro_sales)){ 
                       // $sum =0;
                        //foreach ($get_pro_sales as $value) { ?>
                    <tr>
                       
                        <td class="description"><?php  echo material_codess($all_waste[0]['material_id']); ?></td>
                         <td class="description"><?php echo material_name($all_waste[0]['material_id']); ?></td>
                        <td class="description"><?php echo $all_waste[0]['qty']; ?> KG</td>
                       
                    </tr>


                   <?php //$sum+=$value['amount']; }} ?>
                    <!-- <tr>
                        <td class="quantity"></td>
                        <td class="description">TOTAL</td>
                        <td class="price"><?php //echo $sum; ?></td>
                    </tr> -->
                </tbody>
            </table>
            <!--<p class="centered">
                <br>www.rizwanassociate.com</p>-->
        </div>
        <button id="btnPrint" class="hidden-print">Print</button>
        <script src="script.js"></script>
    </body>
    <script type="text/javascript">
    const $btnPrint = document.querySelector("#btnPrint");
$btnPrint.addEventListener("click", () => {
    window.print();
});
</script>
</html>
