<div class="page-content" >
    <div class="page-header"> 
        <h1>
           Edit  Customer Information
            
            <small>
            <i class="ace-icon fa fa-angle-double-right"></i>
            <a href="<?php echo admin_url();?>/newpasswordsetup/changeCustomerPassword_form/<?php if(!empty($customerById['id'])) {echo $customerById['id']; } ?>" class="red">Change Username Or Password (Customer)</a>
            </small>
        </h1>
    </div><!-- /.page-header -->

    <!-- /Content Section  -->                    
    <?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="row">

        <div class="col-xs-12 col-sm-12">

                <form  class="form-horizontal" action="<?php echo admin_url(); ?>/landcustomerRegistration/update_customer" method="post" enctype="multipart/form-data">

                    <div id="printDIV" class="col-xs-12 col-sm-12"> 
                        <div class="alert alert-block alert-info">
                            <h4 class="lighter arial red align-center"><b>Customer Information</b></h4>
                        </div>
                     
                        <!-- PAGE CONTENT BEGINS -->
                        <div class=" col-xs-10 col-sm-2">
                            <label class="control-label" for="form-field-1">Customer Id  &nbsp; <?php echo form_error('data[customerId]', '<span class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[customerId]" autocomplete="off" value="<?php if(!empty($customerById['customerId'])) {echo $customerById['customerId']; }?>"  placeholder=""   class="col-xs-10 col-sm-12" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Plot Id  &nbsp; <?php echo form_error('data[kro_num]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[kro_num]" autocomplete="off" value="<?php if(!empty($customerById['kro_num'])) {echo $customerById['kro_num']; }?>"  placeholder=""   class="col-xs-10 col-sm-12" />
                            
                        </div>
                        <div class=" col-xs-10 col-sm-6">
                            <label class="control-label" for="form-field-1">Date  &nbsp; <?php echo form_error('data[date]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                             <input class="form-control date-picker col-xs-10 col-sm-12" id="form-field-date" type="text"  name="data[date]" autocomplete="off" value="<?php if(!empty($customerById['date'])) {echo $customerById['date']; }?>" data-date-format="dd-mm-yyyy" placeholder="dd-mm-yyyy" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Applicant Name  &nbsp; <?php echo form_error('data[applicant_name]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[applicant_name]" autocomplete="off" value="<?php if(!empty($customerById['applicant_name'])) {echo $customerById['applicant_name']; }?>"  placeholder="Applicant Name"   class="col-xs-10 col-sm-12" />
                            <input type="hidden" name="id" autocomplete="off" value="<?php if(!empty($customerById['id'])) {echo $customerById['id']; }?>"  placeholder="id"  class="col-xs-10 col-sm-10" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Father Name  &nbsp; <?php echo form_error('data[fatherName]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[fatherName]" autocomplete="off" value="<?php if(!empty($customerById['fatherName'])) {echo $customerById['fatherName']; }?>"  placeholder="Father Name"   class="col-xs-10 col-sm-12" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Mother Name  &nbsp; <?php echo form_error('data[motherName]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[motherName]" autocomplete="off" value="<?php if(!empty($customerById['motherName'])) {echo $customerById['motherName']; }?>" placeholder="Mother Name"   class="col-xs-10 col-sm-12" />
                        </div>
                         <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Hasbend/Wife Name  &nbsp; <?php echo form_error('data[husbant_wifeName]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[husbant_wifeName]" autocomplete="off" value="<?php if(!empty($customerById['husbant_wifeName'])) {echo $customerById['husbant_wifeName']; }?>"  placeholder="Hasbend/Wife Name"   class="col-xs-10 col-sm-12" />
                        </div>
                        

                       
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Mobile  &nbsp; <?php echo form_error('data[mobile]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[mobile]" autocomplete="off" value="<?php if(!empty($customerById['mobile'])) {echo $customerById['mobile']; }?>"  placeholder="mobile"   class="col-xs-10 col-sm-12" />
                        </div>  
                         <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Email  &nbsp; <?php echo form_error('data[email]', '<span class="successMessage">', '</span>'); ?></label>
                            <input type="email" name="data[email]" autocomplete="off" value="<?php if(!empty($customerById['email'])) {echo $customerById['email']; }?>"  placeholder="email"   class="col-xs-10 col-sm-12" />
                        </div> 
                        
                        <div class=" col-xs-10 col-sm-4"> 
                            <label class="control-label" for="form-field-1">National Id &nbsp; <?php echo form_error('data[nationalid]', '<span class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[nationalid]" autocomplete="off" value="<?php if(!empty($customerById['nationalid'])) {echo $customerById['nationalid']; }?>"  placeholder="nationalid"   class="col-xs-10 col-sm-12" />
                        </div>

                        
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Gender  &nbsp; <?php echo form_error('data[gender]', '<span class="successMessage">', '</span>'); ?></label>
                            <!-- <select name="data[gender]" class="form-control col-xs-10 col-sm-12" id="form-field-select-1">
                                    
                                <?php //foreach(getGender() as $key=>$value){?>
                                    <option value="<?php //echo $key?>" <?php //echo ($customerById['gender'] == $key) ? "Selected" : ""; ?>>
                                        <?php //echo $value;?>
                                    </option>
                                <?php //}?>
                            </select> --> 
                           <?php echo  form_dropdown('data[gender]',getGender(),$customerById['gender'],'class="form-control col-xs-10 col-sm-12" id="form-field-select-1"'); ?>
                           
                        </div> 
                            
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Religion  &nbsp; <?php echo form_error('data[religion]', '<span class="successMessage">', '</span>'); ?></label>
                            <select name="data[religion]" class="form-control col-xs-10 col-sm-12" id="form-field-select-1">
                                    
                                <?php foreach(getReligion() as $key=>$value){?>
                                    <option value="<?php echo $key?>" <?php echo ($customerById['religion'] == $key) ? "Selected" : ""; ?>>
                                        <?php echo $value;?>
                                    </option>
                                <?php }?>
                            </select>
                            

                        </div> 

                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Occupation  &nbsp; <?php echo form_error('data[occupation]', '<span class="successMessage">', '</span>'); ?></label>
                            <select name="data[occupation]" class="form-control col-xs-10 col-sm-12" id="form-field-select-1">
                                    
                                <?php foreach(getOccupation() as $key=>$value){?>
                                    <option value="<?php echo $key?>" <?php echo ($customerById['occupation'] == $key) ? "Selected" : ""; ?>>
                                        <?php echo $value;?>
                                    </option>
                                <?php }?>
                            </select>
                            
                        </div> 

                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Birthdate  &nbsp; <?php echo form_error('data[birthdate]', '<span class="successMessage">', '</span>'); ?></label>
                            <input class="form-control date-picker col-xs-10 col-sm-12" id="form-field-date" type="text"  name="data[birthdate]" autocomplete="off" value="<?php if(!empty($customerById['birthdate'])) {echo $customerById['birthdate']; }?>" data-date-format="dd-mm-yyyy" placeholder="dd-mm-yyyy" />
                        </div> 

                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Nationality  &nbsp; <?php echo form_error('data[nationality]', '<span class="successMessage">', '</span>'); ?></label>
                             <input type="text" name="data[nationality]" autocomplete="off" value="<?php if(!empty($customerById['nationality'])) {echo $customerById['nationality']; }?>"  placeholder="nationality"   class="col-xs-10 col-sm-12" />
                        </div>
                         
                        
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Present Address &nbsp; <?php echo form_error('data[presentAddress]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            
                              <textarea rows='5' cols="5" name="data[presentAddress]" class="col-xs-10 col-sm-12" ><?php if(!empty($customerById['presentAddress'])) {echo $customerById['presentAddress']; }?></textarea> 
                        </div> 
                        

                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Parmanent Address &nbsp; <?php echo form_error('data[permanentAddress]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            
                              <textarea rows='5' cols="5" name="data[permanentAddress]" class="col-xs-10 col-sm-12" ><?php if(!empty($customerById['permanentAddress'])) {echo $customerById['permanentAddress']; }?></textarea> 
                        </div>  

                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Office  &nbsp; <?php echo form_error('data[office]', '<span class="successMessage">', '</span>'); ?></label>
                            
                              <textarea rows='5' cols="5" name="data[office]" class="col-xs-10 col-sm-12" ><?php if(!empty($customerById['office'])) {echo $customerById['office']; }?></textarea> 
                        </div> 
                          
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Passport Number &nbsp; <?php echo form_error('data[passportNumber]', '<span class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[passportNumber]" autocomplete="off" value="<?php if(!empty($customerById['passportNumber'])) {echo $customerById['passportNumber']; }?>"  placeholder="passportNumber"   class="col-xs-10 col-sm-12" />
                        </div>

                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Tin No  &nbsp; <?php echo form_error('data[tinNo]', '<span class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[tinNo]" autocomplete="off" value="<?php if(!empty($customerById['tinNo'])) {echo $customerById['tinNo']; }?>"  placeholder="tinNo"   class="col-xs-10 col-sm-12" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Upload Image  &nbsp; <?php echo form_error('photo', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                           <input name="photo" class="small" value="<?php if(!empty($customerById['photo'])) {echo $customerById['photo']; }?>" type="file" id="id-input-file-2" />
                           <label style="color:red">Maximum 1 MB, 300pxX300px, .jpg/.png/.jpeg</label>
                        </div>

                            <div class="clearfix"></div>
                            <div class="alert alert-block alert-info">
                                <h4 class="lighter arial red" style="text-align:center;"><b>Nominee Information</b></h4>
                            </div>

                            <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Nominee Name  &nbsp; <?php echo form_error('data[nomineeName]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[nomineeName]" autocomplete="off" value="<?php if(!empty($customerById['nomineeName'])) {echo $customerById['nomineeName']; }?>"  placeholder="nomineeName"   class="col-xs-10 col-sm-12" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Relation  &nbsp; <?php echo form_error('data[relationship]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[relationship]" autocomplete="off" value="<?php if(!empty($customerById['relationship'])) {echo $customerById['relationship']; }?>"  placeholder="relationship"   class="col-xs-10 col-sm-12" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Part  &nbsp; <?php echo form_error('data[part]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[part]" autocomplete="off" value="<?php if(!empty($customerById['part'])) {echo $customerById['part']; }?>"  placeholder="part"   class="col-xs-10 col-sm-12" />
                        </div>

                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1"> Nominee Email  &nbsp; <?php echo form_error('data[nominee_email]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[nominee_email]" autocomplete="off" value="<?php if(!empty($customerById['nominee_email'])) {echo $customerById['nominee_email']; }?>"  placeholder="nominee_email"   class="col-xs-10 col-sm-12" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Mobile  &nbsp; <?php echo form_error('data[nominee_mobile]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[nominee_mobile]" autocomplete="off" value="<?php if(!empty($customerById['nominee_mobile'])) {echo $customerById['nominee_mobile']; }?>"  placeholder="nominee_mobile"   class="col-xs-10 col-sm-12" />
                        </div>

                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Nominee phone   &nbsp; <?php echo form_error('data[nominee_phone]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[nominee_phone]" autocomplete="off" value="<?php if(!empty($customerById['nominee_phone'])) {echo $customerById['nominee_phone']; }?>"  placeholder="nominee_phone"   class="col-xs-10 col-sm-12" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1"> Address  &nbsp; <?php echo form_error('data[address]', '<span class="successMessage">', '</span>'); ?></label>
                            
                              <textarea rows='5' cols="5" name="data[address]" class="col-xs-10 col-sm-12" ><?php if(!empty($customerById['address'])) {echo $customerById['address']; }?></textarea> 
                        </div>

                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Upload Nominee Photo  &nbsp; <?php echo form_error('nominee_photo', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                           <input name="nominee_photo" class="small" value="<?php if(!empty($customerById['nominee_photo'])) {echo $customerById['nominee_photo']; }?>" type="file" id="id-input-file-2" />
                           <label style="color:red">Maximum 1 MB, 300pxX300px, .jpg/.png/.jpeg</label>
                        </div> 
                            

                            <div class="clearfix"></div>
                            <div class="alert alert-block alert-info">
                                <h4 class="lighter arial red" style="text-align:center;"><b>Plot Information</b></h4>
                            </div>

                        <div class=" col-xs-10 col-sm-4">  
                            <label class="control-label">Project Name </label>
                            <?php echo form_error('data[projectCategory]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <select name="data[projectCategory]" class="form-control col-xs-10 col-sm-12">
                                <option value="<?php if(!empty($customerById['projectCategory'])) {echo $customerById['projectCategory']; }?>" selected=""><?php if(!empty($customerById['project_name'])) {echo $customerById['project_name']; }?></option>

                                <?php foreach($records as $value){?>
                                    <option value="<?php if(!empty($value['project_id'])){echo $value['project_id'];}?>" <?php echo set_select('data[projectCategory]',$value['project_id'],FALSE);?>>
                                    <?php if(!empty($value['project_name'])){echo $value['project_name'];}?>
                                    </option>
                                <?php }?>
                            </select>
                        </div>

                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Block No  &nbsp; <?php echo form_error('data[projectBlockNo]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[projectBlockNo]" autocomplete="off" value="<?php if(!empty($customerById['projectBlockNo'])) {echo $customerById['projectBlockNo']; }?>"  placeholder="projectBlockNo"   class="col-xs-10 col-sm-12" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Road No  &nbsp; <?php echo form_error('data[roadNo]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[roadNo]" autocomplete="off" value="<?php if(!empty($customerById['roadNo'])) {echo $customerById['roadNo']; }?>"   placeholder="roadNo"   class="col-xs-10 col-sm-12" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Plot No  &nbsp; <?php echo form_error('data[plotNo]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[plotNo]" autocomplete="off" value="<?php if(!empty($customerById['plotNo'])) {echo $customerById['plotNo']; }?>"  placeholder="plotNo"   class="col-xs-10 col-sm-12" />
                        </div>
                          
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Plot Size  &nbsp; <?php echo form_error('data[plote_size]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[plote_size]" autocomplete="off" value="<?php if(!empty($customerById['plote_size'])) {echo $customerById['plote_size']; }?>"  placeholder="plote_size"   class="col-xs-10 col-sm-12" />
                        </div>
                        <!--<div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Plot Face  &nbsp; <?php //echo form_error('data[plote_face]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[plote_face]" autocomplete="off" value="<?php //if(!empty($customerById['plote_face'])) {echo $customerById['plote_face']; }?>"  placeholder="plote_face"   class="col-xs-10 col-sm-12" />
                        </div>-->
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Payment Type  &nbsp; <?php echo form_error('data[plote_face]', '<span class="successMessage">', '</span>'); ?></label>
                            <select name="data[plote_face]" class="form-control col-xs-10 col-sm-12" id="form-field-select-1">
                              
                                <?php foreach(getPlotface() as $key=>$value){?>
                                    <option value="<?php echo $key?>" <?php echo ($customerById['plote_face'] == $key) ? "Selected" : ""; ?>>
                                        <?php echo $value;?>
                                    </option>
                                <?php }?>
                            </select>
                            

                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Payment Type  &nbsp; <?php echo form_error('data[payment_type]', '<span class="successMessage">', '</span>'); ?></label>
                            <select name="data[payment_type]" class="form-control col-xs-10 col-sm-12" id="form-field-select-1">
                              
                                <?php foreach(getPaymentType() as $key=>$value){?>
                                    <option value="<?php echo $key?>" <?php echo ($customerById['payment_type'] == $key) ? "Selected" : ""; ?>>
                                        <?php echo $value;?>
                                    </option>
                                <?php }?>
                            </select>
                            

                        </div> 

                        <div class="col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Installment step  &nbsp; <?php echo form_error('data[installment_step]', '<span class="successMessage">', '</span>'); ?></label>
                            
                            <select name="data[installment_step]" class="form-control col-xs-10 col-sm-12" id="form-field-select-1">
                                    <option value="1" <?php echo ($customerById['installment_step'] == 1) ? "Selected" : ""; ?>>--</option>
                                    <option value="24" <?php echo ($customerById['installment_step'] == 24) ? "Selected" : ""; ?>>24</option>
                                    <option value="36" <?php echo ($customerById['installment_step'] == 36) ? "Selected" : ""; ?>>36</option>
                                    <option value="48" <?php echo ($customerById['installment_step'] == 48) ? "Selected" : ""; ?>>48</option>
                                    <option value="60" <?php echo ($customerById['installment_step'] == 60) ? "Selected" : ""; ?>>60</option>
                                    <option value="72" <?php echo ($customerById['installment_step'] == 72) ? "Selected" : ""; ?>>72</option>
                                    <option value="84" <?php echo ($customerById['installment_step'] == 84) ? "Selected" : ""; ?>>84</option>
                                    <?php //foreach (getPaymentType() as $key => $value) { ?>
                                        <!--<option value="<?php //echo $key ?>" <?php //echo set_select('data[payment_type]', $key, FALSE); ?>>
                                            <?php //echo $value; ?>
                                        </option>-->
                                    <?php //} ?>
                                </select>

                        </div> 
                       
                       <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Total Cost  &nbsp; <?php echo form_error('data[total_cost]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[total_cost]" autocomplete="off" value="<?php if(!empty($customerById['total_cost'])) {echo $customerById['total_cost']; }?>"  placeholder="total_cost"   class="col-xs-10 col-sm-12" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Down Payment  &nbsp; <?php echo form_error('data[down_payment]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[down_payment]" autocomplete="off" value="<?php if(!empty($customerById['down_payment'])) {echo $customerById['down_payment']; }?>"  placeholder="down_payment"   class="col-xs-10 col-sm-12" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Dues / Instal Installment per month  &nbsp; <?php echo form_error('data[dues]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[dues]" autocomplete="off" value="<?php if(!empty($customerById['dues'])) {echo $customerById['dues']; }?>"  placeholder="dues"   class="col-xs-10 col-sm-12" />
                        </div>
                        

                        <!-- <div class=" col-xs-10 col-sm-4">   
                            <label class="control-label">Referrence </label>
                            <?php echo form_error('data[customer_ref]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <select name="data[customer_ref]" class="form-control col-xs-10 col-sm-12">
                                    <option value="<?php if(!empty($customerById['customer_ref'])) {echo $customerById['customer_ref']; }?>" selected=""><?php if(!empty($customerById['customer_ref'])) {echo $customerById['customer_ref']; }?></option>
                                
                                <?php foreach($allrefs as $refs){?>  
                                    <option value="<?php if(!empty($refs['userId'])){echo $refs['userId'];}?> - <?php if(!empty($refs['userName'])){echo $refs['userName'];}?>" <?php echo set_select('data[customer_ref]',$refs['userId'],FALSE);?>> 
                                    <?php if(!empty($refs['userId'])){echo $refs['userId'];}?> - <?php if(!empty($refs['userName'])){echo $refs['userName'];}?>
                                    </option>
                                <?php }?>
                            </select>
                        </div>

                        <div class=" col-xs-10 col-sm-4">   
                            <label class="control-label">Referrence Profile</label>
                            <?php echo form_error('data[ref_id]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <select name="data[ref_id]" class="form-control col-xs-10 col-sm-12">
                                    <option value="<?php if(!empty($customerById['ref_id'])) {echo $customerById['ref_id']; }?>" selected=""><?php if(!empty($customerById['customer_ref'])) {echo $customerById['customer_ref']; }?></option>                                
                            <?php foreach($allrefs as $refs){?>

                                    <option value="<?php if(!empty($refs['userId'])){echo $refs['userId'];}?>" <?php echo set_select('data[ref_id]',$refs['userId'],FALSE);?>> 
                                    <?php if(!empty($refs['userId'])){echo $refs['userId'];}?> - <?php if(!empty($refs['userName'])){echo $refs['userName'];}?>
                                    </option>
                                <?php }?>
                            </select>
                        </div> -->

                        <!-- <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Reference Name  &nbsp; <?php echo form_error('data[customer_ref]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[customer_ref]" autocomplete="off" value="<?php if(!empty($customerById['customer_ref'])) {echo $customerById['customer_ref']; }?>" disabled="disable" placeholder="Customer ref"   class="col-xs-10 col-sm-12" />
                        </div> --> 

                        <div class="col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Reference Type  &nbsp; <?php echo form_error('data[installment_step]', '<span class="successMessage">', '</span>'); ?></label>
                            <select name="data[ref_type]" class="form-control col-xs-10 col-sm-12" id="ref_type" onchange="referenceUser();">
                                <option selected="" value="<?php if(!empty($customerById['ref_type'])) {echo $customerById['ref_type']; }?>"><?php if(!empty($customerById['customer_ref'])) {echo $customerById['customer_ref']; }?></option>
                                <option value="2">Change Referrence</option>
                            </select>
                        </div>
                        
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Employee Commission  &nbsp; <?php echo form_error('data[com_emp]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[com_emp]" autocomplete="off" value="<?php if(!empty($customerById['com_emp'])) {echo $customerById['com_emp']; }?>"  placeholder="Enter Amount"   class="col-xs-10 col-sm-12" />
                        </div>
                        <div class=" col-xs-10 col-sm-4">
                            <label class="control-label" for="form-field-1">Employee Incentive  &nbsp; <?php echo form_error('data[incentive]', '<span style="color: rgb(255, 0, 0);" class="successMessage">', '</span>'); ?></label>
                            <input type="text" name="data[incentive]" autocomplete="off" value="<?php if(!empty($customerById['incentive'])) {echo $customerById['incentive']; }?>"  placeholder="Enter Amount"   class="col-xs-10 col-sm-12" />
                        </div>

                        <div class="col-xs-10 col-sm-4" id="ref_name"></div>
                        <div class="col-xs-10 col-sm-4">
                            <input name="data[ref_id]"       type="hidden" class="form-control col-xs-10 col-sm-12" id="set_ref_id" value="<?php if(!empty($customerById['ref_id'])) {echo $customerById['ref_id']; }?>"/>
                            <input name="data[customer_ref]" type="hidden" class="form-control col-xs-10 col-sm-12" id="set_ref_name" value="<?php if(!empty($customerById['customer_ref'])) {echo $customerById['customer_ref']; }?>"/>
                        </div>


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

                                </button>
                                

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


            </div>

        </div></div>


