<!-- <div class="page-content" >
    <div class="row" >
        <div class="col-sm-12">
            <div class="widget-box">
                <div class="widget-header" style="height:40px;">
                    <h5  style="text-align:center; color:red;"><b>Search Cheques By Month</b> </h5>
                </div>

                <div class="widget-body">
                    <div class="widget-main no-padding">
                        <form action="<?php echo admin_url()?>/chequeinoutentryview/searchincheques/month" method="post">

                            <fieldset class="col-xs-6 col-sm-6">
                                <div class="col-xs-4 col-sm-4"><label>Date From</label></div>
                                <?php echo form_error('data[fromdate]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                                <div class="input-group col-xs-8 col-sm-8">
                                    <input class="form-control date-picker" id="id-date-picker-1" type="text" name="data[fromdate]" value="<?php echo set_value('data[fromdate]',false); ?>" data-date-format="dd-mm-yyyy" />
                                    <span class="input-group-addon">
                                        <i class="fa fa-calendar bigger-110"></i>
                                    </span>
                                </div>
                            </fieldset>

                            <fieldset class="col-xs-6 col-sm-6">
                                <div class="col-xs-4 col-sm-4"><label>Date To</label></div>
                                <?php echo form_error('data[todate]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                                <div class="input-group col-xs-8 col-sm-8">
                                    <input class="form-control date-picker" id="id-date-picker-1" type="text" name="data[todate]" value="<?php echo set_value('data[todate]',false); ?>" data-date-format="dd-mm-yyyy" />
                                    <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="btnSdateRange" class="btn btn-sm btn-success">
                                    <i class="ace-icon fa fa-undo bigger-110"></i>
                                    Search Cheques By Month
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div> -->

<div class="page-content" >
                        <div class="row">
                         <?php
                                $message = $this->session->userdata('message');
                                if (!empty($message)) {
                                    ?>
                                    <div class="alert alert-block alert-success">
                                        <h6 class="lighter arial green"><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"><b>
                                                <?php echo $errormessage;
                                                $this->session->unset_userdata('errormessage');
                                                ?>
                                            </b></h6>
                                    </div>
                                    <?php
                                }
                                ?>

                    <?php if(!empty($allchequein)){?>
                            <div class="col-xs-12">
                                <div class="row">
                                    <div class="col-xs-12">
                        <?php $adminLebel=$this->session->userdata('admin_level');?>

                                        <div class="clearfix">
                                            <div class="pull-right tableTools-container"></div>
                                        </div>
                                        <div class="table-header" style="height:60px;">
                                           <h3 style="text-align:center;">All Advance Money Receipt List</h3>
                                        </div>
                                        <div>
                                            <table id="dynamic-table" class="table table-striped table-bordered table-hover">
                                                <thead>
                                                    <tr style="color:red;">
                                                        <th style="color:red;">Serial No</th>
                                                        <th>Payment Date</th>
                                                        <th>CustomerId & Name</th>
                                                        <th>Money Receipt No</th>
                                                        <th>Description</th>
                                                        <th>Ref. ID</th>
                                                        <th>Action</th>
                                                    </tr>
                                                </thead>

                                                <tbody>

                <?php
                $i=0;
                foreach($allchequein as $value){?>

                                                    <tr>
                                                        <td ><?php echo $value['id'];?></td>
                                                        <td><?php  echo $value['payment_date'];?></td>
                                                        <td style="color:red;">
                                                        Id :&nbsp;&nbsp;<?php echo $value['customerId'];?><br/>
                                                        Name:&nbsp;&nbsp;
                                                            <?php  $sl_id = getlandCustomerslIdById($value['customerId']);?>
                                                            <a href="<?php  echo base_url('admin/landcustomerRegistration/viewProfile').'/'.$sl_id[0]['id'];?>">
                                                                <?php
                                                                    $app_name=getlandCustomerNameById($value['customerId']);
                                                                    echo $app_name['applicant_name'];
                                                                ?>
                                                            </a>
                                                        </td>
                                                        
                                                        <td><?php  echo $value['mr_no'];?></td>
                                                        
                                                        <td><?php  echo $value['description'];?></td>
                                                        
<!--                                                     <td><?php  echo $value['ref_id'];?></td>
 -->                                                    <td>
                                                        <?php if(!empty($allEmployeeId) && $allEmployeeId['userId']=$value['ref_id']){
                                                               $refname= $allEmployeeId['userId']; $emp_usrname=getEmployeeById($allEmployeeId['userId']); 
                                                            }?>

                                                    <?php 
                                                        if(!empty($value['ref_id'])){
                                                                    echo "<a href='".base_url('admin/landcustomerRegistration/viewProfile').'/'.$value['ref_id']."'>".$refname." ".$emp_usrname['userName']."</a></br>";
                                                                }                                                                
                                                        ?>
                                                </td>
                                                <td>
                                                            <div class="hidden-sm hidden-xs action-buttons">

                                            <?php if($adminLebel==1){?>
                                                                <a class="green" href="<?php echo admin_url()?>/advancemoneyreceipt/edit_mr/<?php echo $value['id'];?>">
                                                                    <i class="ace-icon fa fa-pencil bigger-130"></i>
                                                                </a>
                                                                
                                                                <a class="red" href="<?php echo admin_url()?>/advancemoneyreceipt/delete_mr/<?php echo $value['id'];?>" onclick="return ConfirmDelete()">
                                                                    <i class="ace-icon fa fa-trash-o bigger-130"></i>
                                                                </a>
                                                                
                                                                <?php }?>
                                                                <a class="green" href="<?php echo admin_url()?>/advancemoneyreceipt/done_mr/<?php echo $value['id'];?>">
                                                                    <i class="ace-icon fa fa-check-circle bigger-130"></i>
                                                                </a>

                                                                
                                                                
                                                                
                                                            </div>


                                                        </td>
                                                    </tr>

                   <?php }?>


                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>


                                </div><!-- PAGE CONTENT ENDS -->
                                <?php }?>
                            </div><!-- /.col -->

                <!-- <div class="row">
                    <table class="table table-bordered">
                        <tbody>
                        <tr class="success">
                            <td width=50%>Customer Income Summary</td>
                            <td width=50%></td>
                        </tr>
                        <tr class="danger">
                            <td width=50%>
                                Current Year Income : <?php if(isset($income_year)){echo $income_year['amount'].' Taka';}?>
                            </td>
                            <td width=100%>
                                OverAll Income : <?php if(isset($total_chequein)){echo $total_chequein['amount'].' Taka';}?>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div> -->
                        </div><!-- /.row -->
