     <?php 
	    if(isset($sess_data))
		  echo $sess_data['JSFunction'];
	?>
     <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            Add Project
          </h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="#">Expenditure</a></li>
            <li class="active">Add Project</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">
          <div class="row">  
                      
             <div class="col-md-12">
             	<div class="box box-success">
                  <div class="box-header with-border">
                   <h3 class="box-title purple">Project Details</h3>
                   <h4 class="box-title pull-right purple"><?php echo date("jS M Y -  g:i:s a"); ?></h4>
                  </div><!-- /.box-header -->
                    <form role="form" class="form-horizontal" name="penalty" action="<?php echo site_url();?>expenditure/insert_project_details" method="post" id="penalty"> 
                    <div class="row">
                    <div class="col-md-8">                   
                    <div class="box-body">
                    <span id="displayMsg" class="green"></span>
                    <input type="hidden" name="total_members" id="total_members" value="<?php echo $total_members?>" />
                                         
                        <div class="form-group">
                        <label for="investment_name" class="col-sm-6 control-label float-right">Investment Name</label>
                        <div class="col-sm-6">
                        <?php echo form_error('investment_name'); ?>                        	
                        <input type="text" class="form-control white_bg" id="investment_name" name="investment_name" value="<?php echo set_value('investment_name'); ?>" placeholder="Investment Name" required="required">
                        </div>
                        </div>
                        <div class="form-group">
                        <label for="total_amount" class="col-sm-6 control-label float-right">Total Amount</label>
                        <div class="col-sm-6">
                        <?php echo form_error('total_amount'); ?>                        	
                        <input type="text" class="form-control" id="total_amount" name="total_amount"  value="<?php echo set_value('total_amount'); ?>" placeholder="0.00" onkeyup="calculate_amount_per_member()"  required="required">
                        </div>
                        </div>
                        <div class="form-group">
                        <label for="amount_per_member" class="col-sm-6 control-label float-right">Amount Per Member</label>
                        <div class="col-sm-6">
                        <?php echo form_error('amount_per_member'); ?>                        	
                        <input type="text" class="form-control" id="amount_per_member" name="amount_per_member"  value="<?php echo set_value('amount_per_member'); ?>" placeholder="0.00"  required="required">
                        </div>
                        </div>
                        <div class="form-group">
                        <label for="due_date" class="col-sm-6 control-label float-right">Due Date</label>
                        <div class="col-sm-6">
                        <?php echo form_error('due_date'); ?>                        	
                        <input type="text" class="form-control white_bg" id="due_date" name="due_date" value="<?php echo set_value('due_date'); ?>" required="required" readonly="readonly">
                        </div>
                        </div>
                                                
                        
                      </div><!-- /.box-body -->
                   	<div class="box-footer">
                   	
                    <div class="form-group"></div>
                    <div class="form-group">
                        <div class="col-sm-6">
                        <button type="reset" class="btn btn-danger btn-block">Reset</button>
                        </div>
                        <div class="col-sm-6">
                        <button type="submit" class="btn btn-success btn-block">Submit</button>
                        </div>
                    </div>
                  </div><!-- /.box-footer -->
                  
                </div><!-- /.col-md-8 inside the form -->
                </div><!-- /.row inside the form -->  
                </form>
                 
               </div><!-- /.box -->     
          </div>
              
        </div>   <!-- /.row -->
      </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
    
     <!--JS for the add penalty form-->
    <script type="text/javascript">
		
		function calculate_amount_per_member()
		{			
			 $("#amount_per_member").val($("#total_amount").val()/$("#total_members").val());
		}
	</script>