<div class="page-content" >   
<div class="row">
    <div class="col-sm-12">
        <div class="widget-box">
            <div class="widget-header" style="height:70px;">
                <h4  style="text-align:center; color:green;"><b>Commission Reference Entry</b> </h4>
            </div>

            <div class="widget-body">
            
                 <?php
                                $message = $this->session->userdata('message');
                                if (!empty($message)) {
                                    ?>
                                    <div class="alert alert-block alert-success">
                                        <h6 class="lighter arial green" style="text-align:center;"><b>
                                                <?php echo $message;
                                                $this->session->unset_userdata('message');
                                                ?>
                                            </b></h6>
                                    </div>  
                                    <?php
                                }
                                $errormessage = $this->session->userdata('errormessage');
                                if (!empty($errormessage)) {
                                    ?>
                                    <div class="alert alert-block alert-danger">
                                        <h6 class="lighter arial red" style="text-align:center;"><b>
                                                <?php echo $errormessage;
                                                $this->session->unset_userdata('errormessage');
                                                ?>
                                            </b></h6>
                                    </div> 
                                    <?php
                                }
                                ?>
                <div class="widget-main no-padding">
                    <form action="<?php echo admin_url()?>/commissionreferencesetup/update_CommissionReference " method="post">
                        <!-- <legend>Form</legend> -->
                        <input type="hidden" name="id" autocomplete="off" value="<?php echo $CommissionReferenceInfo['id'];?>" placeholder="plote_size" class="col-xs-4 col-sm-4" />
                        <fieldset class="col-xs-12 col-sm-12">
                            <div class="col-xs-2 col-sm-2"><label>Customer id</label></div>
                            <?php echo form_error('data[customerId]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                             <div class="col-xs-4 col-sm-4">
                             <select name="data[customerId]"  class="chosen-select" id="form-field-select-3" data-placeholder="Choose a State...">
                                 <option value=""> Select Customer Id......  </option>
                                 <?php if(!empty($allCustomerId)){
                                        foreach($allCustomerId as $value){
                                    ?>
                                    <option value="<?php echo $value['customerId'];?>" <?php echo ($CommissionReferenceInfo['customerId'] == $value['customerId']) ? "Selected" : ""; ?>>
                                        <?php echo $value['customerId']; $appname=getlandCustomerNameById($value['customerId']); echo ' ( '.$appname['applicant_name'].' ) ';?>
                                    </option>
                                    <?php }
                                        }
                                    ?>
                            </select>
                            </div>
                         </fieldset>
                        
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2">Plote size </label>
                            <?php echo form_error('data[plote_size]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                             <input type="text" name="data[plote_size]" autocomplete="off" value="<?php echo $CommissionReferenceInfo['plote_size'];?>" placeholder="plote_size" class="col-xs-4 col-sm-4" />
                        </fieldset>
                        
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2">  Price </label>
                            <?php echo form_error('data[price]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[price]" autocomplete="off" value="<?php echo $CommissionReferenceInfo['price'];?>" placeholder="price" class="col-xs-4 col-sm-4" />
                           
                        </fieldset>

                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Total Commission  </label>
                            <?php echo form_error('data[total_commission]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[total_commission]" autocomplete="off" value="<?php echo $CommissionReferenceInfo['total_commission'];?>" placeholder="total_commission" class="col-xs-4 col-sm-4" />
                           
                        </fieldset>

                        <fieldset class="col-xs-12 col-sm-12">
                            <div class="col-xs-2 col-sm-2"><label>Reference Name</label></div> 
                            <?php echo form_error('data[reference_name]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                             <div class="col-xs-4 col-sm-4">
                             <select name="data[reference_name]" class="chosen-select" id="form-field-select-3" data-placeholder="Choose a State...">
                                 <option value=""> Select Employee Id......  </option>
                                 

                                    <?php foreach($allEmployeeId as $value){?>
                                    <option value="<?php echo $value['userId'];?>" <?php echo ($CommissionReferenceInfo['reference_name'] == $value['userId']) ? "Selected" : ""; ?>>
                                    <?php //if(!empty($value['userName'])){echo $value['userName'];}?>
                                    <?php echo $value['userId']; $usrname=getEmployeeById($value['userId']); echo ' ( '.$usrname['userName'].' ) ';?>
                                    </option>
                                <?php }?>
                            </select>
                            </div>
                           
                        </fieldset>
                       
                        <fieldset class="col-xs-12 col-sm-12">
                                <div class="col-xs-2 col-sm-2"><label>Date</label></div>
                                <?php echo form_error('data[date]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                                <div class="input-group col-xs-4 col-sm-4">
                                    <input class="form-control date-picker" id="id-date-picker-1" type="text" name="data[date]" value="<?php echo $CommissionReferenceInfo['date'];?>" data-date-format="yyyy-mm-dd" />
                                    <span class="input-group-addon">
                                        <i class="fa fa-calendar bigger-110"></i>
                                    </span>
                                </div>
                        </fieldset>

                        
                        



                        <div class="clearfix"></div>

                        <div class="form-actions center">
                            <button type="submit" name="btnUpdate"  name="btnSave" class="btn btn-sm btn-success">
                                 <i class="ace-icon fa fa-check bigger-110"></i>
                                Update
                                
                            </button>
                            
                            
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div></div></div>



    