<!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: 15px;
    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" style="width:150px;">

            <h3 class="centered">QUARANTINE</h3>
            <hr></hr>
            <p class="description" style="text-align: center;">Lot #: <?php echo $get_dc_qurantine[0]['lot_no'];
                                                  ?></p>
            <p class="description" style="text-align: center;">Date: <?php $date = $get_dc_qurantine[0]['created'];
                                                 echo date("d-m-Y", strtotime($date)); ?></p>
            <p class="description" style="text-align: center;">Challan: <?php echo $get_dc_qurantine[0]['dc_no']; ?></p>
             <p class="description" style="text-align: center;">P.O: <?php echo po_number($get_dc_qurantine[0]['po_id']); ?></p>
            <table>
                <thead>
                    <tr >
                        <th class="description">Supplier</th>
                      
                      
                        <th class="description" >Item</th>
                         
                          <th class="description">QTY</th>
                         
                        
                    </tr>
                </thead>
                <tbody>
                    
                    <tr>
                       
                        <td class="description" style="text-align: center; font-size:12px;"><?php  echo vendor($get_dc_qurantine[0]['vendor_id']); ?></td>
                         
                        <td class="description" style="text-align: center;"><?php if($get_dc_qurantine[0]['product_id'] ==0){  echo material_name($get_dc_qurantine[0]['material_id']); }else if($get_dc_qurantine[0]['material_id']==0){ ?></td>
                        <td class="description" style="text-align: center;"><?php echo product_name($get_dc_qurantine[0]['product_id']); } ?></td>
                   
                       <td class="description" style="text-align: center;"><?php echo $get_dc_qurantine[0]['qty']; ?></td>
                    </tr>


                  
                    <!-- <tr>
                        <td class="quantity"></td>
                        <td class="description">TOTAL</td>
                        <td class="price"><?php //echo $sum; ?></td>
                    </tr> -->
                </tbody>
            </table>
           <br>GRN #:<?php echo $get_dc_qurantine[0]['grn_no']; ?></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>
