ok
Direktori : /home2/selectio/public_html/bharath/application/views/studentfee/ |
Current File : /home2/selectio/public_html/bharath/application/views/studentfee/collection_report.php |
<?php $currency_symbol = $this->customlib->getSchoolCurrencyFormat(); //print_r();die; ?> <style type="text/css"> /*REQUIRED*/ .carousel-row { margin-bottom: 10px; } .slide-row { padding: 0; background-color: #ffffff; min-height: 150px; border: 1px solid #e7e7e7; overflow: hidden; height: auto; position: relative; } .slide-carousel { width: 20%; float: left; display: inline-block; } .slide-carousel .carousel-indicators { margin-bottom: 0; bottom: 0; background: rgba(0, 0, 0, .5); } .slide-carousel .carousel-indicators li { border-radius: 0; width: 20px; height: 6px; } .slide-carousel .carousel-indicators .active { margin: 1px; } .slide-content { position: absolute; top: 0; left: 20%; display: block; float: left; width: 80%; max-height: 76%; padding: 1.5% 2% 2% 2%; overflow-y: auto; } .slide-content h4 { margin-bottom: 3px; margin-top: 0; } .slide-footer { position: absolute; bottom: 0; left: 20%; width: 78%; height: 20%; margin: 1%; } /* Scrollbars */ .slide-content::-webkit-scrollbar { width: 5px; } .slide-content::-webkit-scrollbar-thumb:vertical { margin: 5px; background-color: #999; -webkit-border-radius: 5px; } .slide-content::-webkit-scrollbar-button:start:decrement, .slide-content::-webkit-scrollbar-button:end:increment { height: 5px; display: block; } </style> <div class="content-wrapper" style="min-height: 946px;"> <section class="content-header"> </section> <!-- Main content --> <section class="content"> <?php $this->load->view('reports/_finance');?> <div class="row"> <div class="col-md-12"> <div class="box removeboxmius"> <div class="box-header ptbnull"></div> <div class="box-header "> <h3 class="box-title"><i class="fa fa-search"></i> <?php echo $this->lang->line('select_criteria'); ?></h3> </div> <form role="form" action="<?php echo site_url('studentfee/collection_report') ?>" method="post" class=""> <div class="box-body row"> <?php echo $this->customlib->getCSRF(); ?> <div class="col-sm-4 col-lg-4 col-md-4"> <div class="form-group"> <label><?php echo $this->lang->line('search') . " " . $this->lang->line('type'); ?><small class="req"> *</small></label> <select class="form-control" name="search_type" onchange="showdate(this.value)"> <?php foreach ($searchlist as $key => $search) { ?> <option value="<?php echo $key ?>" <?php if ((isset($search_type)) && ($search_type == $key)) { echo "selected"; } ?>><?php echo $search ?></option> <?php } ?> </select> <span class="text-danger"><?php echo form_error('search_type'); ?></span> </div> </div> <div class="col-sm-4 col-lg-4 col-md-4"> <div class="form-group"> <label><?php echo $this->lang->line('collect')." ".$this->lang->line('by'); ?><small class="req"> *</small></label> <select class="form-control" name="collect_by" > <option value=""><?php echo $this->lang->line('select') ?></option> <?php foreach ($collect_by as $key => $value) { ?> <option value="<?php echo $key ?>" <?php if((isset($received_by)) && ($received_by == $key)) { echo "selected"; } ?> ><?php echo $value ?></option> <?php } ?> </select> <span class="text-danger"><?php echo form_error('collect_by'); ?></span> </div> </div> <div id='date_result'> </div> <div class="col-sm-4 col-lg-4 col-md-4"> <div class="form-group"> <label><?php echo $this->lang->line('group')." ".$this->lang->line('by'); ?><small class="req"> *</small></label> <select class="form-control" name="group" > <?php foreach ($group_by as $key => $value) { ?> <option value="<?php echo $key ?>" <?php if((isset($group_byid)) && ($group_byid == $key)) { echo "selected"; } ?> ><?php echo $value ?></option> <?php } ?> </select> <span class="text-danger"><?php echo form_error('group'); ?></span> </div> </div> <div class="form-group"> <div class="col-sm-12"> <button type="submit" name="search" value="search_filter" class="btn btn-primary btn-sm checkbox-toggle pull-right"><i class="fa fa-search"></i> <?php echo $this->lang->line('search'); ?></button> </div> </div> </div> </form> <div class=""> <div class="box-header ptbnull"></div> <div class="box-header ptbnull"> <h3 class="box-title titlefix"><i class="fa fa-money"></i> <?php ?> <?php echo $this->lang->line('fees')." ".$this->lang->line('collection')." ".$this->lang->line('report'); ?></h3> </div> <div class="box-body table-responsive" id="transfee"> <div class="download_label"><?php ?> <?php echo $this->lang->line('fees')." ".$this->lang->line('collection')." ".$this->lang->line('report')."<br>"; $this->customlib->get_postmessage(); ?></div> <a class="btn btn-default btn-xs pull-right" id="print" onclick="printDiv()" ><i class="fa fa-print"></i></a> <a class="btn btn-default btn-xs pull-right" id="btnExport" onclick="fnExcelReport();"> <i class="fa fa-file-excel-o"></i> </a> <table class="table table-striped table-hover " id="headerTable"> <thead class="header"> <tr> <!--<th><?php echo $this->lang->line('payment_id'); ?></th>--> <th><?php echo $this->lang->line('date'); ?></th> <th><?php echo $this->lang->line('name'); ?></th> <th><?php echo $this->lang->line('class'); ?></th> <!--<th><?php echo $this->lang->line('fee_type'); ?></th>--> <th><?php echo $this->lang->line('collect_by'); ?></th> <th><?php echo $this->lang->line('mode'); ?></th> <th class="text text-right"><?php echo $this->lang->line('amount'); ?> <span><?php echo "(" . $currency_symbol . ")"; ?></span></th> <!--<th class="text text-right"><?php echo $this->lang->line('discount'); ?> <span><?php echo "(" . $currency_symbol . ")"; ?></span></th> <th class="text text-right"><?php echo $this->lang->line('fine'); ?> <span><?php echo "(" . $currency_symbol . ")"; ?></span></th> <th class="text text-right"><?php echo $this->lang->line('total'); ?> <span><?php echo "(" . $currency_symbol . ")"; ?></span></th>--> </tr> </thead> <tbody> <?php if (empty($results)) { } else { $count = 1; $grdamountLabel=array(); $grddiscountLabel=array(); $grdfineLabel=array(); $grdTotalLabel=array(); $flag = 1; $std_name = ""; foreach ($results as $key => $value) { $payment_id=array(); $date=array(); $student_name=array(); $student_class=array(); $fees_type=array(); $pay_mode=array(); $collection_by=array(); $amountLabel=array(); $discountLabel=array(); $fineLabel=array(); $TotalLabel=array(); foreach ($value as $collect) { $payment_id[]=$collect['id']."/".$collect['inv_no']; $date[]=date($this->customlib->getSchoolDateFormat(), $this->customlib->dateyyyymmddTodateformat($collect['date'])); $student_name[]=$collect['firstname'] . " " . $collect['lastname']; $student_class[]=$collect['class'] . " (" . $collect['section'] . ")"; $fees_type[]=$collect['type']; $pay_mode[]=$collect['payment_mode']; $collection_by[]=$collect['received_byname']['name']." (".$collect['received_byname']['employee_id'].")"; $amountLabel[]=number_format($collect['amount'], 2, '.', ''); $discountLabel[]=number_format($collect['amount_discount'], 2, '.', ''); $fineLabel[]=number_format($collect['amount_fine'], 2, '.', ''); $t=$collect['amount']+$collect['amount_fine']; $TotalLabel[]=number_format($t, 2, '.', ''); if(!strcmp($std_name,$collect['firstname'])){ $flag = 0; }else{ $flag = 1; } $std_name = $collect['firstname']; $std_id = $collect['stdid']; if($flag == 1){ ?> <tr> <td ><?php echo date($this->customlib->getSchoolDateFormat(), $this->customlib->dateyyyymmddTodateformat($collect['date'])); ?> </td> <td ><?php echo $collect['firstname'] . " " . $collect['lastname'];?> </td> <td> <?php echo $collect['class'] . " (" . $collect['section'] . ")"; ?> </td> <td ><?php echo $collect['received_byname']['name']." (".$collect['received_byname']['employee_id'].")"; ?> </td> <td > <?php echo $collect['payment_mode'];?> </td> <td class="text text-right" style="font-weight:bold"> <?php unset($amountLabel1); foreach ($value as $collection) { if(!strcmp($std_name,$collection['firstname'])){ $amountLabel1[]=number_format($collection['amount'], 2, '.', ''); } } echo array_sum($amountLabel1); unset($amountLabel1); ?> </td> </tr> <?php } $count++;} ?> <?php $grdamountLabel[]=array_sum($amountLabel); $grddiscountLabel[]=array_sum($discountLabel); $grdfineLabel[]=array_sum($fineLabel); $grdTotalLabel[]=array_sum($TotalLabel); } ?> <tr> <td></td> <td></td> <td></td> <td></td> <td style="font-weight:bold"><?php echo $this->lang->line('sub')." ".$this->lang->line('total')?></td> <td class="text text-right" style="font-weight:bold"><?php echo array_sum($grdamountLabel); ?></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td style="font-weight:bold"><?php echo $this->lang->line('grand')." ".$this->lang->line('total'); ?></td> <td class="text text-right" style="font-weight:bold"><?php echo array_sum($grdamountLabel); ?></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </section> </div> <iframe id="txtArea1" style="display:none"></iframe> <script> <?php if($search_type=='period'){ ?> $(document).ready(function () { showdate('period'); }); <?php } ?> document.getElementById("print").style.display = "block"; document.getElementById("btnExport").style.display = "block"; function printDiv() { document.getElementById("print").style.display = "none"; document.getElementById("btnExport").style.display = "none"; var divElements = document.getElementById('transfee').innerHTML; var oldPage = document.body.innerHTML; document.body.innerHTML = "<html><head><title></title></head><body>" + divElements + "</body>"; window.print(); document.body.innerHTML = oldPage; location.reload(true); } function fnExcelReport() { var tab_text="<table border='2px'><tr >"; var textRange; var j=0; tab = document.getElementById('headerTable'); // 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 Sumit.xls"); } else //other browser not tested on IE 11 sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text)); return (sa); } </script>