<style type="text/css">
.fa-3x {
	font-size: 2em !important;
}
.report_view_th {
	background-color: #428bca;
	color: #fff !important;
	font-size: 14px;
}
.table-responsive td {
	font-size: 14px;
}
h4 {
	font-size: 13px;
}
</style>
<?php $this->load->view("common/header"); ?>
<!-- end: HEAD -->
<!-- end: CSS REQUIRED FOR THIS PAGE ONLY -->
<!-- end: HEAD -->
<!-- start: BODY -->
<body>
<!-- start: HEADER -->
<div class="navbar navbar-inverse navbar-fixed-top"> 
  <!-- start: TOP NAVIGATION CONTAINER -->
  <div class="container">
    <div class="navbar-header"> 
      <!-- start: RESPONSIVE MENU TOGGLER -->
      <button data-target=".navbar-collapse" data-toggle="collapse" class="navbar-toggle" type="button"> <span class="clip-list-2"></span> </button>
      <!-- end: RESPONSIVE MENU TOGGLER --> 
      <!-- start: LOGO -->
      <?php $this->load->view("common/logo"); ?>
      <!-- end: LOGO --> 
    </div>
    <div class="navbar-tools"> 
      <!-- start: TOP NAVIGATION MENU -->
      <?php $this->load->view("common/notifications.php"); ?>
      <!-- end: TOP NAVIGATION MENU --> 
    </div>
  </div>
  <!-- end: TOP NAVIGATION CONTAINER --> 
</div>
<!-- end: HEADER --> 
<!-- start: MAIN CONTAINER -->
<div class="main-container">
  <div class="navbar-content"> 
    <!-- start: SIDEBAR -->
    <?php $this->load->view("common/navigation"); ?>
    <!-- end: SIDEBAR --> 
  </div>
  <!-- start: PAGE -->
  <div class="main-content"> 
    <!-- end: SPANEL CONFIGURATION MODAL FORM -->
    <div class="container"> 
      <!-- start: PAGE HEADER -->
      <div class="row">
        <div class="col-sm-12"> 
          <!-- start: PAGE TITLE & BREADCRUMB -->
          <ol class="breadcrumb">
            <li> <a href="<?php echo base_url('dashboard'); ?>"> Dashboard </a> </li>
            <li> <a href="<?php echo base_url('loan'); ?>"> List Loan </a> </li>
            <li class="active"> View </li>
            <li class="search-box">
              <form class="sidebar-search">
                <div class="form-group">
                  <input type="text" placeholder="Start Searching...">
                  <button class="submit"> <i class="clip-search-3"></i> </button>
                </div>
              </form>
            </li>
          </ol>
          <div class="page-header">
            <?php  
							   $message = $this->session->flashdata('message');
							   if($message){ ?>
            <div class="alert alert-success">
              <button type="button" class="close" data-dismiss="alert">×</button>
              <?php echo $message ?> </div>
            <?php
                               }
							    ?>
          </div>
        </div>
      </div>
      <!-- end: PAGE HEADER --> 
      <!-- start: PAGE CONTENT 
                    <!-- start grid -->
      <div class="row">
        <div class="col-md-12"> 
          <!-- start: DYNAMIC TABLE PANEL -->
          <div class="panel panel-default">
            <div class="panel-heading"> <i class="fa fa-external-link-square"></i> Reference ID <?php echo $loan_id ?>
              <div class="panel-tools" style="top:2px;">
              <?php if($this->session->userdata('ss_group_id')==1&&$loan_details->is_closed==0){ ?>
                <button class="btn btn-blue dropdown-toggle" data-toggle="dropdown"> <i class="clip-list-5"></i> Modify  Loan </button>
                
                <?php }?>
                <ul class="dropdown-menu dropdown-light pull-right">
                  <li> <a id="" data-toggle="modal" href="<?php echo base_url("loan/loan_modify/$loan_id"); ?>"> <i class="fa fa-plus"></i> Modify this Loan Details </a> </li>
                </ul>
              </div>
              <!--panel-tools--> 
            </div>
            <!--panel-heading-->
            <div class="panel-body">
              <div class="well well-sm">
                <div class="col-xs-4 border-right">
                  <div class="col-xs-1"><i class="fa fa-2x fa-file-text-o  text-muted"></i></div>
                  <div class="col-xs-10">
                    <h4 class="">Reference ID : <?php echo $loan_details->loan_ref;?></h4>
                    <p>Created Date: <?php echo $loan_details->loan_creted_date;?></p>
                    <p>Loan Opening  : <?php echo $loan_details->loan_date;?></p>
                    <p>Loan Closing  : <?php echo $loan_details->loan_close_date;?></p>
                   <p>Total Holidays  : <?php echo $holiday_count;?> ( Include : <?php echo $include_holi_date;?>  Extend : <?php echo $addition_holi_date;?> )</p>                    
                   <p>Extended Closing  : <?php echo $extented_closing_date;?></p>
                   
                   
                
				   
				
			
			
			
                    
                      <!--<p>Enter By  : <?php  //$loan_details->user_first_name;?></p>-->
                     
                     
                  </div>
                  <div class="clearfix"></div>
                </div>
                <div class="col-xs-4 border-right">
                  <div class="col-xs-1"><i class="fa fa-2x fa-file-text-o padding010 text-muted"></i></div>
                  <div class="col-xs-10">
                    <h4 >Loan Capital  : Rs. <?php echo number_format($loan_details->loan_tot_amount, 2, '.', ',');?></h4>
                    <p>Payment Term  : <?php echo $loan_details->payment_term_name;?> </p>
                    <p>Interest : <?php echo $loan_details->loan_interest;?> %</p>
                    <p>Total Interest : Rs. <?php echo $loan_details->total_interest;?> </p>
                    <p>Total Loan Amount : Rs. <?php echo number_format($loan_details->loan_payable_total_amount, 2, '.', ',') ?></p>
                    <p>No. of Terms : <?php echo $loan_details->loan_no_of_terms;?></p>
                    <p ><strong>Term Amount : Rs. <?php echo number_format($loan_details->loan_term_amount, 2, '.', ',') ; ?></strong></p>
                  </div>
                  <div class="clearfix"></div>
                </div>
                <div class="col-xs-4 border-right">
                  <div class="col-xs-1"><i class="fa fa-2x fa-user padding010 text-muted"></i></div>
                  <div class="col-xs-10">
                    <h4 class=""><?php echo $customer_details['cus_name']; ?></h4>
                    <p><?php echo $customer_details['cus_address']; ?></p>
                    <p>Tel: <?php echo $customer_details['cus_mobile']; ?> &nbsp; <?php echo $customer_details['cus_mobile_2']; ?> <?php echo $customer_details['cus_home_phone']; ?> </p>
                    <p>Garanter: <?php echo $loan_details->garanter_name; ?></p>
                    <p>NIC: <?php echo $customer_details['cus_nic']; ?></p>
                    
                  </div>
                  <div class="clearfix"></div>
                </div>
                <div class="clearfix"></div>
              </div>
              
              <!--col-xs-4-->
              
              <div class="col-xs-5">
                <input name="loan_id" type="hidden" id="loan_id" value="<?php echo $loan_id ?>">
                <input type="hidden" id="sale_type" name="sale_type" value="sale">
                <div class="clearfix"></div>
              </div>
              <!--col-xs-4"-->
              <div class="clearfix"></div>
              <div class="clearfix"></div>
              
              <!--  start -->
              
              <div class="well well-sm">
                <div class="col-xs-4 border-right">
                  <div class="col-xs-1"><i class="fa fa-2x fa-money text-muted"></i></div>
                  <div class="col-xs-10">
                    <h4 class=""> Collected Loan </h4>
                    <?php					
					$presentage=($paid_summary['loan_received']/$loan_details->loan_payable_total_amount)*100;					
					?>
                    <!-- Cal paid %  start --> 
                    <!-- Cal paid % End -->
                    <p>Collected Capital: Rs. <?php echo number_format($paid_summary['capital_received'], 2, '.', ',');?></p>
                    <p>Collected Interest : Rs. <?php echo number_format($paid_summary['loan_interest_recived'], 2, '.', ',');?></p>
                    <p><strong>Loan Collected : Rs. <?php echo number_format($paid_summary['loan_received'], 2, '.', ','); ?> (<?php echo round($presentage,2);?> %)</strong></p>
                  </div>
                  <div class="clearfix"></div>
                </div>
                <div class="col-xs-4 border-right">
                  <div class="col-xs-1"><i class="fa fa-2x fa-money  text-muted"></i></div>
                  <div class="col-xs-10">
                    <h4 class=""> Collectable Loan</h4>
                    <p>Collectable Capital: Rs. <?php echo number_format($loan_details->loan_tot_amount-$paid_summary['capital_received'], 2, '.', ',');?></p>
                    <p>Collectable Interest : Rs. <?php echo number_format($loan_details->total_interest-$paid_summary['loan_interest_recived'], 2, '.', ',');?></p>
                    <p><strong>Loan Collectable  : Rs. <?php echo number_format($loan_details->loan_payable_total_amount-$paid_summary['loan_received'], 2, '.', ','); ?> (<?php echo round(100-$presentage,2);?> %)</strong> </p>
                  </div>
                  <div class="clearfix"></div>
                </div>
                <div class="col-xs-4 border-right">
                  <div class="col-xs-1"><i class="fa fa-2x fa-money  text-muted"></i></div>
                  <div class="col-xs-10">
                    <h4 class=""> Collectable Panalty / Due </h4>
                    <?php 
					 $paid_panalty=0; 
					 if($paid_summary['panalty_received']>0){$paid_panalty=$paid_summary['panalty_received'];} 
					  $paid_due=0; 
					 if($paid_summary['due_received']>0){$paid_due=$paid_summary['due_received'];} 
					 
					 $collectole_l_amount=$loan_details->loan_payable_total_amount-$paid_summary['loan_received'];
					 $colectble_pnt_amount=$total_panalty-$paid_panalty;
					 $colectble_due_amount=$total_due-$paid_due;
					 $collectble_full_amount=$collectole_l_amount+$colectble_pnt_amount+ $colectble_due_amount;
					 
					?>
                    <p>Panalty Balance : Rs. <?php echo number_format($total_panalty-$paid_panalty, 2, '.', ',') ?> </p>
                    <p>Due Balance : Rs. <?php echo number_format($total_due-$paid_due, 2, '.', ',') ?> </p>
                     <p><strong>All Collectable  : Rs. <?php echo number_format($collectble_full_amount, 2, '.', ','); ?> </strong> </p>
                  </div>
                  <div class="clearfix"></div>
                </div>
                <div class="clearfix"></div>
              </div>
              
              
              <!------------------------------------------------------------------------------------------->
               <div class="well well-sm">
                <div class="col-xs-4 border-right">
                  <div class="col-xs-1"><i class="fa fa-2x fa-money  text-muted"></i></div>
                  <div class="col-xs-10">
                    <h4 class=""> Arrears</h4>
                    <?php
											
					?>
                    <!-- Cal paid %  start --> 
                    <!-- Cal paid % End -->
                    <p <?php if($arreas_amount>0){?>style="color:#D00"<?php }else{?> style="color:#0A0" <?php }?>>Arrears value : Rs. <?php echo number_format($arreas_amount, 2, '.', ',');?></p>
                    <p >Arrears instalments : <?php echo number_format($arreas_amount/$loan_details->loan_term_amount, 0, '.', ',');?></p>
                    
                  
                  </div>
                  <div class="clearfix"></div>
                </div>
                <div class="col-xs-4 border-right">
                  <div class="col-xs-1"><i class="fa fa-2x fa-money padding010 text-muted"></i></div>
                  <div class="col-xs-10">
                    <h4 class=""> Total Paid</h4>
                    <p>Total Paid: Rs. <?php echo number_format($paid_summary['pymnt_amount'], 2, '.', ',') ?></p>
                    <p>Total Paid Panalty : Rs. <?php echo number_format($paid_summary['panalty_received'], 2, '.', ',') ?></p>
                    <p>Total Paid Due  : Rs. <?php echo number_format($paid_summary['due_received'], 2, '.', ',') ?></p>
                  </div>
                  <div class="clearfix"></div>
                </div>
                <div class="col-xs-4 border-right">
                  <div class="col-xs-1"><i class="fa fa-2x fa-file-text-o text-muted"></i></div>
                  <div class="col-xs-10">
                   <h4 class=""> Info</h4>
                 	 <p>Reduce from cheque  : <?php  if($loan_details->reduce_fron_ceque==1){echo "Yes";}else{echo "No";}?></p>
                    <p>Panalty  : <?php  if($loan_details->panalty_enable==1){echo "On";}else{echo "off";}?></p>
                    <p>Panalty  :  <?php echo $loan_details->panalty_presentage;?> % </p>
                    <p>Due :  <?php echo $loan_details->due_presentage;?>  % </p>
                  </div>
                  </div>         
                  <div class="clearfix"></div>
                </div>
                
                
                <!--  start -->
              
              <div class="well well-sm">
                <div class="col-xs-12 border-right">
                  <div class="col-xs-1"><i class="fa fa-2x fa-text-o text-muted"></i></div>
                  <div class="col-xs-10">
                    <h4 class=""> Note </h4>
                  <p> <?php echo $loan_details->note;?> </p>
                  
                  
                  <hr>
                  <p style="color:#D00" >  <?php echo $loan_details->close_reason;?> </p>
                  </div>
                  <div class="clearfix"></div>
                </div>
             
           
                  <div class="clearfix"></div>
                </div>
                <div class="clearfix"></div>
              </div>
              
              
              <!------------------------------------------------------------------------------------------->
                
                
                <div class="clearfix"></div>
              </div>
              
               
               
              
              <!-- end--> 
              <!-- payment list -->
              <div class="col-xs-12 border-right">
                <h4>Payment History</h4>
              </div>
              <div class="row">
                <div class="col-xs-12">
                  <div class="table-responsive">
                    <table class="table items table-striped table-bordered table-condensed table-hover">
                      <thead>
                        <tr class="report_view_th">
                        <th width="50 px;">No</th>
                          <th width="100 px;">Date Added</th>
                          <th width="100 px;">Payment <br>Date</th>
                          <th>Reference</th>
                          <th>Tracking<br>Number</th>
                          <th>Paid by</th>
                          <th>Status</th>
                          <th>Received<br>Panalty Rs.</th>
                          <th>Received<br>Due Rs.</th>
                          <th>Received<br>interest Rs.</th>
                          <th>Received<br>Capital Rs.</th>
                          <th>Received<br>Loan Rs.</th>
                      	  <th>Received<br>Money Rs.</th>
                        </tr>
                      </thead>
                      <tbody>
                        <?php $total_payment=0;$payment_count=0;   foreach ($loan_payment_list as $row){
							
							if($row->pymnt_amount>0){$total_payment+=$row->pymnt_amount;$payment_count++;}
							
							
							?>
                        <tr>
                        <td><?php if($row->pymnt_amount>0){echo $payment_count;} ?></td>
                          <td><?php echo  date('Y-m-d', strtotime($row->pymnt_added_date_time)); ?></td>
                          <td><?php echo  date('Y-m-d', strtotime($row->pymnt_date_time)); ?></td>
                          <td><?php echo $row->pymnt_ref_no ?></td>
                          <td><?php echo $row->tracking_number ?></td>
                          <td><?php echo $row->pymnt_paying_by ?></td>
                         <?php
						 $status="check this recode";
						 if($row->pymnt_collected==1)
						 {							 
							$status="Collected" ;
						 }
						 if($row->pymnt_deposited==1)
						 {							 
							$status="Deposited" ;
						 }
						 if($row->pymnt_realize==1)
						 {							 
							$status="Realize" ;
						 }
						 if($row->pymnt_returned==1)
						 {							 
							$status="Return" ;
						 }
						 
						 
						 
						 
						 ?>                         
                          <td><?php echo $status ?></td> 
                         
                          <td style="text-align:end"><?php echo $row->panalty_received ?></td>
                          <td style="text-align:end"><?php echo number_format($row->due_received, 2, '.', ',') ?></td>                         
                          <td style="text-align:end"><?php echo number_format($row->loan_interest_recived, 2, '.', ',') ?></td>
                          <td style="text-align:end"><?php echo number_format($row->capital_received, 2, '.', ',') ?></td>
                          <td style="text-align:end"><?php echo number_format($row->loan_received, 2, '.', ',') ?></td>
                          <td style="text-align:end"><?php echo number_format($row->pymnt_amount, 2, '.', ',') ?></td>
                        </tr>
                        <?php }?>
                      
                      </tbody>
                      <tfoot>
                      <th >No</th>
                          <th >Date Added</th>
                          <th>Payment <br>Date</th>
                          <th>Reference</th>
                          <th>Tracking<br>Number</th>
                          <th>Paid by</th>
                          <th>Status</th>
                          <th>Received<br>Panalty Rs.</th>
                          <th>Received<br>Due Rs.</th>
                          <th>Received<br>interest Rs.</th>
                          <th>Received<br>Capital Rs.</th>
                          <th>Received<br>Loan Rs.</th>
                      	  <th><?php echo number_format($total_payment, 2, '.', ',');  ?></th>
                      
                      </tfoot>
                    </table>
                    
                    
                    
                     <?php /*?> <table class="table items table-striped table-bordered table-condensed table-hover">
                      <thead>
                        <tr class="report_view_th">
                          <th width="100px;">Date Added</th>
                          <th>Reference</th>
                          <th>Paid by</th>
                          <th>Bank</th>
                          <th>Branch</th>
                          <th>Cheque No</th>
                          <th>Cheque/Cash Date<br/>
                            (dd-mm-yyyy)</th>
                          <th width="100px;">Cheque Deposited Status</th>
                          <th width="100px;">Check Returned Status</th>
                          <th width="100px;">Cash Collectd Status</th>
                          <th>Amount</th>
                        </tr>
                      </thead>
                      <tbody>
                        <?php   foreach ($loan_payment_list as $row){?>
                        <tr>
                          <td><?php echo  date('Y-m-d', strtotime($row->pymnt_added_date_time)); ?></td>
                          <td><?php echo $row->pymnt_ref_no ?></td>
                          <td><?php echo $row->pymnt_paying_by ?></td>
                          <td><?php echo $row->bank_code ?>
                            <?php if($row->bank_code) echo '/<br/>';?>
                            <?php echo $row->bank_name ?></td>
                          <td><?php echo $row->pymnt_branch ?></td>
                          <td><?php echo $row->pymnt_cheque_no ?></td>
                          <td><?php  if($row->pymnt_cheque_date!="0000-00-00"){echo $row->pymnt_cheque_date; } ?></td>
                          <td><?php if($row->pymnt_paying_by=='Cheque'){?>
                            <label class="checkbox-inline">
                              <input type="checkbox" onChange="changeColectedStatus(<?php echo $row->paymnt_id;?>,this.checked,'deposited')" value="4" class="collected_checkbox" id="collected_<?php echo $row->paymnt_id;?>" <?php if($row->pymnt_deposited==1) echo 'checked';?>>
                              Deposited </label>
                            <?php } ?></td>
                          <td><?php if($row->pymnt_paying_by=='Cheque'){?>
                            <label class="checkbox-inline">
                              <input type="checkbox" onChange="changeColectedStatus(<?php echo $row->paymnt_id;?>,this.checked,'returned')" value="4" class="collected_checkbox" id="collected_<?php echo $row->paymnt_id;?>" <?php if($row->pymnt_returned==1) echo 'checked';?>>
                              Returned </label>
                            <?php } ?></td>
                          <td><?php if($row->pymnt_paying_by=='Cash'){?>
                            <label class="checkbox-inline">
                              <input type="checkbox" onChange="changeColectedStatus(<?php echo $row->paymnt_id;?>,this.checked,'collected')" value="4" class="collected_checkbox" id="collected_<?php echo $row->paymnt_id;?>" <?php if($row->pymnt_collected==1) echo 'checked';?>>
                              Collectd </label>
                            <?php } ?></td>
                          <td><?php echo number_format($row->pymnt_amount, 2, '.', ',') ?></td>
                        </tr>
                        <?php }?>
                        <tr >
                          <td><br>
                            Total Paid <br>
                            &nbsp; </td>
                          <td><?php echo number_format($paid_summary['pymnt_amount'], 2, '.', ',') ?></td>
                        </tr>
                        <tr>
                          <td> Total Paid Panalty </td>
                          <td><?php echo number_format($paid_summary['due_received'], 2, '.', ',') ?></td>
                        </tr>
                        <tr>
                          <td> Total Paid Due<br>
                            &nbsp; </td>
                          <td><?php echo number_format($paid_summary['due_received'], 2, '.', ',') ?></td>
                        </tr>
                      </tbody>
                    </table><?php */?>
                    
                    
                  </div>
                </div>
              </div>
               <!-- Holiday list -->
              <div class="col-xs-12 border-right">
                <h4>Loan Holidays </h4>
              </div>
              <div class="row">
                <div class="col-xs-12">
                  <div class="table-responsive">
                    <table class="table items table-striped table-bordered table-condensed table-hover">
                      <thead>
                        <tr class="report_view_th">
                        <th>Year</th>
                        <th>Month</th>
                          <th>Date</th>
                          <th>Remark</th>
                        </tr>
                      </thead>
                      <tbody>
                        <?php 
						foreach ($holiday_list as $row){?>
                        <tr>
                         <td><?php echo $row->year ?></td>
                          <td><?php echo $row->month ?></td>
                          <td><?php echo $row->holiday_date ?></td>           
                          <td><?php echo $row->remarks ?></td>
                        </tr>
                        
                        <?php } ?>
                      
                      
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
              <!-- panalty list -->
               <div class="col-xs-12 border-right">
                <h4>Due History </h4>
              </div>
              <div class="row">
                <div class="col-xs-12">
                  <div class="table-responsive">
                    <table class="table items table-striped table-bordered table-condensed table-hover">
                      <thead>
                        <tr class="report_view_th">
                          <th width="100px;">Date</th>
                          <th>Amount</th>
                          <th>Remark</th>
                           <th>%</th>
                        </tr>
                      </thead>
                      <tbody>
                        <?php $tot=0;   foreach ($loan_due as $row){?>
                        <tr>
                          <td><?php echo date('Y-m-d', strtotime($row->system_date_time))  ?></td>
                          <td style="text-align:end"><?php echo number_format($row->due_amount, 2, '.', ',') ?></td>
                          <td><?php echo $row->remarks ?></td>
                           <td><?php echo $row->due_precentage ?> %</td>
                        </tr>
                        <?php $tot+=$row->due_amount; }?>
                        <tr>
                          <td> Total </td>
                          <td style="text-align:right;"><?php echo $tot; ?></td>
                          <td></td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
              <div class="clearfix"></div>
              <br>
              <div class="clearfix"></div>
              
              <!-- panalty list -->
              <div class="col-xs-12 border-right">
                <h4>Panalty History </h4>
              </div>
              <div class="row">
                <div class="col-xs-12">
                  <div class="table-responsive">
                    <table class="table items table-striped table-bordered table-condensed table-hover">
                      <thead>
                        <tr class="report_view_th">
                          <th width="100px;">Date</th>
                          <th>Amount</th>
                          <th>Remark</th>
                          <th>%</th>
                        </tr>
                      </thead>
                      <tbody>
                        <?php $tot=0;
						foreach ($loan_panalty as $row){?>
                        <tr>
                          <td><?php echo $row->payment_date ?></td>
                          <td style="text-align:end"><?php echo number_format($row->panalty_amount, 2, '.', ',') ?></td>
                          <td><?php echo $row->remark ?></td>
                          <td><?php echo $row->panalty_precentage ?> %</td>
                          
                          
                          
                        </tr>
                        <?php $tot+=$row->panalty_amount; }?>
                        <tr>
                          <td> Total </td>
                          <td style="text-align:right;"><?php echo $tot; ?></td>
                          <td></td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
              <!-- panalty list -->
             
              <!-- end payment list-->
              
              <div class="buttons">
                <div class="btn-group btn-group-justified">
                  <div class="btn-group" onClick="fbs_click(<?php echo $loan_id; ?>)"><a title="" class="tip btn btn-primary" data-original-title="Print"><i class="fa fa-print"></i> <span class="hidden-sm hidden-xs">Print</span></a> </div>
                </div>
              </div>
              <!--buttons--> 
              
            </div>
            <!--panel-body--> 
          </div>
          <!--panel--> 
          
        </div>
        <!--col-md-12--> 
      </div>
      <!--row--> 
      
      <!-- end grid --> 
      
    </div>
    <!-- end: PAGE --> 
  </div>
  <!-- end: MAIN CONTAINER --> 
  <!-- start: FOOTER -->
  <div class="footer clearfix">
    <div class="footer-inner"> <?php echo date("Y");?> &copy; Vehical Maintacne Management System by sallelanka solutions. </div>
    <div class="footer-items"> <span class="go-top"><i class="clip-chevron-up"></i></span> </div>
  </div>
  <!-- end: FOOTER --> 
  <!-- start: RIGHT SIDEBAR --> 
  <!-- end: RIGHT SIDEBAR -->
  <div id="event-management" class="modal fade" tabindex="-1" data-width="760" style="display: none;">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times; </button>
          <h4 class="modal-title">Event Management</h4>
        </div>
        <div class="modal-body"></div>
        <div class="modal-footer">
          <button type="button" data-dismiss="modal" class="btn btn-light-grey"> Close </button>
          <button type="button" class="btn btn-danger remove-event no-display"> <i class='fa fa-trash-o'></i> Delete Event </button>
          <button type='submit' class='btn btn-success save-event'> <i class='fa fa-check'></i> Save </button>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- start ajax model -->
<div id="ajax-modal" class="modal fade" data-backdrop="static" data-keyboard="false" tabindex="-1" style="display: none;"></div>
<!-- end ajax model --> 

<!-- start: MAIN JAVASCRIPTS -->
<?php $this->load->view("common/footer"); ?>
<!-- end: MAIN JAVASCRIPTS --> 

<!-- start: JAVASCRIPTS REQUIRED FOR THIS PAGE ONLY -->

<?php /*?>	<script type="text/javascript" src="<?php echo asset_url(); ?>plugins/bootbox/bootbox.min.js"></script>
		<script src="<?php echo asset_url(); ?>plugins/bootstrap-modal/js/bootstrap-modal.js"></script>
		<script src="<?php echo asset_url(); ?>plugins/bootstrap-modal/js/bootstrap-modalmanager.js"></script>
		<script src="<?php echo asset_url(); ?>js/ui-modals.js"></script>       
        <script src="<?php echo asset_url(); ?>plugins/jQuery-lib/2.0.3/jquery.min.js"></script><?php */?>
<!-- end: JAVASCRIPTS REQUIRED FOR THIS PAGE ONLY --> 
<script>
			jQuery(document).ready(function() {
				//TableData.init();
				//Main.init();
				//TableData.init();
				//UIModals.init();
			});
				</script> 
<script type="text/javascript" language="javascript" >
function fbs_click(id,d) {
	u=location.href;
	t=document.title;
	window.open('<?php echo base_url() ?>loan/print_loan_invoice/'+id,'sharer','toolbar=0,status=0,width=700,height=700, left=10, top=10,scrollbars=yes');return false;
}
</script>
</body>
<!-- end: BODY -->
</html>