       <link rel="stylesheet" href="<?php echo base_url()?>assets/css/bootstrapValidator.css"/>
        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
            <div class="page-title">
                <div class="title_left">
                    <h3></h3>
                </div>
            </div>
            <div class="clearfix"></div>

            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2>Add Bank</h2>
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
<?php //var_dump($edit); ?>
                    <form id="add_defn" class="form-horizontal form-label-left" action="<?php echo base_url(); ?>account/savekhata" method="post">
                       <input type="hidden" name="id" <?php if($edit['id']){ echo "value='".$edit['id']."'" ;  } else { "value='0'" ;} ?>>
                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Bank Name<span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                        <input <?php if($edit['b_name']!=null){echo "value='".$edit['b_name']."'" ;} ?> name="bnk_name" id="bnk_name" class="form-control" required>                    
                        </div>
                      </div>

                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Bank Code <span class="required"></span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                        <input name="b_code" id="b_code" <?php if($edit['b_code']!=null){echo "value='".$edit['b_code']."'" ;} ?> class="form-control">                    
                        </div>
                      </div>    
                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Account # <span class="required"></span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                        <input name="a_num" id="a_num" <?php if($edit['Account_no']!=null){echo "value='".$edit['Account_no']."'" ;} ?> class="form-control">                    
                        </div>
                      </div>  
                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Title <span class="required"></span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                        <input name="title" id="title" <?php if($edit['title']!=null){echo "value='".$edit['title']."'" ;} ?> class="form-control">                    
                        </div>
                      </div>  
                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Purpose <span class="required"></span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                        <textarea name="purpose" id="b_code" class="form-control "><?php if($edit['purpose']!=null){echo $edit['purpose'];} ?></textarea>                    
                        </div>
                      </div>  
                      
                      
                      <div class="ln_solid"></div>
                      <div class="form-group">
                        <div class="col-md-6 col-md-offset-3">
                          <button id="send" type="submit" class="btn btn-success pull-right"><?php if($edit!=null){echo "Update";}else {echo "Add";} ?></button>
                        </div>
                      </div>
                    </form>
                  </div>
                </div>
             
              </div>
                
             
              </div>
            
            
            
            
            
     <div class="row">
             <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2>View Bank</h2>
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                      </li>
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
                  <div class="row">
                      <br>
                    <table id="myDataTable" class="table table-striped table-bordered" style="width:100%;" >
                      <thead>
                        <tr>
                          <th >#</th>
                          
                          <th>Bank Name</th>
                          <th>Bank Code</th>
                          <th>Account #</th>
                          <th>Title</th>
                          <th>Purpose</th>
                          <th>Status</th>
                          <th>Actions</th>
                        </tr>
                      </thead>


                      <tbody class="center">
                        <?php $a=1;if(!empty($banklists)){
                        foreach ($banklists as $key => $value) { ?>
                        <tr>
                        <td style="width:60px;"><?php echo $a++;   ?></td>
                         <td style="width:140px;"><?php echo $value['b_name'];   ?></td>
                          <td style="width:100px;"><?php echo $value['b_code'];   ?></td>
                           <td style="width:100px;"><?php echo $value['Account_no'];   ?></td>
                            <td style="width:100px;"><?php echo $value['title'];   ?></td>
                             <td style="width:100px;"><?php echo $value['purpose'];   ?></td>
                               <td style="width:100px;"><?php if($value['is_active']==1){echo "<span class='badge bg-green'>Activate</span>";}else{echo "<span class='badge bg-green'>Deactivate</span>";} ?></td>
            
            <td style="width:100px;">
                 <a href="<?php echo base_url(); ?>account/definekhata/?abc=<?php echo urlencode($this->encrypt->encode($value['id']));?>"><i class="fa fa-edit fa-2x"></i></a>
            <a href="<?php echo base_url(); ?>account/deletebank/?abc=<?php echo urlencode($this->encrypt->encode($value['id']));?>"><i class="fa fa-trash fa-2x"></i></a>
             </td>
     
                        </tr>
                        <?php } }?>
                      </tbody>
                    </table>
                    
                      
                  </div>
                </div>
              </div>
             
              </div>
            
            </div>        
            
            
            
            
            
            
            
            
            
            
            </div>
          </div>
         
            <link href="<?php echo base_url(); ?>assets/vendors/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/vendors/datatables.net-buttons-bs/css/buttons.bootstrap.min.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/vendors/datatables.net-fixedheader-bs/css/fixedHeader.bootstrap.min.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/vendors/datatables.net-responsive-bs/css/responsive.bootstrap.min.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/vendors/datatables.net-scroller-bs/css/scroller.bootstrap.min.css" rel="stylesheet">
            
    
        <!-- /page content -->
        <script src="<?php echo base_url(); ?>assets/vendors/jquery/dist/jquery.min.js"></script>
        <script src="<?php echo base_url(); ?>assets/js/bootstrapValidator.js"></script>

      <script src="<?php echo base_url(); ?>assets/vendors/datatables.net/js/jquery.dataTables.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/datatables.net-buttons-bs/js/buttons.bootstrap.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/datatables.net-buttons/js/buttons.flash.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/datatables.net-buttons/js/buttons.html5.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/datatables.net-buttons/js/buttons.print.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/datatables.net-responsive-bs/js/responsive.bootstrap.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/datatables.net-scroller/js/datatables.scroller.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/jszip/dist/jszip.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/pdfmake/build/pdfmake.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/pdfmake/build/vfs_fonts.js"></script>
        <script>
       // var jq=jQuery.noConflict();
        $(document).ready(function() {
       
        $('#myDataTable').DataTable(
            {
            "bPaginate":true,
            "bFilter":true,
            "bInfo":false,
            "ordering":false,
            "scrollX":true,
            dom: 'Bfrtip',
            buttons: [
            'csv', 'excel', 'pdf',{extend:'print',text:'Print',exportOptions:{columns:[0,1,2,3,4,5,6,7]}}            ]
            }
        );

       
        });
     
   
        </script>

        
         <script type="text/javascript">

$(document).ready(function() {
 $('#add_defn').bootstrapValidator({
       feedbackIcons: {
              valid: 'glyphicon glyphicon-ok',
              invalid: 'glyphicon glyphicon-remove',
              validating: 'glyphicon glyphicon-refresh'
                   },
        fields: {
           
                     bnk_name: {
                        trigger:'change keyup',
                        validators: {
                            notEmpty: {
                                message: 'Name is required'
                            }
                        }
                    },
               
               
                    
                
                    
        }
    });
    
});
</script>
      <script>
        $('#main_head').change(function(){
          var id=$('#main_head').val();
          $.ajax({
                    url: "<?php echo base_url(); ?>Load_account/main_head_view/"+id,
                    data: {},
                      success: function( result ) {
                          $( "tbody.center" ).html(result);
  }
});

        });
         
        </script>   