
<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>Edit Income 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()?>/extraincomesetup/update_income " method="post">
                     <input type="hidden" name="id" value="<?php echo $incomeInfoByid['id'];?>">  
                         
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2">Income Category </label>
                            <?php echo form_error('data[incomeCategory]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <select name="data[incomeCategory]" class="col-xs-4 col-sm-4">
                                    <option value=""> Select Income Category.....</option>>
                                <?php foreach($incomeCategory as $value){?>
                                    <option value="<?php if(!empty($value['category_id'])){echo $value['category_id'];}?>" <?php echo ($value['category_id']==$incomeInfoByid['incomeCategory']) ? "Selected" : "";?>>
                                    <?php if(!empty($value['category_name'])){echo $value['category_name'];}?>
                                    </option>
                                <?php }?>
                            </select>
                           
                        </fieldset>
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2">Payment Process </label>
                            <?php echo form_error('data[paymentProcess]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <select name="data[paymentProcess]" class="col-xs-4 col-sm-4">
                                    <option> Select Payment Process.....</option>>
                                <?php foreach(getPaymentProcess() as $key=>$value){?>
                                    <option value="<?php echo $key?>" <?php echo ($incomeInfoByid['paymentProcess']==$key) ? "Selected" : "";?>>
                                        <?php echo $value;?>
                                    </option>
                                <?php }?>
                            </select>
                           
                        </fieldset>
                        
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Payment Amount </label>
                            <?php echo form_error('data[amount]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[amount]" value="<?php echo $incomeInfoByid['amount'] ?>" placeholder="Amount" 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>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 $incomeInfoByid['date'] ?>" data-date-format="yyyy-mm-dd"  />
                                    <span class="input-group-addon">
                                        <i class="fa fa-calendar bigger-110"></i>
                                    </span>
                                </div>
                        </fieldset>
                        
                        
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2">Employee Id </label>
                             <?php echo form_error('data[receiver_id]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[receiver_id]"  placeholder="Receiver Id" value="<?php echo $incomeInfoByid['receiver_id'] ?>" class="col-xs-4 col-sm-4" />
                           
                        </fieldset>
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2">Payment Description </label>
                            <?php echo form_error('data[payment_description]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <textarea rows="5" cols="5" name="data[payment_description]" class="col-xs-4 col-sm-4"><?php echo $incomeInfoByid['payment_description'] ?></textarea>
                        </fieldset>
     
                        <div class="clearfix"></div>

                        <div class="form-actions 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>
                    </form>
                </div>
            </div>
        </div>
    </div></div></div>

