EVOLUTION-NINJA
Edit File: preview_inventory.php
<?php $this->load->view('includes/header.php')?> <link rel="stylesheet" href="<?php echo base_url('assets/css/jquery-ui.css');?>" /> <link rel="stylesheet" type="text/css" href="<?php echo base_url('dashboard_assets/css/main.css'); ?>" /> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <script src="<?php echo base_url('assets/js/jquery-ui.js');?>"></script> <script type="text/javascript" src="<?php echo base_url('dashboard_assets/js/popper.min.js'); ?>" ></script> <div class="page-content-wrapper"> <div class="page-content"> <div class="row" style="float: right !important;"> <div class="" style=" margin-bottom: 40px;"> <button class="btn" type="button" id="booking_print" style="background: #405189; color: white;">Print </button> <a href="<?php echo site_url('inventory'); ?>"><button class="btn" type="button" style="background: #EEEEEE; color: black;">Back </button></a> </div> </div> <div class="content-wrapper print" id="print_report" style="padding:30px; border: 1px solid #C1C1C1; margin-bottom: 20px; margin-top: 20px; padding-top:0px !important;"> <table width="100%" style="border-spacing:0;"> <tr> <td colspan="6">PO# : <?php echo $po->po_no; ?></td> <td colspan="6" style="text-align:right;"><img class="img-fluid" style="width:150px;float:right;" src="<?php echo base_url('assets/images/mmg_logo.png ');?>" alt="logo"/></td> </tr> <tr> <td colspan="6">Layout : <?php echo $po->layout_name; ?></td> <td colspan="6" style="text-align:right;"> <p style="margin:0;">MMG CONSTRUCTIONS LLP<br> #617, 1st Floor, New Kantharaja Urs Road,<br> Kuvempunagar,Chamaraja Mohalla, Mysore-23</p> <p style="margin:0;">GSTN:     PAN: </p> </td> </tr> <tr> <td colspan="6">Godown : <?php echo $po->godown_name; ?></td> <td colspan="6" style="text-align:right;">E-mail : sales@mmg_constructions.com</td> </tr> <tr> <td colspan="12"><p style="font-weight:600;text-align:center;text-decoration: underline;">INVENTORY DETAILS</p></td> </tr> </table> <table border="1" width="100%" style="border-spacing:0;margin-top: 1%; border:1px solid #C1C1C1;" cellpadding="5px"> <thead> <tr> <th>SL No.</th> <th>PRODUCT NAME</th> <th>ISSUED GOODS</th> <th>ISSUED TO SITE</th> <th>LEVEL</th> <th>ISSUED BY</th> <th>ISSUED AT</th> </tr> </thead> <tbody> <?php $i=1; if(!empty($issue_data)) { foreach($issue_data as $issue_data) { ?> <tr> <td><?php echo $i; ?></td> <td style="text-transform: uppercase !important;"><?php echo $issue_data->product_name; ?></td> <td style="text-transform: uppercase !important;white-space: nowrap;"><?php echo $issue_data->issued_goods; ?></td> <td style="text-transform: uppercase !important;white-space: nowrap;"><?php echo $issue_data->site_no; ?></td> <td style="text-transform: uppercase !important;white-space: nowrap;"><?php echo $issue_data->level_name; ?></td> <td><?php echo $issue_data->name; ?></td> <td><?php echo date('d-m-Y h:i:s a', strtotime($issue_data->issued_at)); ?></td> </tr> <?php $i++; } } else { ?> <tr> <td colspan="7" style="text-align: center;">No Product Has Been Issued Yet</td> </tr> <?php } ?> </tbody> </table> <br> <table border="1" width="100%" style="border-spacing:0;margin-top: 1%; border:1px solid #C1C1C1;" cellpadding="5px"> <thead> <tr> <th>SL No.</th> <th>PRODUCT NAME</th> <th>RETURNED GOODS</th> <th>RETURNED BY</th> <th>RETURNED AT</th> </tr> </thead> <tbody> <?php $j=1; if(!empty($return_data)) { foreach($return_data as $return_data) { ?> <tr> <td><?php echo $j; ?></td> <td style="text-transform: uppercase !important;"><?php echo $return_data->product_name; ?></td> <td style="text-transform: uppercase !important;white-space: nowrap;"><?php echo $return_data->returned_goods; ?></td> <td><?php echo $return_data->name; ?></td> <td><?php echo date('d-m-Y h:i:s a', strtotime($return_data->returned_at)) ; ?></td> </tr> <?php $j++; } } else { ?> <tr> <td colspan="5" style="text-align: center;">No Product Has Been Returned</td> </tr> <?php } ?> </tbody> </table> </div> <!--- content-wrapper ----> </div> </div> <script> $(document).ready(function(){ $("#booking_print").click(function(){ var divToPrint=document.getElementById("print_report"); newWin= window.open(""); newWin.document.write(divToPrint.outerHTML); newWin.print(); newWin.close(); }); }); </script> <style> table tr th, table tr td, table tr td p { font-size: 7px; } .logo-img { position: absolute; left:15px; top:15px; } .logo-img img { width:150px; } /*#print_report table{*/ /* border:1px solid #C1C1C1;*/ /*}*/ @media (min-width: 1200px){ .content-wrapper { max-width: 900px !important; } } </style> <?php $this->load->view('includes/footer.php')?>