<?php 
//check if current user role is allowed access to the pages
$can_add = ACL::is_allowed("user_profile_values/add");
$can_edit = ACL::is_allowed("user_profile_values/edit");
$can_view = ACL::is_allowed("user_profile_values/view");
$can_delete = ACL::is_allowed("user_profile_values/delete");
?>
<?php
$comp_model = new SharedController;
$page_element_id = "list-page-" . random_str();
$current_page = $this->set_current_page_link();
$csrf_token = Csrf::$token;
//Page Data From Controller
$view_data = $this->view_data;
$records = $view_data->records;
$record_count = $view_data->record_count;
$total_records = $view_data->total_records;
$field_name = $this->route->field_name;
$field_value = $this->route->field_value;
$view_title = $this->view_title;
$show_header = $this->show_header;
$show_footer = $this->show_footer;
$show_pagination = $this->show_pagination;
?>
<section class="page" id="<?php echo $page_element_id; ?>" data-page-type="list"  data-display-type="table" data-page-url="<?php print_link($current_page); ?>">
    <?php
    if( $show_header == true ){
    ?>
    <div  class="bg-light p-3 mb-3">
        <div class="container-fluid">
            <div class="row ">
                <div class="col ">
                    <h4 class="record-title">User Profile Values</h4>
                </div>
                <div class="col-sm-3 ">
                    <?php if($can_add){ ?>
                    <a  class="btn btn btn-primary my-1" href="<?php print_link("user_profile_values/add") ?>">
                        <i class="fa fa-plus"></i>                              
                        Add New User Profile Values 
                    </a>
                    <?php } ?>
                </div>
                <div class="col-sm-4 ">
                    <form  class="search" action="<?php print_link('user_profile_values'); ?>" method="get">
                        <div class="input-group">
                            <input value="<?php echo get_value('search'); ?>" class="form-control" type="text" name="search"  placeholder="Search" />
                                <div class="input-group-append">
                                    <button class="btn btn-primary"><i class="fa fa-search"></i></button>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="col-md-12 comp-grid">
                        <div class="">
                            <!-- Page bread crumbs components-->
                            <?php
                            if(!empty($field_name) || !empty($_GET['search'])){
                            ?>
                            <hr class="sm d-block d-sm-none" />
                            <nav class="page-header-breadcrumbs mt-2" aria-label="breadcrumb">
                                <ul class="breadcrumb m-0 p-1">
                                    <?php
                                    if(!empty($field_name)){
                                    ?>
                                    <li class="breadcrumb-item">
                                        <a class="text-decoration-none" href="<?php print_link('user_profile_values'); ?>">
                                            <i class="fa fa-angle-left"></i>
                                        </a>
                                    </li>
                                    <li class="breadcrumb-item">
                                        <?php echo (get_value("tag") ? get_value("tag")  :  make_readable($field_name)); ?>
                                    </li>
                                    <li  class="breadcrumb-item active text-capitalize font-weight-bold">
                                        <?php echo (get_value("label") ? get_value("label")  :  make_readable(urldecode($field_value))); ?>
                                    </li>
                                    <?php 
                                    }   
                                    ?>
                                    <?php
                                    if(get_value("search")){
                                    ?>
                                    <li class="breadcrumb-item">
                                        <a class="text-decoration-none" href="<?php print_link('user_profile_values'); ?>">
                                            <i class="fa fa-angle-left"></i>
                                        </a>
                                    </li>
                                    <li class="breadcrumb-item text-capitalize">
                                        Search
                                    </li>
                                    <li  class="breadcrumb-item active text-capitalize font-weight-bold"><?php echo get_value("search"); ?></li>
                                    <?php
                                    }
                                    ?>
                                </ul>
                            </nav>
                            <!--End of Page bread crumbs components-->
                            <?php
                            }
                            ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php
        }
        ?>
        <div  class="">
            <div class="container-fluid">
                <div class="row ">
                    <div class="col-md-12 comp-grid">
                        <?php $this :: display_page_errors(); ?>
                        <div  class=" animated fadeIn page-content">
                            <div id="user_profile_values-list-records">
                                <div id="page-report-body" class="table-responsive">
                                    <table class="table  table-striped table-sm text-left">
                                        <thead class="table-header bg-light">
                                            <tr>
                                                <th class="td-sno">#</th>
                                                <th  class="td-id"> Id</th>
                                                <th  class="td-user_id"> User Id</th>
                                                <th  class="td-user_info_user_full_name"> Employee Name</th>
                                                <th  class="td-basic_pay"> Basic Pay</th>
                                                <th  class="td-da"> Da</th>
                                                <th  class="td-hra"> Hra</th>
                                                <th  class="td-ta_vahtuk_bhatta"> Ta Vahtuk Bhatta</th>
                                                <th  class="td-washing"> Washing</th>
                                                <th  class="td-incentive_allowance"> Incentive Allowance</th>
                                                <th  class="td-festive_advance"> Festive Advance</th>
                                                <th  class="td-quarter_rent"> Quarter Rent</th>
                                                <th  class="td-petrol_allowance"> Petrol Allowance</th>
                                                <th  class="td-dcps"> Dcps</th>
                                                <th  class="td-epf"> Epf</th>
                                                <th  class="td-allowance_others"> Allowance Others</th>
                                                <th  class="td-pt"> Pt</th>
                                                <th  class="td-dcps_14_mc"> Dcps 14 Mc</th>
                                                <th  class="td-dcps_10_own"> Dcps 10 Own</th>
                                                <th  class="td-epf_12_mc"> Epf 12 Mc</th>
                                                <th  class="td-eps_12_own"> Eps 12 Own</th>
                                                <th  class="td-gpf_b_n_n_vargani"> Gpf B N N Vargani</th>
                                                <th  class="td-gpf_b_n_n_hafta"> Gpf B N N Hafta</th>
                                                <th  class="td-lic"> Lic</th>
                                                <th  class="td-mediclaim"> Mediclaim</th>
                                                <th  class="td-accidental_insurance"> Accidental Insurance</th>
                                                <th  class="td-group_insurance"> Group Insurance</th>
                                                <th  class="td-income_tax"> Income Tax</th>
                                                <th  class="td-festival_adv_installment"> Festival Adv Installment</th>
                                                <th  class="td-court_fee"> Court Fee</th>
                                                <th  class="td-soc_1"> Soc 1</th>
                                                <th  class="td-soc_2"> Soc 2</th>
                                                <th  class="td-soc_3"> Soc 3</th>
                                                <th  class="td-bank_1"> Bank 1</th>
                                                <th  class="td-bank_2"> Bank 2</th>
                                                <th  class="td-bank_3"> Bank 3</th>
                                                <th  class="td-deductions_other"> Deductions Other</th>
                                                <th  class="td-timestamp"> Timestamp</th>
                                                <th class="td-btn"></th>
                                            </tr>
                                        </thead>
                                        <?php
                                        if(!empty($records)){
                                        ?>
                                        <tbody class="page-data" id="page-data-<?php echo $page_element_id; ?>">
                                            <!--record-->
                                            <?php
                                            $counter = 0;
                                            foreach($records as $data){
                                            $rec_id = (!empty($data['id']) ? urlencode($data['id']) : null);
                                            $counter++;
                                            ?>
                                            <tr>
                                                <th class="td-sno"><?php echo $counter; ?></th>
                                                <td class="td-id"><a href="<?php print_link("user_profile_values/view/$data[id]") ?>"><?php echo $data['id']; ?></a></td>
                                                <td class="td-user_id">
                                                    <span <?php if($can_edit){ ?> data-source='<?php print_link('api/json/user_profile_values_user_id_option_list'); ?>' 
                                                        data-value="<?php echo $data['user_id']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="user_id" 
                                                        data-title="Select a value ..." 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="selectize" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable selectize" <?php } ?>>
                                                        <?php echo $data['user_id']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-user_info_user_full_name"> <?php echo $data['user_info_user_full_name']; ?></td>
                                                <td class="td-basic_pay">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['basic_pay']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="basic_pay" 
                                                        data-title="Enter Basic Pay" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['basic_pay']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-da">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['da']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="da" 
                                                        data-title="Enter DA %" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['da']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-hra">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['hra']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="hra" 
                                                        data-title="Enter HRA %" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['hra']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-ta_vahtuk_bhatta">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['ta_vahtuk_bhatta']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="ta_vahtuk_bhatta" 
                                                        data-title="Enter TA- Vahtuk Bhatta" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['ta_vahtuk_bhatta']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-washing">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['washing']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="washing" 
                                                        data-title="Enter Washing Dhulai" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['washing']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-incentive_allowance">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['incentive_allowance']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="incentive_allowance" 
                                                        data-title="Enter Incentive Allowance" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['incentive_allowance']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-festive_advance">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['festive_advance']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="festive_advance" 
                                                        data-title="Enter Festive Advance" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['festive_advance']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-quarter_rent">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['quarter_rent']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="quarter_rent" 
                                                        data-title="Enter Quarter Rent" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['quarter_rent']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-petrol_allowance">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['petrol_allowance']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="petrol_allowance" 
                                                        data-title="Enter Petrol Allowance" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['petrol_allowance']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-dcps">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['dcps']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="dcps" 
                                                        data-title="Enter Dcps" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['dcps']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-epf">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['epf']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="epf" 
                                                        data-title="Enter Epf" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['epf']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-allowance_others">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['allowance_others']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="allowance_others" 
                                                        data-title="Enter Allowance Others" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['allowance_others']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-pt">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['pt']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="pt" 
                                                        data-title="Enter Pt" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['pt']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-dcps_14_mc">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['dcps_14_mc']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="dcps_14_mc" 
                                                        data-title="Enter Dcps 14 Mc" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['dcps_14_mc']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-dcps_10_own">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['dcps_10_own']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="dcps_10_own" 
                                                        data-title="Enter Dcps 10 Own" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['dcps_10_own']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-epf_12_mc">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['epf_12_mc']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="epf_12_mc" 
                                                        data-title="Enter Epf 12 Mc" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['epf_12_mc']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-eps_12_own">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['eps_12_own']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="eps_12_own" 
                                                        data-title="Enter Eps 12 Own" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['eps_12_own']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-gpf_b_n_n_vargani">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['gpf_b_n_n_vargani']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="gpf_b_n_n_vargani" 
                                                        data-title="Enter Gpf B N N Vargani" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['gpf_b_n_n_vargani']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-gpf_b_n_n_hafta">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['gpf_b_n_n_hafta']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="gpf_b_n_n_hafta" 
                                                        data-title="Enter Gpf B N N Hafta" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['gpf_b_n_n_hafta']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-lic">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['lic']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="lic" 
                                                        data-title="Enter Lic" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['lic']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-mediclaim">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['mediclaim']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="mediclaim" 
                                                        data-title="Enter Mediclaim" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['mediclaim']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-accidental_insurance">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['accidental_insurance']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="accidental_insurance" 
                                                        data-title="Enter Accidental Insurance" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['accidental_insurance']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-group_insurance">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['group_insurance']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="group_insurance" 
                                                        data-title="Enter Group Insurance" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['group_insurance']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-income_tax">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['income_tax']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="income_tax" 
                                                        data-title="Enter Income Tax" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['income_tax']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-festival_adv_installment">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['festival_adv_installment']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="festival_adv_installment" 
                                                        data-title="Enter Festival Adv Installment" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['festival_adv_installment']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-court_fee">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['court_fee']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="court_fee" 
                                                        data-title="Enter Court Fee" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['court_fee']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-soc_1">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['soc_1']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="soc_1" 
                                                        data-title="Enter Soc 1" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['soc_1']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-soc_2">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['soc_2']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="soc_2" 
                                                        data-title="Enter Soc 2" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['soc_2']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-soc_3">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['soc_3']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="soc_3" 
                                                        data-title="Enter Soc 3" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['soc_3']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-bank_1">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['bank_1']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="bank_1" 
                                                        data-title="Enter Bank 1" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['bank_1']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-bank_2">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['bank_2']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="bank_2" 
                                                        data-title="Enter Bank 2" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['bank_2']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-bank_3">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['bank_3']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="bank_3" 
                                                        data-title="Enter Bank 3" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['bank_3']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-deductions_other">
                                                    <span <?php if($can_edit){ ?> data-step="0.01" 
                                                        data-value="<?php echo $data['deductions_other']; ?>" 
                                                        data-pk="<?php echo $data['id'] ?>" 
                                                        data-url="<?php print_link("user_profile_values/editfield/" . urlencode($data['id'])); ?>" 
                                                        data-name="deductions_other" 
                                                        data-title="Enter Deductions Other" 
                                                        data-placement="left" 
                                                        data-toggle="click" 
                                                        data-type="number" 
                                                        data-mode="popover" 
                                                        data-showbuttons="left" 
                                                        class="is-editable" <?php } ?>>
                                                        <?php echo $data['deductions_other']; ?> 
                                                    </span>
                                                </td>
                                                <td class="td-timestamp"> <?php echo $data['timestamp']; ?></td>
                                            </tr>
                                            <?php 
                                            }
                                            ?>
                                            <!--endrecord-->
                                        </tbody>
                                        <tbody class="search-data" id="search-data-<?php echo $page_element_id; ?>"></tbody>
                                        <?php
                                        }
                                        ?>
                                    </table>
                                    <?php 
                                    if(empty($records)){
                                    ?>
                                    <h4 class="bg-light text-center border-top text-muted animated bounce  p-3">
                                        <i class="fa fa-ban"></i> No record found
                                    </h4>
                                    <?php
                                    }
                                    ?>
                                </div>
                                <?php
                                if( $show_footer && !empty($records)){
                                ?>
                                <div class=" border-top mt-2">
                                    <div class="row justify-content-center">    
                                        <div class="col-md-auto justify-content-center">    
                                            <div class="p-3 d-flex justify-content-between">    
                                                <div class="dropup export-btn-holder mx-1">
                                                    <button class="btn btn-sm btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                                        <i class="fa fa-save"></i> Export
                                                    </button>
                                                    <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                                                        <?php $export_print_link = $this->set_current_page_link(array('format' => 'print')); ?>
                                                        <a class="dropdown-item export-link-btn" data-format="print" href="<?php print_link($export_print_link); ?>" target="_blank">
                                                            <img src="<?php print_link('assets/images/print.png') ?>" class="mr-2" /> PRINT
                                                            </a>
                                                            <?php $export_pdf_link = $this->set_current_page_link(array('format' => 'pdf')); ?>
                                                            <a class="dropdown-item export-link-btn" data-format="pdf" href="<?php print_link($export_pdf_link); ?>" target="_blank">
                                                                <img src="<?php print_link('assets/images/pdf.png') ?>" class="mr-2" /> PDF
                                                                </a>
                                                                <?php $export_word_link = $this->set_current_page_link(array('format' => 'word')); ?>
                                                                <a class="dropdown-item export-link-btn" data-format="word" href="<?php print_link($export_word_link); ?>" target="_blank">
                                                                    <img src="<?php print_link('assets/images/doc.png') ?>" class="mr-2" /> WORD
                                                                    </a>
                                                                    <?php $export_csv_link = $this->set_current_page_link(array('format' => 'csv')); ?>
                                                                    <a class="dropdown-item export-link-btn" data-format="csv" href="<?php print_link($export_csv_link); ?>" target="_blank">
                                                                        <img src="<?php print_link('assets/images/csv.png') ?>" class="mr-2" /> CSV
                                                                        </a>
                                                                        <?php $export_excel_link = $this->set_current_page_link(array('format' => 'excel')); ?>
                                                                        <a class="dropdown-item export-link-btn" data-format="excel" href="<?php print_link($export_excel_link); ?>" target="_blank">
                                                                            <img src="<?php print_link('assets/images/xsl.png') ?>" class="mr-2" /> EXCEL
                                                                            </a>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="col">   
                                                                <?php
                                                                if($show_pagination == true){
                                                                $pager = new Pagination($total_records, $record_count);
                                                                $pager->route = $this->route;
                                                                $pager->show_page_count = true;
                                                                $pager->show_record_count = true;
                                                                $pager->show_page_limit =true;
                                                                $pager->limit_count = $this->limit_count;
                                                                $pager->show_page_number_list = true;
                                                                $pager->pager_link_range=5;
                                                                $pager->render();
                                                                }
                                                                ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <?php
                                                    }
                                                    ?>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </section>
