<div class="row">
                        <div class="col table-responsive">
                            <table class="table table-hover table-bordered p-0 m-0 w-100" width="100%">
                                <thead>
                                    <tr>
                                        <th class="text-center">#</th>
                                        <th class="text-center">Date</th>
                                        <th class="text-center" style="width:40%;" >Description</th>
                                        <th class="text-center">Total </th>
                                        <th class="text-center">
                                            Action                                    
                                        </th>
                                    </tr>
                                </thead>
                                
                                <tbody>

                                    <?php $counter = 0; ?>

                                    <!-- outpatient claim list farouq -->
                                    <?php if($outpatients) foreach ($outpatients as $key => $outpatient): ?>
                                        <tr>
                                            <td style="vertical-align:middle;"><?php echo ++$counter; ?></td>
                                            <td style="vertical-align:middle;">
                                                <?php echo date('d-F-Y',strtotime($outpatient->date)); ?>
                                            </td>

                                            <td style="vertical-align:middle;">
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                    <b>Status (Admin)</b>
                                                    </div>
                                                    <div class="col">
                                                        
                                                        <?php if ($outpatient->is_approve == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-block btn-sm bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($outpatient->is_approve == 1): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-success btn-block btn-sm" type="button" disabled>
                                                                        <i class="fas fa-thumbs-up"></i> Approved
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($outpatient->is_approve == 2): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-danger btn-sm btn-block text-white" type="button" disabled>
                                                                        <i class="fas fa-ban"></i> Rejected
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                    </div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                    <b>Status (HOD)</b>
                                                    </div>
                                                    <div class="col">
                                                        
                                                        <?php if ($outpatient->is_hod_approved == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-block btn-sm bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($outpatient->is_hod_approved == 1): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-success btn-block btn-sm" type="button" disabled>
                                                                        <i class="fas fa-thumbs-up"></i> Approved
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($outpatient->is_hod_approved == 2): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-danger btn-sm btn-block text-white" type="button" disabled>
                                                                        <i class="fas fa-ban"></i> Rejected
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                    </div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Type</b></div>
                                                    <div class="col text-primary"><?php echo (empty($outpatient->is_medical))? 'Outpatient':'Medical Screening'; ?></div>
                                                </div>
                                                
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Invoice Chit </b>
                                                    </div>
                                                    <div class="col"><?php echo $outpatient->invoice_chit; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Hospital / clinic</b> 
                                                    </div>
                                                    <div class="col"><?php echo ($outpatient->clinic_name)?$outpatient->clinic_name:''; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Patient Name </b>
                                                    </div>
                                                    <div class="col">
                                                        <?php if ($outpatient->patient_name): ?>
                                                            <?php echo $outpatient->patient_name; ?>
                                                        <?php else: ?>
                                                            N/A
                                                        <?php endif ?>
                                                    </div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Relation </b>
                                                    </div>
                                                    <div class="col">
                                                        <?php if ($outpatient->relation == 0): ?>
                                                            Unrecognize    
                                                        <?php endif ?>

                                                        <?php if ($outpatient->relation == 1): ?>
                                                            Self
                                                        <?php endif ?>

                                                        <?php if ($outpatient->relation == 2): ?>
                                                            Child
                                                        <?php endif ?>

                                                        <?php if ($outpatient->relation == 3): ?>
                                                            Spouse
                                                        <?php endif ?>
                                                    </div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Treatment</b> 
                                                    </div>
                                                    <div class="col"><?php echo $outpatient->treatment; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Attachment</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php foreach ($outpatient->attachments as $key => $attach): ?>
                                                            <a href="<?php echo base_url('hr/claim/openAttachment/'.$attach->unique_id); ?>" target="_blank">
                                                                <?php echo $attach->attachment_name;  ?>
                                                            </a><br>
                                                        <?php endforeach ?>
                                                    </div>
                                                </div>
                                            </td>
                                            <td class="text-center" style="vertical-align:bottom;">

                                                <div class="row py-1 border-bottom text-left">
                                                    <div class="col">
                                                        <b>Claim</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php echo number_format($outpatient->amount_claim,2); ?>
                                                    </div>
                                                </div>

                                                <div class="row py-1">
                                                    <div class="col">
                                                        <b>Approved</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php echo number_format($outpatient->amount_approved,2); ?>
                                                    </div>
                                                </div>
                                            </td>
                                            <td class="text-center" style="vertical-align:middle;">
                                                <div class="btn-group text-center">
                                                    <?php if($screen_mode == 'hod'): ?>
                                                        <button class="btn btn-success btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approve Claim" data-claim-id="<?php echo $outpatient->id; ?>" data-mode="1" onclick="hodApproval(this)">
                                                            <i class="fas fa-thumbs-up" style="transform: scaleX(-1);"></i>
                                                            <!-- <i class="fas fa-check"></i> -->
                                                        </button>

                                                        <!-- button rejecet -->
                                                        <button class="btn btn-danger btn-sm" 
                                                            data-trigger="hover" 
                                                            data-tooltip="tooltip" 
                                                            title="" 
                                                            data-original-title="Reject Claim" 
                                                            data-claim-id="<?php echo $outpatient->id; ?>" 
                                                            data-mode="1" 
                                                            data-toggle="modal" data-target="#rejectModal"
                                                            onclick="hodReject(this)"
                                                            >
                                                            <!-- <i class="fas fa-times"></i> -->
                                                            <i class="fas fa-thumbs-down"></i>
                                                        </button>
                                                        <!-- button rejecet -->


                                                        <!-- 
                                                        <button class="btn btn-danger btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Reject Claim" data-claim-id="<?php echo $outpatient->id; ?>" data-mode="1" onclick="hodReject(this)">
                                                            <i class="fas fa-times"></i>
                                                        </button> 
                                                        -->

                                                    <?php else: ?>
                                                        <!-- 
                                                        <button class="btn btn-primary btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="View Claim">
                                                            <i class="fa fa-eye"></i>
                                                        </button> 
                                                        -->
                                                            <?php if ($screen_mode == 'admin'): ?>
                                                                <button class="btn btn-warning btn-sm text-white" onclick="approveClaim(this)" data-price="<?php echo number_format($outpatient->amount_claim,2); ?>" data-rqtarget="approveOutpatient" data-id="<?php echo ($outpatient->id)?$outpatient->id:0; ?>" data-status="<?php echo $outpatient->is_approve; ?>" data-allocation="status" data-balanced="balanced" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approve Claim">
                                                                    <i class="fas fa-check"></i>
                                                                </button>
                                                            <?php endif ?>
                                                            <?php if(empty($screen_mode)): ?>
                                                                <button class="btn btn-danger btn-sm" data-rqtarget="removeOutpatient" data-id="<?php echo ($outpatient->id)?$outpatient->id:0?>" onclick="deleteClaim(this)" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Remove Claim" <?php echo ($disabled || !empty($claims->is_submit))?'disabled':''; ?>>
                                                                    <i class="fa fa-trash-alt"></i>
                                                                </button>
                                                            <?php endif ?>
                                                            <?php?>
                                                    <?php endif ?>
                                                </div>
                                            </td>
                                        </tr>
                                    <?php endforeach ?>
                                    
                                    <!-- hospitalization claim list -->
                                    <?php if($hospitalizations) foreach ($hospitalizations as $key => $hospitalize): ?>
                                        <tr>
                                            <td style="vertical-align:middle;"><?php echo ++$counter; ?></td>
                                            <td style="vertical-align:middle;">
                                                <?php echo date('d-F-Y',strtotime($hospitalize->date)); ?>
                                            </td>
                                            <td>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Status (Admin)</b></div>
                                                    <div class="col">
                                                        <?php if ($hospitalize->is_approve == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-block btn-sm bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($hospitalize->is_approve == 1): ?>
                                                            <div class="input-group w-100">
                                                            <div class="input-group-prepend w-100">
                                                                <button class="btn btn-success btn-block btn-sm" type="button" disabled>
                                                                    <i class="fas fa-thumbs-up"></i> Approved
                                                                </button>
                                                            </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($hospitalize->is_approve == 2): ?>
                                                            <div class="input-group">
                                                            <div class="input-group-prepend w-100">
                                                                <button class="btn btn-danger btn-block btn-sm text-white" type="button" disabled>
                                                                    <i class="fas fa-ban"></i> Rejected
                                                                </button>
                                                            </div>
                                                            </div>
                                                        <?php endif ?>
                                                    </div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Status (HOD)</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php if($hospitalize->is_hod_approved == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-block btn-sm bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>
                                                        
                                                        <?php if ($hospitalize->is_hod_approved == 1): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-success btn-block btn-sm" type="button" disabled>
                                                                        <i class="fas fa-thumbs-up"></i> Approved
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($hospitalize->is_hod_approved == 2): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-danger btn-sm btn-block text-white" type="button" disabled>
                                                                        <i class="fas fa-ban"></i> Rejected
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                    </div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Type</b></div>
                                                    <div class="col text-primary">Hospitalization</div>
                                                </div>
                                                
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Invoice Chit </b>
                                                    </div>
                                                    <div class="col"><?php echo $hospitalize->invoice_chit; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Hospital / clinic</b> 
                                                    </div>
                                                    <div class="col"><?php echo ($hospitalize->clinic_name)?$hospitalize->clinic_name:''; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Patient Name </b>
                                                    </div>
                                                    <div class="col"><?php echo $hospitalize->patient_name; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Relation </b>
                                                    </div>
                                                    <div class="col"><?php echo $hospitalize->relations; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Treatment</b> 
                                                    </div>
                                                    <div class="col"><?php echo $hospitalize->treatment; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Attachments</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php if($hospitalize->attachments) foreach ($hospitalize->attachments as $key => $attachment): ?>
                                                            <a href="<?php echo base_url('hr/claim/openAttachment/'.$attachment->unique_id); ?>" target="_blank"><?php echo $attachment->attachment_name; ?></a><br>
                                                        <?php endforeach ?>
                                                    </div>
                                                </div>
                                            </td>
                                            <td style="vertical-align:bottom;">
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Claim</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php echo number_format($hospitalize->amount_claim,2); ?>
                                                    </div>
                                                </div>
                                                <div class="row py-1 ">
                                                    <div class="col">
                                                        <b>Approved</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php echo number_format($hospitalize->amount_approved,2); ?>
                                                    </div>
                                                </div>
                                            </td>
                                            <td class="text-center" style="vertical-align:middle;">
                                                <div class="btn-group">
                                                    <?php if($screen_mode == 'hod'): ?>
                                                        <button class="btn btn-success btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approved Claim" data-claim-id="<?php echo $hospitalize->id; ?>" data-mode="2" onclick="hodApproval(this)">
                                                            <!-- <i class="fas fa-check"></i> -->
                                                            <i class="fas fa-thumbs-up" style="transform: scaleX(-1);"></i>
                                                        </button>
                                                        
                                                         
                                                        <!-- button rejecet -->
                                                        <button class="btn btn-danger btn-sm" 
                                                            data-trigger="hover" 
                                                            data-tooltip="tooltip" 
                                                            title="" 
                                                            data-original-title="Reject Claim" 
                                                            data-claim-id="<?php echo $outpatient->id; ?>" 
                                                            data-mode="2" 
                                                            data-toggle="modal" data-target="#rejectModal"
                                                            onclick="hodReject(this)"
                                                            >
                                                            <i class="fas fa-thumbs-down"></i>
                                                            <!-- <i class="fas fa-times"></i> -->
                                                        </button>
                                                        <!-- button rejecet -->

                                                        <!-- 
                                                        <button class="btn btn-danger btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Reject Claim" data-claim-id="<?php echo $hospitalize->id; ?>" data-mode="2" onclick="hodReject(this)" >
                                                            <i class="fas fa-times"></i>
                                                        </button>
                                                         -->
                                                    <?php else: ?>
                                                        <!-- 
                                                        <button class="btn btn-primary btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="View Claim">
                                                            <i class="fa fa-eye"></i>
                                                        </button> 
                                                        -->
                                                        <?php if($screen_mode == 'admin'):?>
                                                            <button class="btn btn-warning btn-sm text-white" onclick="approveClaim(this)"  data-price="<?php echo number_format($hospitalize->amount_claim,2); ?>" data-rqtarget="approveHospitalization" data-id="<?php echo ($hospitalize->id)?$hospitalize->id:0; ?>" data-status="<?php echo $hospitalize->is_approve; ?>" data-allocation="status" data-balanced="balanced" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approve Claim"><i class="fas fa-check"></i></button>
                                                        <?php endif ?>
                                                        <?php if(empty($screen_mode)): ?>
                                                        <button class="btn btn-danger btn-sm" data-rqtarget="removeHospitalization" data-id="<?php echo ($hospitalize->id)?$hospitalize->id:0?>" onclick="deleteClaim(this)" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Remove Claim" <?php echo ($disabled || !empty($claims->is_submit))?'disabled':''; ?>>
                                                            <i class="fa fa-trash-alt"></i>
                                                        </button>
                                                        <?php endif ?>
                                                    <?php endif ?>
                                                </div>
                                            </td>
                                        </tr>
                                    <?php endforeach ?>
                                    
                                    <!-- dentals claim list -->
                                    <?php if($dentals) foreach ($dentals as $key => $dental): ?>
                                        <tr>
                                            <td style="vertical-align:middle;"><?php echo ++$counter; ?></td>
                                            <td style="vertical-align:middle;">
                                                <?php echo date('d-F-Y',strtotime($dental->date)) ?>
                                            </td>
                                            <td>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Status (Admin)</b></div>
                                                    <div class="col">
                                                        <!-- admin -->
                                                        <?php if ($dental->is_approve == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-block btn-sm bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($dental->is_approve == 1): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-success btn-block btn-sm" type="button" disabled>
                                                                        <i class="fas fa-thumbs-up"></i> Approved
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($dental->is_approve == 2): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-danger btn-block btn-sm text-white" type="button" disabled>
                                                                        <i class="fas fa-ban"></i> Rejected
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>
                                                        <!-- -->
                                                    </div>
                                                </div>
                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Status (HOD) </b></div>
                                                    <div class="col">
                                                        <!-- HOD -->
                                                        <?php if($dental->is_hod_approved == 0): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-block btn-sm bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if($dental->is_hod_approved == 1): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-success btn-block btn-sm" type="button" disabled>
                                                                        <i class="fas fa-thumbs-up"></i> Approved
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($dental->is_hod_approved == 2): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-danger btn-sm btn-block text-white" type="button" disabled>
                                                                        <i class="fas fa-ban"></i> Rejected
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <!-- -->
                                                    </div>
                                                </div>
                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Type</b></div>
                                                    <div class="col text-primary">Dental and Optical</div>
                                                </div>
                                                
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Invoice Chit </b>
                                                    </div>
                                                    <div class="col"><?php echo $dental->invoice_chit; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Hospital / clinic</b> 
                                                    </div>
                                                    <div class="col"><?php echo $dental->clinic_name; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Attachments</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php if(!empty($dental->attachments)) foreach ($dental->attachments as $key => $attach): ?>
                                                            <a href="<?php echo base_url('/hr/claim/openAttachment/'.$attach->unique_id); ?>" target="_blank"><?php echo $attach->attachment_name; ?></a><br>
                                                        <?php endforeach ?>
                                                    </div>
                                                </div>
                                            </td>

                                            <td style="vertical-align:bottom;">
                                                <div class="row border-bottom">
                                                    <div class="col">
                                                        <b>Claim</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php echo number_format($dental->amount_claim,2); ?>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col">
                                                        <b>Approved</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php echo number_format($dental->amount_approved,2); ?>
                                                    </div>
                                                </div>
                                            </td>

                                            <td class="text-center" style="vertical-align:middle;">
                                                <div class="btn-group">
                                                    <?php if($screen_mode == 'hod'): ?>
                                                            <button class="btn btn-success btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approved Claim" data-claim-id="<?php echo $dental->id; ?>" data-mode="3" onclick="hodApproval(this)">
                                                            <i class="fas fa-thumbs-up" style="transform: scaleX(-1);"></i>
                                                                <!-- <i class="fas fa-check"></i> -->
                                                            </button>

                                                             
                                                        <!-- button rejecet -->
                                                        <button class="btn btn-danger btn-sm" 
                                                            data-trigger="hover" 
                                                            data-tooltip="tooltip" 
                                                            title="" 
                                                            data-original-title="Reject Claim" 
                                                            data-claim-id="<?php echo $outpatient->id; ?>" 
                                                            data-mode="3" 
                                                            data-toggle="modal" data-target="#rejectModal"
                                                            onclick="hodReject(this)"
                                                            >
                                                            <i class="fas fa-thumbs-down"></i>
                                                            <!-- <i class="fas fa-times"></i> -->
                                                        </button>
                                                        <!-- button rejecet -->

                                                        <!-- 
                                                            <button class="btn btn-danger btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Reject Claim" data-claim-id="<?php echo $dental->id; ?>" data-mode="3" onclick="hodReject(this)">
                                                                <i class="fas fa-times"></i>
                                                            </button> 
                                                        -->

                                                    <?php else: ?>
                                                        <!-- 
                                                        <button class="btn btn-primary btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="View Claim">
                                                            <i class="fa fa-eye"></i>
                                                        </button> 
                                                        -->
                                                        <?php if($screen_mode == 'admin'):?>
                                                            <button class="btn btn-warning btn-sm text-white" onclick="approveClaim(this)" data-price="<?php echo number_format($dental->amount_claim,2); ?>" data-rqtarget="approveDentals" data-id="<?php echo ($dental->id)?$dental->id:0; ?>" data-status="<?php echo $dental->is_approve; ?>" data-allocation="status" data-balanced="balanced" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approve Claim"><i class="fas fa-check"></i></button>
                                                        <?php endif ?>
                                                        <?php if(empty($screen_mode)): ?>
                                                        <button class="btn btn-danger btn-sm" data-rqtarget="removeDental" data-id="<?php echo ($dental->id)?$dental->id:0?>" onclick="deleteClaim(this)" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Remove Claim" <?php echo ($disabled || !empty($claims->is_submit))?'disabled':''; ?>>
                                                            <i class="fa fa-trash-alt"></i>
                                                        </button> 
                                                        <?php endif ?>                                                  
                                                    <?php endif ?>
                                                </div>
                                            </td>
                                        </tr>
                                    <?php endforeach ?>

                                    <!-- medical screening : probably not been used in the future-->
                                    <?php if($medicals) foreach ($medicals as $key => $medical): ?>
                                        <tr>
                                            <td style="vertical-align:middle;"><?php echo ++$counter; ?></td>
                                            <td style="vertical-align:middle;">
                                                <?php echo date('d-F-Y',strtotime($medical->date)); ?>
                                            </td>
                                            <td>
                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Status (Admin)</b></div>
                                                    <div class="col">

                                                        <?php if ($medical->is_approve == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-sm btn-block bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($medical->is_approve == 1): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-success btn-block btn-sm" type="button" disabled>
                                                                        <i class="fas fa-thumbs-up"></i> Approved
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($medical->is_approve == 2): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-danger btn-sm btn-block text-white" type="button" disabled>
                                                                        <i class="fas fa-ban"></i> Rejected
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>
                                                    </div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Status (HOD)</b></div>
                                                    <div class="col">
                                                        <?php if($medical->is_hod_approved == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-sm bg-dark btn-block text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if($medical->is_hod_approved == 1): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-success btn-sm btn-block text-white" type="button" disabled>
                                                                        <i class="fas fa-thumbs-up"></i> Approved
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($medical->is_hod_approved == 2): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-danger btn-sm btn-block text-white" type="button" disabled>
                                                                        <i class="fas fa-ban"></i> Rejected
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                    </div>
                                                </div>
                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Type</b></div>
                                                    <div class="col text-primary">Medical Screening</div>
                                                </div>
                                                
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Invoice Chit </b>
                                                    </div>
                                                    <div class="col"><?php echo $medical->invoice_chit; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Hospital / clinic</b> 
                                                    </div>
                                                    <div class="col"><?php echo $medical->clinic_name; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Attachments</b></div>
                                                    <div class="col">
                                                        <?php foreach ($medical->attachments as $key => $attach): ?>
                                                            <a href="<?php echo base_url('hr/claim/openAttachment/'.$attach->unique_id); ?>" target="_blank"><?php echo $attach->attachment_name; ?></a><br>
                                                        <?php endforeach ?>
                                                    </div>
                                                </div>
                                            </td>
                                            <td style="vertical-align:bottom;">
                                                <div class="row border-bottom">
                                                    <div class="col"><b>Claim</b></div>
                                                    <div class="col"><?php echo number_format($medical->amount_claim,2); ?></div>
                                                </div>
                                                <div class="row">
                                                    <div class="col"><b>Approved</b></div>
                                                    <div class="col"><?php echo number_format($medical->amount_approved,2); ?></div>
                                                </div>
                                            </td>
                                            <td class="text-center" style="vertical-align:middle;">
                                                <div class="btn-group">

                                                <?php if($screen_mode == 'hod'): ?>
                                                    <!-- 
                                                    <button class="btn btn-success btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approved Claim" data-claim-id="<?php echo $medical->id; ?>" data-mode="4" onclick="hodApproval(this)">
                                                        <i class="fas fa-check"></i>
                                                    </button> 
                                                    -->
                                                     
                                                        <!-- button rejecet -->
                                                        <button class="btn btn-danger btn-sm" 
                                                            data-trigger="hover" 
                                                            data-tooltip="tooltip" 
                                                            title="" 
                                                            data-original-title="Reject Claim" 
                                                            data-claim-id="<?php echo $outpatient->id; ?>" 
                                                            data-mode="4" 
                                                            data-toggle="modal" data-target="#rejectModal"
                                                            onclick="hodReject(this)"
                                                            >
                                                        <i class="fas fa-thumbs-down"></i>
                                                            <!-- <i class="fas fa-times"></i> -->
                                                        </button>
                                                        <!-- button rejecet -->
                                                    <!-- 
                                                    <button class="btn btn-danger btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Reject Claim" data-claim-id="<?php echo $dental->id; ?>" data-mode="4" onclick="hodReject(this)">
                                                        <i class="fas fa-times"></i>
                                                    </button> -->
                                                <?php else: ?>
                                                    <button class="btn btn-primary btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="View Claim">
                                                        <i class="fa fa-eye"></i>
                                                    </button>
                                                    <?php if($screen_mode == 'admin'): ?>
                                                        <button class="btn btn-warning btn-sm text-white" onclick="approveClaim(this)" data-price="<?php echo number_format($medical->amount_claim,2); ?>" data-rqtarget="approveMedicals" data-id="<?php echo ($medical->id)?$medical->id:0; ?>" data-status="<?php echo $medical->is_approve; ?>" data-allocation="status" data-balanced="balanced" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approve Claim"><i class="fas fa-check"></i></button>
                                                    <?php endif ?>
                                                    <?php if(empty($screen_mode)): ?>
                                                    <button class="btn btn-danger btn-sm" data-rqtarget="removeMedicalScreening" data-id="<?php echo ($medical->id)?$medical->id:0?>" onclick="deleteClaim(this)" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Remove Claim" <?php echo ($disabled || !empty($claims->is_submit))?'disabled':''; ?>>
                                                        <i class="fa fa-trash-alt"></i>
                                                    </button>
                                                    <?php endif ?>                                                                         
                                                <?php endif ?>

                                                    
                                                </div>
                                            </td>
                                        </tr>
                                    <?php endforeach ?>

                                    <!-- travel claim list -->
                                    <?php if($travels) foreach ($travels as $key => $travel): ?>
                                        <tr>
                                            <td style="vertical-align:middle;"><?php echo ++$counter; ?></td>
                                            <td style="vertical-align:middle;">
                                                <?php echo date('d-F-Y',strtotime($travel->travelling_date)); ?>
                                            </td>
                                            <td>
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Status (Admin)</b>
                                                    </div>
                                                    <div class="col">

                                                        <?php if ($travel->status == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-block btn-sm bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($travel->status == 1): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-success btn-block btn-sm" type="button" disabled>
                                                                        <i class="fas fa-thumbs-up"></i> Approved
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($travel->status == 2): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-danger btn-block btn-sm text-white" type="button" disabled>
                                                                        <i class="fas fa-ban"></i> Rejected
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                    </div>
                                                </div>
                                                
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Status (HOD)</b>
                                                    </div>
                                                    <div class="col">

                                                        <?php if ($travel->is_hod_approved == 0): ?>
                                                            <div class="input-group">
                                                            <div class="input-group-prepend w-100">
                                                                <button class="btn btn-default btn-block btn-sm bg-dark text-white" type="button" disabled>
                                                                    <i class="fas fa-tasks"></i> Draft
                                                                </button>
                                                            </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($travel->is_hod_approved == 1): ?>
                                                            <div class="input-group w-100">
                                                            <div class="input-group-prepend w-100">
                                                                <button class="btn btn-success btn-block btn-sm" type="button" disabled>
                                                                    <i class="fas fa-thumbs-up"></i> Approved
                                                                </button>
                                                            </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($travel->is_hod_approved == 2): ?>
                                                            <div class="input-group">
                                                            <div class="input-group-prepend w-100">
                                                                <button class="btn btn-danger btn-block btn-sm text-white" type="button" disabled>
                                                                    <i class="fas fa-ban"></i> Rejected
                                                                </button>
                                                            </div>
                                                            </div>
                                                        <?php endif ?>

                                                    </div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Type</b></div>
                                                    <div class="col text-primary">Travel</div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col-12"><b>Task</b></div>
                                                    <div class="col"><?php echo $travel->task; ?></div>
                                                </div>

                                                <?php if($travel->details) foreach ($travel->details as $key => $detail): ?>
                                                    <div class="row">
                                                        <div class="col-6">
                                                            <i class="<?php echo $detail['claim_type_icon']; ?>"></i> <?php echo $detail['claim_type']; ?>
                                                        </div>
                                                        <div class="col-6">RM<?php echo number_format($detail['amount'],2); ?></div>
                                                    </div>
                                                    <?php if($key == sizeof($travel->details)-1)
                                                    {
                                                        echo '<div class="row py-1 border-bottom"></div>';
                                                    }
                                                    ?>
                                                <?php endforeach ?>
                                                
                                                <div class="row py-1 border-bottom">
                                                    <div class="col-12">
                                                        <b>Routes</b>
                                                    </div>
                                                    <?php if($travel->routes) foreach($travel->routes as $key => $route): ?>
                                                    
                                                        <div class="col-12">
                                                            <i class="fas fa-map-marker-alt text-danger"></i>
                                                            <a href="https://www.google.com/maps/search/?api=1&parameters=<?php echo $route->from; ?>" target="_blank">
                                                                [<?php echo substr($route->from,0,25); ?>
                                                                <span class="dot" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="<?php echo $route->from; ?>" ><i class="fas fa-ellipsis-h"></i></span>]
                                                            </a>
                                                            <br>

                                                            
                                                            <i class="fas fa-arrow-right text-success"></i>
                                                            <br/>
                                                            <i class="fas fa-map-marker-alt text-danger"></i>
                                                            <a href="https://www.google.com/maps/search/?api=1&parameters=<?php echo $route->to;?>" target="_blank">
                                                                [<?php echo substr($route->to,0,25); ?> 
                                                                <span class="dot" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="<?php echo $route->to; ?>"><i class="fas fa-ellipsis-h"></i></span>]
                                                            </a>
                                                            <br/>
                                                                (<?php echo number_format($route->distance,2); ?> <b>KM</b>)
                                                            <br/><br/>
                                                        </div>  
                                                    <?php endforeach?>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col-12"><b>Attachments</b></div>
                                                    <?php if($travel->attachments) foreach($travel->attachments as $key => $attachment): ?>
                                                        <div class="col-12">
                                                            <a href="<?php echo base_url('/hr/claim/openAttachment/'.$attachment->unique_id); ?>" target="_blank"><?php echo $attachment->attachment_name; ?></a>
                                                        </div>
                                                        <!-- <?php
                                                            if($key == sizeof($travel->attachments)-1)
                                                            {
                                                                echo '<div class="py-1 border-bottom"></div>';
                                                            }
                                                        ?> -->
                                                    <?php endforeach ?>
                                                </div>
                                            </td>
                                            <td class="text-center" style="vertical-align:bottom;">
                                                
                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Mileage</b></div>
                                                    <div class="col">
                                                    <?php 
                                                        echo number_format($travel->mileage_amount,2); 
                                                    ?>
                                                    </div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Travelling</b></div>
                                                    <div class="col">
                                                    <?php 
                                                        echo number_format($travel->amount_claim,2); 
                                                    ?>
                                                    </div>
                                                </div>

                                                <div class="row py-1">
                                                    <div class="col"><b>Approved</b></div>
                                                    <div class="col"><?php echo number_format($travel->amount_approve,2); ?></div>
                                                </div>
                                            </td>
                                            <td class="text-center" style="vertical-align:middle;">
                                                <div class="btn-group">
                                                    <?php if($screen_mode == 'hod'): ?>
                                                        <button class="btn btn-success btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approved Claim" data-claim-id="<?php echo $travel->id; ?>" data-mode="6" onclick="hodApproval(this)">
                                                            <!-- <i class="fas fa-check"></i> -->
                                                            <i class="fas fa-thumbs-up" style="transform: scaleX(-1);"></i>    
                                                        </button>
                                                        <!-- button reject -->
                                                        <button class="btn btn-danger btn-sm" 
                                                            data-trigger="hover" 
                                                            data-tooltip="tooltip" 
                                                            title="" 
                                                            data-original-title="Reject Claim" 
                                                            data-claim-id="<?php echo $travel->id; ?>" 
                                                            data-mode="6" 
                                                            data-toggle="modal" data-target="#rejectModal"
                                                            onclick="hodReject(this)"
                                                            >
                                                            <!-- <i class="fas fa-times"></i> -->
                                                            <i class="fas fa-thumbs-down"></i>
                                                        </button>
                                                        <!-- button reject -->
                                                    <?php else: ?>
                                                        <?php if($screen_mode == 'admin'): ?>
                                                            <button class="btn btn-warning btn-sm text-white" onclick="approveClaim(this)" data-price="<?php echo number_format($travel->amount_claim,2); ?>" data-rqtarget="approveTravels" data-id="<?php echo ($travel->id)?$travel->id:0; ?>" data-status="<?php echo $travel->status; ?>" data-allocation="status" data-balanced="balanced" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approve Claim"><i class="fas fa-check"></i></button>
                                                        <?php endif ?>
                                                        <?php if(empty($screen_mode)): ?>
                                                        <button class="btn btn-danger btn-sm" data-rqtarget="removeTravel" data-id="<?php echo ($travel->id)?$travel->id:0?>" onclick="deleteClaim(this)" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Remove Claim" <?php echo ($disabled || !empty($claims->is_submit))?'disabled':''; ?>>
                                                            <i class="fa fa-trash-alt"></i>
                                                        </button>
                                                        <?php endif ?>
                                                    <?php endif ?>                                                  
                                                </div>
                                            </td>
                                        </tr>
                                    <?php endforeach ?>
                                    

                                    <!-- mileage claim list : probably will never been used because travel claim -->
                                    <?php if($mileage) foreach ($mileage as $key => $mil): ?>
                                        <tr>
                                            <td style="vertical-align:middle;"><?php echo ++$counter; ?></td>
                                            <td style="vertical-align:middle;">
                                                <?php echo date('d-F-Y',strtotime($mil->date)); ?>
                                            </td>
                                            <td>
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Status (Admin)</b>
                                                    </div>
                                                    <div class="col">

                                                        <?php if ($mil->is_approve == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-sm btn-block bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($mil->is_approve == 1): ?>
                                                            <div class="input-group w-100">
                                                            <div class="input-group-prepend w-100">
                                                                <button class="btn btn-success btn-sm btn-block" type="button" disabled>
                                                                    <i class="fas fa-thumbs-up"></i> Approved
                                                                </button>
                                                                
                                                            </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($mil->is_approve == 2): ?>
                                                            <div class="input-group">
                                                            <div class="input-group-prepend w-100">
                                                                <button class="btn btn-danger btn-sm text-white btn-block" type="button" disabled>
                                                                    <i class="fas fa-ban"></i> Rejected
                                                                </button>
                                                                
                                                            </div>
                                                            </div>
                                                        <?php endif ?>

                                                    </div>
                                                </div>
                                                
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Status (HOD)</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php if ($mil->is_hod_approved == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-sm btn-block bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($mil->is_hod_approved == 1): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-success btn-block btn-sm" type="button" disabled>
                                                                        <i class="fas fa-thumbs-up"></i> Approved
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($mil->is_hod_approved == 2): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-danger btn-sm btn-block text-white" type="button" disabled>
                                                                        <i class="fas fa-ban"></i> Rejected
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                    </div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Type</b></div>
                                                    <div class="col text-primary">Mileage</div>
                                                </div>
                                    
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Transport</b> 
                                                    </div>
                                                    <div class="col">
                                                        <?php echo $mil->transport; ?>
                                                    </div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Distance</b> 
                                                    </div>
                                                    <div class="col"><?php echo $mil->distance.' KM'; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Description</b> 
                                                    </div>
                                                    <div class="col"><?php echo $mil->description; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Attachments</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php foreach ($mil->attachments as $key => $ml): ?>
                                                            <a href="<?php echo base_url('/hr/claim/openAttachment/'.$ml->unique_id); ?>" target="_blank"><?php echo $ml->attachment_name; ?></a><br>
                                                        <?php endforeach ?>
                                                    </div>
                                                </div>
                                            </td>
                                            <td style="vertical-align:bottom;">
                                                <div class="row border-bottom">
                                                    <div class="col">
                                                        <b>Claim</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php echo number_format($mil->amount_claim,2); ?>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col">
                                                        <b>Approved</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php echo number_format($mil->amount_approve,2); ?>
                                                    </div>
                                                </div>
                                            </td>
                                            <td class="text-center" style="vertical-align:middle;">
                                                <div class="btn-group">

                                                <?php if($screen_mode == 'hod'): ?>
                                                    <button class="btn btn-success btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approved Claim" data-claim-id="<?php echo $mil->id; ?>" data-mode="5" onclick="hodApproval(this)">
                                                        <!-- <i class="fas fa-check"></i> -->
                                                        <i class="fas fa-thumbs-up" style="transform: scaleX(-1);"></i>
                                                    </button>
                                                     
                                                        <!-- button rejecet -->
                                                        <button class="btn btn-danger btn-sm" 
                                                            data-trigger="hover" 
                                                            data-tooltip="tooltip" 
                                                            title="" 
                                                            data-original-title="Reject Claim" 
                                                            data-claim-id="<?php echo $outpatient->id; ?>" 
                                                            data-mode="5" 
                                                            data-toggle="modal" data-target="#rejectModal"
                                                            onclick="hodReject(this)"
                                                            >
                                                            <!-- <i class="fas fa-times"></i> -->
                                                            <i class="fas fa-thumbs-down"></i>
                                                        </button>
                                                        <!-- button rejecet -->

                                                    <!-- 
                                                    <button class="btn btn-danger btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Reject Claim" data-claim-id="<?php echo $mil->id; ?>" data-mode="5" onclick="hodReject(this)">
                                                        <i class="fas fa-times"></i>
                                                    </button> 
                                                    -->

                                                <?php else: ?>
                                                    <!-- 
                                                    <button class="btn btn-primary btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="View Claim">
                                                        <i class="fa fa-eye"></i>
                                                    </button> 
                                                    -->
                                                    <?php if($screen_mode == 'admin'): ?>
                                                        <button class="btn btn-warning btn-sm text-white" onclick="approveClaim(this)" data-price="<?php echo number_format($mil->amount_claim,2); ?>" data-rqtarget="approveMileage" data-id="<?php echo ($mil->id)?$mil->id:0; ?>" data-status="<?php echo $mil->is_approve; ?>" data-allocation="status" data-balanced="balanced" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approve Claim"><i class="fas fa-check"></i></button>
                                                    <?php endif ?>
                                                    <?php if(empty($screen_mode)): ?>
                                                    <button class="btn btn-danger btn-sm" data-rqtarget="removeMileage"  data-id="<?php echo ($mil->id)?$mil->id:0?>" onclick="deleteClaim(this)" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Remove Claim" <?php echo ($disabled || !empty($claims->is_submit))?'disabled':''; ?>>
                                                        <i class="fa fa-trash-alt"></i>
                                                    </button>
                                                    <?php endif ?>
                                                <?php endif ?>
                                                </div>
                                            </td>
                                        </tr>
                                    <?php endforeach ?>

                                    <!-- meals claim list probably will not been used because travel and ot --> 
                                    <?php if($meals) foreach ($meals as $key => $meal): ?>
                                        <tr>
                                            <td style="vertical-align:middle;"><?php echo ++$counter; ?></td>
                                            <td style="vertical-align:middle;">
                                                <?php echo date('d-F-Y', strtotime($meal->date)); ?>
                                            </td>
                                            <td>
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Status (Admin)</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php if ($meal->is_approve == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-block btn-sm bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($meal->is_approve == 1): ?>
                                                            <div class="input-group w-100">
                                                            <div class="input-group-prepend w-100">
                                                                <button class="btn btn-success btn-block btn-sm" type="button" disabled>
                                                                    <i class="fas fa-thumbs-up"></i> Approved
                                                                </button>
                                                            </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($meal->is_approve == 2): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-danger btn-block  btn-sm text-white" type="button" disabled>
                                                                        <i class="fas fa-ban"></i> Rejected
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>
                                                    </div>
                                                </div>
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Status (HOD)</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php if($meal->is_hod_approved == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-block btn-sm bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>
                                                        
                                                        <?php if($meal->is_hod_approved == 1): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-success btn-block btn-sm" type="button" disabled>
                                                                        <i class="fas fa-thumbs-up"></i> Approved
                                                                    </button>
                                                                </div>
                                                            </div>    
                                                        <?php endif ?>
                                                        
                                                        <?php if($meal->is_hod_approved == 2): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-danger btn-block btn-sm" type="button" disabled>
                                                                        <i class="fas fa-ban"></i> Rejected
                                                                    </button>
                                                                </div>
                                                            </div>    
                                                        <?php endif ?>
                                                    </div>
                                                </div>
                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Type</b></div>
                                                    <div class="col text-primary">Meals</div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Restaurant Name</b></div>
                                                    <div class="col"><?php echo $meal->restaurant_name; ?></div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class='col'><b>Attachments</b></div>
                                                    <div class="col">
                                                        <?php if($meal->attachments) foreach ($meal->attachments as $key => $attach): ?>
                                                            <a href="<?php echo base_url('hr/claim/openAttachment/'.$attach->unique_id); ?>" target="_blank"><?php echo $attach->attachment_name; ?></a>
                                                        <?php endforeach ?>
                                                    </div>
                                                </div>
                                            </td>
                                            <td style="vertical-align:bottom;">
                                                <div class="row border-bottom">
                                                    <div class="col">
                                                        <b>Claim</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php echo number_format($meal->amount_claim,2); ?>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col">
                                                        <b>Approved</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php echo number_format($meal->amount_approved,2); ?>
                                                    </div>
                                                </div>
                                            </td>
                                            <td class="text-center" style="vertical-align:middle;">
                                                <div class="btn-group">

                                                <?php if($screen_mode == 'hod'): ?>
                                                    <button class="btn btn-success btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approved Claim" data-claim-id="<?php echo $meal->id; ?>" data-mode="7" onclick="hodApproval(this)">
                                                        <!-- <i class="fas fa-check"></i>  -->
                                                        <i class="fas fa-thumbs-up" style="transform: scaleX(-1);"></i>
                                                    </button>
                                                     
                                                        <!-- button rejecet -->
                                                        <button class="btn btn-danger btn-sm" 
                                                            data-trigger="hover" 
                                                            data-tooltip="tooltip" 
                                                            title="" 
                                                            data-original-title="Reject Claim" 
                                                            data-claim-id="<?php echo $outpatient->id; ?>" 
                                                            data-mode="7" 
                                                            data-toggle="modal" data-target="#rejectModal"
                                                            onclick="hodReject(this)"
                                                            >
                                                            <!-- <i class="fas fa-times"></i> -->
                                                            <i class="fas fa-thumbs-down"></i>
                                                        </button>
                                                        <!-- button rejecet -->

                                                    <!-- <button class="btn btn-danger btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Reject Claim" data-claim-id="<?php echo $meal->id; ?>" data-mode="7" onclick="hodReject(this)">
                                                        <i class="fas fa-times"></i>
                                                    </button> -->
                                                <?php else: ?>
                                                    <!-- <button class="btn btn-primary btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="View Claim">
                                                        <i class="fa fa-eye"></i>
                                                    </button> -->
                                                    <?php if($screen_mode == 'admin'): ?>
                                                        <button class="btn btn-warning btn-sm text-white" onclick="approveClaim(this)" data-price="<?php echo number_format($meal->amount_claim,2); ?>" data-rqtarget="approveMeals" data-id="<?php echo ($meal->id)?$meal->id:0; ?>" data-status="<?php echo $meal->is_approve; ?>" data-allocation="status" data-balanced="balanced" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approve Claim"><i class="fas fa-check"></i></button>
                                                    <?php endif ?>
                                                    <?php if(empty($screen_mode)): ?>
                                                    <button class="btn btn-danger btn-sm" data-rqtarget="removeMeal" data-id="<?php echo ($meal->id)?$meal->id:0; ?>" onclick="deleteClaim(this)" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Remove Claim" <?php echo ($disabled || !empty($claims->is_submit))?'disabled':''; ?>>
                                                        <i class="fa fa-trash-alt"></i>
                                                    </button>
                                                    <?php endif ?>
                                                <?php endif ?>
                                                </div>
                                            </td>
                                        </tr>
                                    <?php endforeach ?>

                                    <!-- others claim list -->                     
                                    <?php if($others) foreach ($others as $key => $other): ?>
                                        <tr>
                                            <td style="vertical-align:middle;"><?php echo ++$counter; ?></td>
                                            <td style="vertical-align:middle;">
                                                <?php echo date('d-F-Y',strtotime($other->date)); ?>
                                            </td>
                                            <td>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Status (Admin)</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php if ($other->is_approve == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-block btn-sm bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($other->is_approve == 1): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-block btn-success btn-sm" type="button" disabled>
                                                                        <i class="fas fa-thumbs-up"></i> Approved
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($other->is_approve == 2): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-block btn-danger btn-sm text-white" type="button" disabled>
                                                                        <i class="fas fa-ban"></i> Rejected
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>
                                                    </div>
                                                </div>
                                                
                                                <div class="row">
                                                    <div class="col">
                                                        <b>Status (HOD)</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php if ($other->is_hod_approved == 0): ?>
                                                            <div class="input-group">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-default btn-block btn-sm bg-dark text-white" type="button" disabled>
                                                                        <i class="fas fa-tasks"></i> Draft
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>

                                                        <?php if ($other->is_hod_approved == 1): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-block btn-success btn-sm" type="button" disabled>
                                                                        <i class="fas fa-thumbs-up"></i> Approved
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        <?php endif ?>
                                                        
                                                        <?php if($other->is_hod_approved == 2): ?>
                                                            <div class="input-group w-100">
                                                                <div class="input-group-prepend w-100">
                                                                    <button class="btn btn-danger btn-block btn-sm" type="button" disabled>
                                                                        <i class="fas fa-ban"></i> Rejected
                                                                    </button>
                                                                </div>
                                                            </div>    
                                                        <?php endif ?>

                                                    </div>
                                                </div>

                                                <div class="row py-1 border-bottom">
                                                    <div class="col"><b>Type</b></div>
                                                    <div class="col text-primary">Others</div>
                                                </div>
                                                <div class="row py-1 border-bottom">
                                                    <div class="col">
                                                        <b>Client</b>
                                                    </div>
                                                    <div class="col">

                                                    </div>
                                                </div>
                                                <div class="row border-bottom"><div class="col"><?php echo $other->description; ?></div></div>

                                                <div class="row">
                                                    <div class="col">
                                                        <b>Attachments</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php if($other->attachments) foreach ($other->attachments as $key => $attach): ?>
                                                            <a href="<?php echo base_url('hr/claim/openAttachment/'.$attach->unique_id); ?>" target="_blank"><?php echo $attach->attachment_name; ?></a><br>
                                                        <?php endforeach ?>
                                                    </div>
                                                </div>
                                            </td>
                                            <td style="vertical-align:bottom;">
                                                <div class="row border-bottom">
                                                    <div class="col">
                                                        <b>Claim</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php echo number_format($other->amount_claim,2); ?>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col">
                                                        <b>Approved</b>
                                                    </div>
                                                    <div class="col">
                                                        <?php echo number_format($other->amount_approved,2); ?>
                                                    </div>
                                                </div>
                                            </td>
                                            <td class="text-center" style="vertical-align:middle;">
                                                <div class="btn-group">
                                                <?php if($screen_mode == 'hod'): ?>
                                                    <button class="btn btn-success btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approved Claim" data-claim-id="<?php echo $other->id; ?>" data-mode="8" onclick="hodApproval(this)">
                                                        <!-- <i class="fas fa-check"></i> -->
                                                        <i class="fas fa-thumbs-up" style="transform: scaleX(-1);"></i>
                                                    </button>
                                                     
                                                        <!-- button rejecet -->
                                                        <button class="btn btn-danger btn-sm" 
                                                            data-trigger="hover" 
                                                            data-tooltip="tooltip" 
                                                            title="" 
                                                            data-original-title="Reject Claim" 
                                                            data-claim-id="<?php echo $outpatient->id; ?>" 
                                                            data-mode="8" 
                                                            data-toggle="modal" data-target="#rejectModal"
                                                            onclick="hodReject(this)"
                                                            >
                                                            <!-- <i class="fas fa-times"></i> -->
                                                            <i class="fas fa-thumbs-down"></i>
                                                        </button>
                                                        <!-- button rejecet -->

                                                    <!-- 
                                                    <button class="btn btn-danger btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Reject Claim" data-claim-id="<?php echo $other->id; ?>" data-mode="8" onclick="hodReject(this)">
                                                        <i class="fas fa-times"></i>
                                                    </button> 
                                                    -->

                                                <?php else: ?>
                                                    <!-- <button class="btn btn-primary btn-sm" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="View Claim">
                                                        <i class="fa fa-eye"></i>
                                                    </button> -->
                                                    <?php if($screen_mode == 'admin'): ?>
                                                        <button class="btn btn-warning btn-sm text-white" onclick="approveClaim(this)" data-price="<?php echo number_format($other->amount_claim,2); ?>" data-rqtarget="approveOthers" data-id="<?php echo ($other->id)?$other->id:0; ?>" data-status="<?php echo $other->is_approve; ?>" data-allocation="status" data-balanced="balanced" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Approve Claim"><i class="fas fa-check"></i></button>
                                                    <?php endif ?>
                                                    <?php if(empty($screen_mode)): ?>
                                                    <button class="btn btn-danger btn-sm" data-rqtarget="removeOther" data-id="<?php echo ($other->id)?$other->id:0; ?>" onclick="deleteClaim(this)" data-trigger="hover" data-tooltip="tooltip" title="" data-original-title="Remove Claim" <?php echo ($disabled || !empty($claims->is_submit))?'disabled':''; ?>>
                                                        <i class="fa fa-trash-alt"></i>
                                                    </button>
                                                    <?php endif ?>
                                                <?php endif ?>
                                                </div>
                                            </td>
                                        </tr>
                                    <?php endforeach ?>

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