EVOLUTION-NINJA
Edit File: dyed_preview.php
<?php //include("menu.php"); error_reporting(E_ALL); ?> <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/css/avinash.min.css" > <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/css/skin-blue.min.css" > <link rel='shortcut icon' type='image/x-icon' href="<?php echo base_url(); ?>assets/images/samll-big.png"/> <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=" 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> <?php if($rec == '0') { ?> <?php if($indent_p == 'indent_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('stock/yarn_dyed_stock_grid?prop_id=1');?>" style="font-size: 22px;border: 1px solid;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 7px;text-decoration:none;">Back</a></span> <?php } else if($indent_p == 'today_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('stock/yarn_dyed_stock_grid?prop_id=2');?>" style="font-size: 22px;border: 1px solid;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 7px;text-decoration:none;">Back</a></span> <?php } else if($indent_p == 'monthly_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('stock/yarn_dyed_stock_grid?prop_id=3');?>" style="font-size: 22px;border: 1px solid;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 7px;text-decoration:none;">Back</a></span> <?php } else if($indent_p == 'year_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('stock/yarn_dyed_stock_grid?prop_id=4');?>" style="font-size: 22px;border: 1px solid;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 7px;text-decoration:none;">Back</a></span> <?php } ?> <?php } else { ?> <?php if($indent_p == 'indent_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('rec_stock/yarn_dyed_rec_stock_grid?prop_id=1');?>" style="font-size: 22px;border: 1px solid;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 7px;text-decoration:none;">Back</a></span> <?php } else if($indent_p == 'today_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('rec_stock/yarn_dyed_rec_stock_grid?prop_id=2');?>" style="font-size: 22px;border: 1px solid;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 7px;text-decoration:none;">Back</a></span> <?php } else if($indent_p == 'monthly_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('rec_stock/yarn_dyed_rec_stock_grid?prop_id=3');?>" style="font-size: 22px;border: 1px solid;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 7px;text-decoration:none;">Back</a></span> <?php } else if($indent_p == 'year_preview') { ?> <span class="close-right" ><a href="<?php echo base_url('rec_stock/yarn_dyed_rec_stock_grid?prop_id=4');?>" style="font-size: 22px;border: 1px solid;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 7px;text-decoration:none;">Back</a></span> <?php } ?> <?php } ?> </div> <div class="content-wrapper" id="print_report"> <section class="body-middle"> <?php if($rec == '0') { ?> <h3 style="text-align:center; font-weight:bold; text-transform:uppercase; text-decoration:underline;">Stock transfer</h3> <?php } else { ?> <h3 style="text-align:center; font-weight:bold; text-transform:uppercase; text-decoration:underline;">Received Stock</h3> <?php } ?> <table class="table h_table row2" width="100%"> <tr> <td class="from-swan col-sm-6"> <p>From:</p> <p class="" style="font-weight:900;font-size:25px;font-style:Akashi !important;">Deco-Textil<br/></p> </td> <td class="to-swan col-sm-6"> <p class="date-span" style="text-align:right;">Date : <span style="text-align: center; display: inline-grid; border-bottom:2px dotted #000; margin-right: 15px;"><?php echo date("d-m-Y"); ?></span></p> <p class="date-span" style="text-align:right;">Transferred Id. : <span style="text-align: left;display: inline-grid; border-bottom: 0px dotted #000 !important;">   <?php echo $fetch->transfer_id; ?></span></p> </td> </tr> </table> <div class="clearfix"></div> <div class="table table-responsive"> <br/> Following order has been transferred. <table border="1" style="width:100%;border-spacing:0;margin-top: 1%;" cellpadding="5px"> <tr> <td style="width: 5%;">SI.<br>No.</td> <td style="width: 22%;">Product Type</td> <td style="width: 12%;">Product Location</td> <td style="width: 10%;">Transferred Location</td> <td style="width: 15%;">Transferred By</td> <td style="width: 18%;">Transferred Date</td> <td style="width: 18%;">Remarks</td> </tr> <?php $i=1;?> <?php if(isset($fetch)) {?> <tr style="height:30px;"> <td style="text-transform: uppercase !important"><?php echo $i; ?></td> <td style="text-transform: uppercase !important"><?php echo $fetch->product_type; ?></td> <td><?php echo $fetch->product_location; ?></td> <td><?php echo $fetch->transfer_location; ?></td> <td><?php echo $fetch->transfer_by; ?></td> <td style="text-transform: uppercase !important"><?php echo $fetch->transfer_date; ?></td> <td><?php echo $fetch->remarks; ?></td> </tr> <?php $i++;} ?> </table> </div> <div class="table table-responsive"> <table border="1" style="width:100%;border-spacing:0;margin-top: 1%;" cellpadding="5px"> <tr> <td style="width: 5%;">SI.<br>No.</td> <td style="width: 18%;">Purpose</td> <td style="width: 15%;">Yarn Name</td> <td style="width: 18%;">Yarn Denier</td> <td style="width: 35%;">Yarn Specification</td> <td style="width: 15%;">DTL Shade</td> <td style="width: 15%;">Shade</td> <td style="width: 15%;">Color Code</td> <td style="width: 15%;">Lot</td> <td style="width: 18%;">Bale</td> <td style="width: 18%;">Gross Weight</td> <td style="width: 18%;">Net Weight</td> <td style="width: 18%;">Transferred Net Weight</td> <!--<td style="width: 18%;">Balanced Net Weight</td>--> <td style="width: 30%;">Received Net Weight</td> <?php if($rec == '1') { ?> <td style="width: 15%;">Received By</td> <td style="width: 18%;">Received Date</td> <?php } ?> </tr> <?php $i=1;?> <?php if(isset($fetch_data)) { foreach($fetch_data as $fetch_data) {?> <tr style="height:30px;"> <td style="text-transform: uppercase !important"><?php echo $i; ?></td> <td style="text-transform: uppercase !important"><?php echo $fetch_data->purpose; ?></td> <td><?php echo $fetch_data->yarnname; ?></td> <td><?php echo $fetch_data->yarndenier; ?></td> <td style="text-transform: uppercase !important"><?php echo $fetch_data->yarnspec; ?></td> <td><?php echo $fetch_data->ssl_shade; ?></td> <td><?php echo $fetch_data->shade; ?></td> <td><?php echo $fetch_data->color_code; ?></td> <td><?php echo $fetch_data->lot; ?></td> <td><?php echo $fetch_data->bale; ?></td> <td><?php echo $fetch_data->gross; ?></td> <td><?php echo $fetch_data->net_weight; ?></td> <td><?php echo $fetch_data->issue_net_weight; ?></td> <!--<td><?php //echo $fetch_data->bal_net_weight; ?></td>--> <td><?php echo $fetch_data->rec_net_wt; ?></td> <?php if($rec == '1') { ?> <td><?php echo $fetch_data->rec_by; ?></td> <td><?php echo $fetch_data->rec_date; ?></td> <?php } ?> </tr> <?php $i++;} } ?> <tr> <td colspan="16" style="border-bottom:1px solid transparent !important;border: transparent !important;text-align: right;"> <span style="margin-right: 12px;"><?php echo 'Total Transferred Net Weight: ' . ' '. number_format($rec_wei->issue_net_weight, 2, '.', ','); ?></span> </td> </tr> </table> </div> </section> </div> </div> <!--- content-wrapper ----> </div> <!----- wrapper --> </div> <?php function convert_number_to_words($no) { //$no = round($number); //alert(); $hundred = null; $digits_1 = strlen($no); $i = 0; $str = array(); $words = array('0' => '', '1' => 'One', '2' => 'Two', '3' => 'Three', '4' => 'Four', '5' => 'Five', '6' => 'Six', '7' => 'Seven', '8' => 'Eight', '9' => 'Nine', '10' => 'Ten', '11' => 'Eleven', '12' => 'Twelve', '13' => 'Thirteen', '14' => 'Fourteen', '15' => 'Fifteen', '16' => 'Sixteen', '17' => 'Seventeen', '18' => 'Eighteen', '19' =>'Nineteen', '20' => 'Twenty', '30' => 'Thirty', '40' => 'Forty', '50' => 'Fifty', '60' => 'Sixty', '70' => 'Seventy', '80' => 'Eighty', '90' => 'Ninety'); $digits = array('', 'Hundred', 'Thousand', 'Lakh', 'Crore'); while ($i < $digits_1) { $divider = ($i == 2) ? 10 : 100; $number = floor($no % $divider); $no = floor($no / $divider); $i += ($divider == 10) ? 1 : 2; if ($number) { $plural = (($counter = count($str)) && $number > 9) ? 's' : null; $hundred = ($counter == 1 && $str[0]) ? ' And ' : null; $str [] = ($number < 21) ? $words[$number] . " " . $digits[$counter] . $plural . " " . $hundred : $words[floor($number / 10) * 10] . " " . $words[$number % 10] . " " . $digits[$counter] . $plural . " " . $hundred; } else $str[] = null; } $str = array_reverse($str); $result = implode('', $str); return $result ; } ?> <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> .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; } .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: 2px solid black; border-collapse: collapse; } table td { text-align:center; } .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; } .h_table{ border:none !important; } .h_table td{ border:none !important; text-align: left !important; } </style>