<div class="content-w">
		  <div class="os-tabs-w menu-shad">
			<div class="os-tabs-controls">
			  <ul class="nav nav-tabs upper">
				<li class="nav-item">
				  <a class="nav-link active" href="<?php echo base_url();?>admin/payments/"><i class="os-icon picons-thin-icon-thin-0409_wallet_credit_card_money_payment"></i><span><?php echo "New Invoice";?></span></a>
				</li>
				<li class="nav-item">
				  <a class="nav-link" href="<?php echo base_url();?>admin/jobsheets_payments/"><i class="os-icon picons-thin-icon-thin-0426_money_payment_dollars_coins_cash"></i><span><?php echo get_phrase('payments');?></span></a>
				</li>
				
			  </ul>
			</div>
		  </div>
  <div class="content-i">
    <div class="content-box">
	<div class="row">
		<div class="col-sm-12">
		<?php echo form_open(base_url() . 'admin/create_invoice');?>
      <div class="element-box lined-primary shadow">
		  <h5 class="form-header"><?php echo get_phrase('invoice_details');?></h5><br>
		  <div class="form-group row">
				<label class="col-form-label col-sm-3" for=""> <?php echo "Client";?></label>
				<div class="col-sm-9">
					<div class="input-group">
					<div class="input-group-addon">
						<i class="picons-thin-icon-thin-0003_write_pencil_new_edit"></i>
					</div>
					<select name="client_id" class="form-control" onchange="return get_class_students(this.value)">
                        <option value=""><?php echo get_phrase('select');?></option>
                        <?php 
                            $classes = $this->db->get('client')->result_array();
                            foreach ($classes as $row):
                        ?>
                            <option value="<?php echo $row['client_id'];?>"><?php echo $row['client_name'];?></option>
                        <?php endforeach;?>
                    </select>
				  </div>
				</div>
			  </div>
			  	

	
              	  <div class="form-group row">
				<label class="col-form-label col-sm-3" for=""> <?php echo get_phrase('year');?></label>
				<div class="col-sm-9">
					<div class="input-group">
					<div class="input-group-addon">
						<i class="picons-thin-icon-thin-0729_student_degree_science_university_school_graduate"></i>
					</div>
				  		  		 <select name="year" class="form-control" id="year">
            					<?php
            						for ($i = 2019; $i <= 3000; $i++):
							
                				?>
                					<option value="<?php echo $i; ?>"<?php if($month == $i) echo 'selected'; ?>  ><?php echo $i; ?></option>
                				<?php endfor;?>
        					</select>
				  </div>
				</div>
			  </div>
			  <div class="form-group row">
				<label class="col-form-label col-sm-3" for=""> <?php echo get_phrase('month');?></label>
				<div class="col-sm-9">
					<div class="input-group">
					<div class="input-group-addon">
						<i class="picons-thin-icon-thin-0729_student_degree_science_university_school_graduate"></i>
					</div>
				  		  	<select class="form-control" name="month" required id="section_holder">
            	<option value="1"><?php echo get_phrase('JAN');?></option>
								<option value="2"><?php echo get_phrase('FEB');?></option>
									<option value="3"><?php echo get_phrase('MAR');?></option>
										<option value="4"><?php echo get_phrase('APR');?></option>
											<option value="5"><?php echo get_phrase('MAY');?></option>
												<option value="6"><?php echo get_phrase('JUN');?></option>
													<option value="7"><?php echo get_phrase('JUL');?></option>
														<option value="8"><?php echo get_phrase('AUG');?></option>
															<option value="9"><?php echo get_phrase('SEP');?></option>
																<option value="10"><?php echo get_phrase('OCT');?></option>
																	<option value="11"><?php echo get_phrase('NOV');?></option>
																		<option value="12"><?php echo get_phrase('DEC');?></option>

			</select>
				  </div>
				</div>
			  </div>
		  
		
			
		
		
     
		  
		
		
			
		
		   <div class="form-buttons-w"align="center">
            <button class="btn btn-success btn-rounded"  type="submit"> <?php echo get_phrase('create_invoice');?></button>
          
		</div>
		<?php echo form_close();?>
		
	</div>	
	</div>
</div>
</div>

<script type="text/javascript">
    function get_class_students(class_id) {
        $.ajax({
            url: '<?php echo base_url();?>admin/get_class_students/' + class_id ,
            success: function(response)
            {
                jQuery('#student_selection_holder').html(response);
            }
        });
    }
</script>
