EVOLUTION-NINJA
Edit File: preview_indent.php
<?php $this->load->view('includes/header.php')?> <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 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="text-align: right;"> <button class="btn btn-success btn-lg" type="button" id="booking_print" style=" margin-left: 1000px; margin-right: 15px; padding-top: 2px; padding-bottom: 3px; padding-left: 15px; padding-right: 15px; background: rgb(72,91,127); color: white; border: initial !important; font-size: 22px;"> Print </button> <span class="close-right" ><a href="<?php echo site_url('indent');?>" style="font-size: 22px;border: 1px solid;margin-left: 0px;margin-right: 15px;padding-top: 2px;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 7px;text-decoration:none;">Back</a></span> </div> --> <div class="" style="float: right;margin-top: 20PX;margin-right: 80px;"> <button class="btn" type="button" id="booking_print" style="background: #405189; color: white;">Print</button> <button class="btn close-right" style="background: #9e9e9e52;"><a href="<?php echo site_url('indent'); ?>">Back</a></button> </div> <div class="content-wrapper" id="print_report"> <section class="part_main"> <div class="container"> <h4 style="text-align: center;">Indent</h4> <!-- <table class="table row2" width="100%"> --> <tr> <div class="row"> <div class="from-swan col-sm-8" style="float: left;"> <!-- <p style="font-size: 12px;">From:</p> --> <!-- <p class="" style="font-weight:900;font-size:25px;font-style:Akashi !important;">MMG-INDUSTRIES</p> --> <!-- <p><?php echo $indent_data->department_name; ?></p> --> <img src="..\assets\images\mmg_logo.png" class="img-fluid d-block"> <!-- <p style="font-size: 12px;"><b>Indent No:</b></p> --> </div> <!-- class="text-center py-3" --> <div class="to-swan col-sm-4" style="float: right;"> <!-- <p>To,</p> --> <!-- <div style="margin-left: 5%;"> --> <p style="margin-bottom: 0px!important;font-size: 12px;"><b>Indent No:</b><?php echo $indent_data->indent_no; ?></p> <p style="font-size: 12px;margin-bottom: 0px!important;"><b>Location:</b>MMG CONSTRUCTION LLP</p> <p style="margin-bottom: 0px!important;font-size: 12px;"><b>Indented by:</b>Jayaram<span style="padding-left: 10px;margin-bottom: 0px!important;"><b>Indented Date:</b>06-10-2020</span></p> <p style="margin-bottom: 0px !important;font-size: 12px;"><b>Approved By:</b>Yet to be approved<span style="padding-left: 15px;margin-bottom: 0px !important;"><b>Date:</b></span></p> <!-- <p class="line-border" >M/s.   <span style="width: 90%;border-bottom:2px solid #000;display: inline-grid;margin-left:5px;">MMG-INDUSTRIES</span></p> <p class="line-border"> <span style="width: 97%;border-bottom:2px solid #000;display: inline-grid;margin-left:5px;">PURCHASE DEPT/HQ</span></p> <p class="date-span" style="text-align:right;">Date : <span style="display: inline-grid;border-bottom:2px dotted #000;margin-right: 15px;"><?php echo $indent_data->created_at; ?></span></p> --> <!-- <?php echo $date = new DateTime($indent_data->created_at); echo $date->format('d-m-Y'); ?> --> <!-- </div> --> </div> </div> </tr> </div> </table> <div class="clearfix"></div> <div class="table table-responsive"> <!-- <p class="long-span" style="display: inline-grid;margin-right: 15px; padding-top: 20px;font-size: 12px;">Please arrange to procure and supply the following materials. </p> --> <table border="1" width="100%" style="border-spacing:0;margin-top: 1%;" cellpadding="5px"> <tr> <td style="width: 5%;font-size: 12px;font-weight: bold;">SI.<br>No.</td> <td style="width: 20%;font-size: 12px;font-weight: bold;">Product Type</td> <td style="width: 10%;font-size: 12px;font-weight: bold;">Product</td> <td style="width: 10%;font-size: 12px;font-weight: bold;">Quantity<br>Required</td> <td style="width: 10%;font-size: 12px;font-weight: bold;">Required<br>on or before</td> <td style="width: 15%;font-size: 12px;font-weight: bold;">Consumed At</td> <td style="width: 15%;font-size: 12px;font-weight: bold;">Layout</td> <td style="width: 15%;font-size: 12px;font-weight: bold;">Site</td> </tr> <?php $i=1;?> <?php if(isset($indent)) { foreach($indent as $value) {?> <tr style="height:30px;font-size: 12px;"> <td><?php echo $i; ?></td> <td><?php echo $value->product_group_name; ?></td> <td><?php echo $value->product_name; ?></td> <td><?php echo $value->quantity." ".$value->unit_name; ?></td> <td><?php echo date("d-m-Y", strtotime($value->required_on_or_before));?></td> <td><?php echo $value->consumed; ?></td> <td><?php if(!empty($value->layout)){ echo $value->layout;} ?></td> <td><?php if(!empty($value->site_home)){ echo $value->site_home; } ?></td> </tr> <?php $i++;} } ?> <!-- <?php $date = new DateTime($indent->required_on_or_before); echo $date->format('d-m-Y'); ?> --> </table> <p style="text-align: right;margin-top: 10px!important;">For MMG CONSTRUCTION LLP</p> <p style="text-align: right;margin-top: 30px!important;"><b>Authorised Signature</b></p> </div> <div class="row1"> <!-- <div style="width:30%; float:left; "> <p></p> <p style="margin-top: 30px;">Approved By : <?php if($indent_data->approved_by == '' || $indent_data->approved_by == 0) { echo "Yet to be approved";} else { echo $indent_data->roles;} ?></p> <p >Approved Date : <?php echo $indent_data->approved_date;/*echo $date = new DateTime($indent_data->approved_date); echo $date->format('d-m-Y');*/ ?></p> </div> --> <div style="width:40%; float:left;"> <p></p> </div> <div style="width:30%; float:right; text-align:center;"> <!-- <p style="margin-top: 30px;"></p> <p></p> <p>Indented By : <?php echo $indent_data->roles; ?></p> <p>Indented Date : <?php echo $indent_data->created_at;/*echo $date = new DateTime($indent_data->created_at); echo $date->format('d-m-Y');*/ ?></p> --> </div> </div> <!-- <table class="table table-bordered table-sm mt-3"> <tr> <th colspan="7" class="border-dark" style="text-align: center;">Employees Present</th> </tr> <tr> <th class="border-dark">Employee ID </th> <th class="border-dark">Employee Name</th> <th class="border-dark">Entry Date & Time</th> <th class="border-dark">Latitude-Longitude</th> <th class="border-dark">Exit Date & Time</th> <th class="border-dark">Total Working Hours</th> <th class="border-dark">Image</th> </tr> <?php if(!empty($attendance)) { foreach ($attendance as $value) { ?> <tr> <td class="border-dark"><?php echo $value->employee_id; ?></td> <td class="border-dark"><?php echo $value->first_name.' '.$value->last_name; ?></td> <td class="border-dark"><?php echo $value->entry_date.' '.$value->entry_time; ?></td> <td class="border-dark"><?php echo "(".$value->entry_latitude.','.$value->entry_longitude.")"; ?></td> <td class="border-dark"><?php echo $value->exit_date.' '.$value->exit_time; ?></td> <td class="border-dark"><?php echo $value->working; ?></td> <td class="border-dark"><img src="<?php echo base_url('uploads/'); ?>/<?php echo $value->entry_image; ?>" ></td> </tr> <?php } } //else { ?> </table> --> </div> </section> </div> <!--- content-wrapper ----> </div> <!----- wrapper -----> </div> <script type="text/javascript"> $(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> .skin-blue .wrapper, .skin-blue .left-side { background-color: #ffffff !important; } .skin-blue .main-sidebar { background-color: #e6e6e6 !important; } .from-swan { width:50%; } .to-swan { width:50%; } .long-span { width:70%; } @media only screen and (min-width:320px) and (max-width:640px) { .content-wrapper { overflow-x:scroll !important; } .from-swan { width:180px; } .to-swan { width:370px; } .row2 { width:600px !important; border: none !important; } .long-span { width:350px; } } @media only screen and (min-width:641px) and (max-width:991px) { .form-group label{ padding-left:20px !important; } .content-wrapper { overflow-x:scroll !important; } } .body-middle { padding-top: 20px; padding-left: 20px; padding-right: 20px; } .logo { font-size: 25px; font-style: italic; font-weight: bold; margin-bottom: -3px; margin-top: -5px; } .row2 { width:100%; clear:both; padding-top:15px; padding-bottom:15px; } .clearfix { clear:both; } .long-span1 span { width:98%; display: inline-grid; border-bottom:2px dotted #000; margin-right: 15px; padding-top:10px; } table { width:100%; } table, td { border-collapse: collapse; } table td { text-align:left !important; } .row1 { width:100%; clear:both; } h3 { margin-top: 0px !important; margin-bottom: 10px; } .date-span span { width: 18% !important; display: inline-grid; border-bottom: 2px dotted #000; margin-right: 15px; } table { border-collapse: collapse !important; } table, th, td { border: 1px solid black !important; } #print_report{ padding-bottom: 70px; } </style> <?php $this->load->view('includes/footer.php')?>