

 

         <script type="text/javascript">
  
		
		 $(document).on("click", "#managebtndelete", function()
        {
          var itemid = $(this).data('id');
		  $("#itemid1").val(itemid); 
		  
		  
		   
        });
		
		
		
    </script>  
 <div class="row">
  
   	

   	<div class="col-md-12">

  <?php
   echo $this->session->flashdata('deletemsg'); 
 
				echo $this->session->flashdata('msg'); 
   $session_data = $this->session->userdata('logged_in');

      $mydate=date("Y-m-d H:i:s");

 	$data['id'] = $session_data['id'];
        
		 $userid = $data['id'];
$data['companyid'] = $session_data['companyid'];
	 $companyid = $data['companyid'];
		 $data['usertype'] = $session_data['usertype'];
	 $usertype = $data['usertype'];	
    $deleteglaccount=$this->usermodel->populatuserpermissionsdataarray('accounting','deleteglaccount',$userid);

  
  ?>
		<div class="panel panel-default" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
				 <span class="pull-right"> View  Accounts type</span>
	  <a data-toggle='modal' data-target='#addModal' class="btn btn-primary">Add account  type</a>
	  
	  				 <a href="<?php echo base_url();?>user/accounting" class="btn btn-info"> Back </a>

				 
            	</div>
            </div>
			<div class="panel-body">

			
	<div class="widget-content nopadding table_holder table-responsive" >				
				<?PHP

								?>	
					<div class="row">
						<div class="col-md-12">
							
							<div class="panel-body">
	
									
  <table cellpadding="0" cellspacing="0" border="0" class="table  table-striped" id="example" style="border-color:#CCCCCC; width:100%;"  >

             <thead>
         <tr>
		   					  <th>No#</th>

  					  <th> Name</th>
				    					  <th>Type</th>


		 
<th>Description</th> 


				
		


                 </tr>
             </thead>
<?php

			
 if(!is_array($accounttype)) 

 {


   echo "<tr  style='margin-bottom:0px;margin-top:0px;' '>";
      echo "<td colspan='10'>";
    
       echo '<div class="alert alert-warning text-center">There no account found..</div>';
    echo "</td>";
   echo "</tr>";
    }else {
?>
    
             <?php 
  
  	foreach ($accounttype as $c): 

		 

           
                
            
$id=$c->id;


?>
  <tr>
   <td><?php echo $c->id; ?></td> 				   

 <td><?php echo $c->name; ?></td> 				   
 <td><?php echo $c->type; ?></td> 				   

               <td><?php echo $c->description; ?></td> 				   



                  
             </tr>

	<?php endforeach;} ?>

            

        </table>
		<div class="col-md-12 text-center">    <?php  if(isset($links)) {echo   $links; } ?>
					   		<span style="color:red; font-size:20px"><?php  if(isset($total_rows)) {echo   $total_rows; } "   Bank (s) in the system. " ;?>    </span>

        
        </div>
	</div>

		<div id="deleteModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Delete</h4>
      </div>
      <div class="modal-body">
        <h3>Are you sure you want to delete this item? </h3>
      </div>
      <div class="modal-footer">
	  	

     
		<?PHP
				$session_data = $this->session->userdata('logged_in');
 echo $this->session->flashdata('deletemsg'); 

		
                 echo form_open('user/deletebyid' , array('class' => 'form-horizontal ', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
 <input type="hidden" id="table"name="table" class="table" placeholder="view" value="accounttype">

 <input type="hidden" id="view"name="view" class="view" placeholder="view" value="user/accounttype">
 <input type="hidden" id="itemid1"name="itemid" class="itemid" placeholder="itemid" value=""><br>
 <button type="button" class="btn btn-success" data-dismiss="modal">No</button>
 		  	         <button type="submit" name="btn_delete" value="deletebyid" class="btn btn-danger"> Delete  </button>

	<?php echo form_close();?>
      </div>
    </div>

  </div>

  </div>		
	<div id="addModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Add new Account type </h4>
      </div>
      <div class="modal-body">
      
	  	

				<?PHP
//$session_data = $this->session->userdata('logged_in');



		
                 echo form_open('user/addaccounttype' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
	
		
		
		
		
		
		
		
		
		
		
		
		    <div class="form-group">
    <label for="inputname" class="col-sm-3 control-label"> Account Name:   </label>
    <div class="col-sm-9">
		
				<input type="text" name="name" value="<?php echo set_value('name') ;?>" id="name" class="form-control" required  placeholder="Please provide your Account name ">

				
		</span>
	</div>
  </div>
	
	
  
  	


  
    	<div class="form-group">
    <label for="inputtype" class="col-sm-3 control-label">Type </label>
    <div class="col-sm-9">
		
	
		
			<select required class="form-control" id="type"  name="type">
								<option value="">Select Report type </option>

			
				<option value="BS">Balance sheet</option>
				<option value="PL" > Profit and Loss</option>
				
				</select>		
		  		
				
		<span class="text-danger"> 	<?php echo form_error('type'); ?>
		
		</span>
	</div>
  </div>	
  
  
  


  
  	  <div class="form-group">
    <label for="inputdescription" class="col-sm-3 control-label">Description</label>
    <div class="col-sm-9">

	<textarea name="description" class="form-control" placeholder="Bussines Descriptionhere"><?php echo set_value('description'); ?></textarea> 
			<span class="text-danger"> Description<?php echo form_error('description'); ?>
		
		</span>
	</div>
  </div>
  
		
  
  
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  name="btn_accounttype"  value="account"  class="btn btn-primary"> Add new Account type  </button>

    </div>
  </div>
	
  					<?php echo form_close();?>
			</div>							   
				
									
							
								
			<div class="modal-footer">

    

				</div>

		</div>
	    </div>
    </div>			
									
									
									
									
							</div>
						</div>
				

			
			</div>
		</div>
  
  </div>
			
			
			
		
		
  

 
</div>


















