/
home
/
sjslayjy
/
public_html
/
tabson_test
/
storage
/
framework
/
views
/
Upload File
HOME
<?php $__env->startSection('title','Customize Report'); ?> <?php $__env->startSection('style'); ?> <style type="text/css"> span.close-now { background: red; width: 25px; height: 25px; display: block; text-align: center; border-radius: 50%; padding: 3px; color: #fff; margin-top: 30px; } </style> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <div class="main-content"> <div class="main-content-inner"> <div class="breadcrumbs ace-save-state" id="breadcrumbs"> <ul class="breadcrumb"> <li> <i class="ace-icon fa fa-home home-icon"></i> <a href="#">Home</a> </li> <li class="active">Customize Report</li> </ul> </div> <div class="page-content"> <div class="row"> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">Customize Report</h3> </div> <div class="panel-body"> <form action="<?php echo e(URL('/user/customize-reports')); ?>" role="form" method="post" id="customizeReport"> <?php echo e(csrf_field()); ?> <div class="row grid-margin"> <div class="col-lg-3"> <label>Select Category</label> <select class="e1" id="categories" name="categories[]"class="form-control" multiple> <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($category->id); ?>" <?php echo e(in_array($category->id, $old_category) ? 'selected' : ''); ?>><?php echo e($category->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <div class="col-lg-3"> <label>Select Description</label> <select class="e1" id="item_description" name="items_description[]"class="form-control" multiple> <?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($item->id); ?>" <?php echo e(in_array($item->id, $old_description) ? 'selected' : ''); ?>><?php echo e($item->description); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <div class="col-lg-3"> <label>Select Department</label> <select class="e1" id="department" name="department[]"class="form-control" multiple> <?php $__currentLoopData = $departments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$department): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($department->id); ?>" <?php echo e(in_array($department->id, $old_department) ? 'selected' : ''); ?>><?php echo e($department->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <div class="row grid-margin"> <div class="col-lg-3"> <label>Select Business Unit</label> <select class="e1" id="business_unit" name="business_unit[]"class="form-control" multiple> <?php $__currentLoopData = $business_units; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$business_unit): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($business_unit->id); ?>" <?php echo e(in_array($business_unit->id, $old_business_unit) ? 'selected' : ''); ?>><?php echo e($business_unit->name); ?>(<?php echo e($business_unit->short_name); ?>)</option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <div class="col-lg-3"> <label>Select Customer</label> <select class="e1" id="customer" name="customer[]"class="form-control" multiple> <?php $__currentLoopData = $customers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$customer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($customer->id); ?>" <?php echo e(in_array($customer->id, $old_customer) ? 'selected' : ''); ?>><?php echo e($customer->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <div class="col-lg-3"> <label>Select Circle</label> <select class="e1" id="circle" name="circle[]"class="form-control" multiple> <?php $__currentLoopData = $circles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$circle): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($circle->id); ?>" <?php echo e(in_array($circle->id, $old_circle) ? 'selected' : ''); ?>><?php echo e($circle->name); ?>(<?php echo e($circle->code); ?>)</option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <div class="row grid-margin"> <div class="col-lg-3"> <label>Select Vendor</label> <select class="e1" id="vendor" name="vendor[]"class="form-control" multiple> <?php $__currentLoopData = $vendors; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$vendor): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($vendor->id); ?>" <?php echo e(in_array($vendor->id, $old_vendor) ? 'selected' : ''); ?>><?php echo e($vendor->vendor_name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <div class="col-lg-3"> <div class="form-group"> <label>Date From:<span class="text text-danger"> <b>*</b></span></label> <input type="date" id="from_date" name="from_date" placeholder="Enter from_date" class="form-control" value="<?php echo e($from_date); ?>"> <?php $__errorArgs = ['from_date']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <span class="label label-danger"><b><?php echo e($message); ?></b></span> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> </div> <div class="col-lg-3"> <div class="form-group"> <label>Date To:<span class="text text-danger"> <b>*</b></span></label> <input type="date" id="to_date" name="to_date" placeholder="Enter to_date" class="form-control" value="<?php echo e($to_date); ?>"> <?php $__errorArgs = ['to_date']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <span class="label label-danger"><b><?php echo e($message); ?></b></span> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> </div> <div class="col-lg-3" style="padding-top:20px;"> <button type="submit" id="generateCustomizeReportBtn" class="btn btn-primary float-right">Generate Report</button> <button type="button" id="generate_excel" class="btn btn-primary float-right" onclick="generateExcel()">Generate Excel</button> </div> </div> <div class="clearfix"> <div class="pull-right tableTools-container"> </div> </div> </form> </div> </div> </div> <div class="row"> <div class="table-responsive"> <table class="table table-striped table-bordered" id="myTable"> <thead> <tr> <th>Item Category</th> <th>Item Code</th> <th>Item Description</th> <th>Specification</th> <th>Make</th> <th>Department</th> <th>Business Unit</th> <th>Customer</th> <th>Circle</th> <th>PR Number</th> <th>PR Date</th> <th>PO Creater</th> <th>PO Number</th> <th>PO Date</th> <th>Vendor Name</th> <th>PO Qty</th> <th>Unit Price</th> <th>Basic Amount</th> <th>Tax %age</th> <th>Tax Amount</th> <th>Total Amount</th> </tr> </thead> <tbody> <?php if(isset($report_data)): ?> <?php $__currentLoopData = $report_data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr id="tr_<?php echo e($value->id); ?>"> <td><?php echo e($value->category_name); ?></td> <td><?php echo e($value->item_code); ?></td> <td><?php echo e($value->description); ?></td> <td><?php echo e($value->specification); ?></td> <td><?php echo e($value->make); ?></td> <td><?php echo e($value->department_name); ?></td> <td><?php echo e($value->business_name); ?></td> <td><?php echo e($value->customer_name); ?></td> <td><?php echo e($value->circle_name); ?></td> <td><?php echo e($value->pr_number); ?></td> <td><?php echo e($value->pr_date); ?></td> <td><?php echo e(getModelById('User', $value->po_created_by)->name); ?></td> <td><?php echo e($value->po_number); ?></td> <td><?php echo e($value->po_date); ?></td> <td><?php echo e($value->vendor_name); ?></td> <td><?php echo e($value->qty); ?></td> <td><?php echo e($value->rate); ?></td> <td><?php echo e($value->basic_amount); ?></td> <td><?php echo e($value->gst); ?></td> <td><?php echo e($value->tax_amount); ?></td> <td><?php echo e($value->total_amount); ?></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php else: ?> <tr> <td colspan="20">No Data Found...</td> </tr> <?php endif; ?> </tbody> </table> </div> </div> </div><!-- /.page-content --> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('script'); ?> <?php echo e(Html::script("assets/js/jquery.dataTables.min.js")); ?> <?php echo e(Html::script("assets/js/jquery.dataTables.bootstrap.min.js")); ?> <?php echo e(Html::script("assets/js/dataTables.buttons.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.flash.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.html5.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.print.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.colVis.min.js")); ?> <?php echo e(Html::script("assets/js/dataTables.select.min.js")); ?> <?php echo e(Html::script("assets/js/ace-elements.min.js")); ?> <?php echo e(Html::script("assets/js/ace.min.js")); ?> <script> $(document).ready(function() { $(".e1").select2(); }); function generateExcel() { var tab_text="<table border='2px'><tr bgcolor='#87AFC6'>"; var textRange; var j=0; tab = document.getElementById('myTable'); // id of table for(j = 0 ; j < tab.rows.length ; j++) { tab_text=tab_text+tab.rows[j].innerHTML+"</tr>"; //tab_text=tab_text+"</tr>"; } tab_text=tab_text+"</table>"; tab_text= tab_text.replace(/<A[^>]*>|<\/A>/g, "");//remove if u want links in your table tab_text= tab_text.replace(/<img[^>]*>/gi,""); // remove if u want images in your table tab_text= tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); // reomves input params var ua = window.navigator.userAgent; var msie = ua.indexOf("MSIE "); if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) // If Internet Explorer { txtArea1.document.open("txt/html","replace"); txtArea1.document.write(tab_text); txtArea1.document.close(); txtArea1.focus(); sa=txtArea1.document.execCommand("SaveAs",true,"Say Thanks to Alok.xls"); } else //other browser not tested on IE 11 sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text)); return (sa); } function showError(id,error){ if(typeof(error) === "undefined"){ $('#'+id).hide(); }else{ $('#'+id).show(); $('#'+id).text(error); } } </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('dashboard.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/sjslayjy/public_html/tabson/resources/views/dashboard/report/customize-report.blade.php ENDPATH**/ ?>