<?php $__env->startSection('title', 'Employee Profile'); ?>


<?php $__env->startSection('internal-js'); ?>
    <script>
        $(document).ready(function () {
            $('#example1').dataTable();
            $('#example2').dataTable();
            $('#advanceSalaryTable').dataTable();
            $('#payroll-history-table').dataTable();

            /**Push States**/
            $('#personal-details-url').on('click', function (){
                window.history.pushState({}, '', '?type=active');
            });
            $('#education-details-url').on('click', function (){
                window.history.pushState({}, '', '?type=EducationDetails');
            });
            $('#employment-details-url').on('click', function (){
                window.history.pushState({}, '', '?type=EmploymentDetails');
            });
            $('#leave-details-url').on('click', function (){
                window.history.pushState({}, '', '?type=LeaveManagement');
            });
            $('#salary-advance-url').on('click', function (){
                window.history.pushState({}, '', '?type=SalaryAdvance');
            });
            $('#payroll-details-url').on('click', function (){
                window.history.pushState({}, '', '?type=PayrollDetails');
            });
            $('#payroll-history-url').on('click', function (){
                window.history.pushState({}, '', '?type=PayrollHistory');
            });
        });

        function updateMyPersonalDetails(){
            var route_link = '/update-employee-details';


            $('#edit_dialog_content').html('<div style="text-align: center; margin: 20px 0 20px 0;"><img src="<?php echo e(asset('images/loads/loader.gif')); ?>" border=0></div>')
                .load(encodeURI(route_link))
                .dialog({
                    modal: true,
                    width: 700,
                    title: "Update My Personal Details",

                    buttons: [
                        {
                            text: "Save Details",
                            icon: "ui-icon-check",
                            id: "my-button-1",
                            click: function(e) {
                                if(confirm('Are you sure to Save Entered Details?')){
                                    e.preventDefault();
                                    $("#my-button-1").attr('disabled', true).text('Please Wait....');
                                    var datas = $('#update-my-personal-details').serializeArray();

                                    $.ajax({
                                        method: "POST",
                                        url: route_link,
                                        data: datas,
                                        success: function (res){
                                            if(res == 'success'){
                                                window.location = '/employee-file?updatePersonalDetails=true';
                                            }else if(res == 'empty fields'){
                                                alert('Please provide details for all sections marked with the Red Asterisks');
                                                $("#my-button-1").attr('disabled', false).text('Save Details');
                                            }else if(res == 'error'){
                                                alert('There was an Error while trying to update your Records');
                                                $("#my-button-1").attr('disabled', false).text('Save Details');
                                            }else{
                                                alert('System Encountered an Error. Please Contact System Admin');
                                            }
                                        }
                                    });
                                }
                                return false;
                            }
                        }
                    ],
                    open: function() {
                        $(this).parent().css({'top': 50});
                    }
                });
        }

        function applyForAdvanceSalary(){
            var route_link = '/apply-advance-salary';

            $('#edit_dialog_content').html('<div style="text-align: center; margin: 20px 0 20px 0;"><img src="<?php echo e(asset('images/loads/loader.gif')); ?>" border=0></div>')
            .load(encodeURI(route_link))
            .dialog({
                modal: true,
                width: 650,
                title: "Apply Advance Salary",

                buttons: [
                    {
                        text: "Apply For Advance",
                        icon: "ui-icon-check",
                        id: "my-button-1",
                        click: function(e) {
                            if(confirm('Are you sure to Save Entered Details?')){
                                e.preventDefault();
                                $("#my-button-1").attr('disabled', true).text('Please Wait....');
                                var datas = $('#apply-advance-salary').serializeArray();

                                $.ajax({
                                    method: "POST",
                                    url: route_link,
                                    data: datas,
                                    success: function (res){
                                        if(res == 'success'){
                                            window.location = '/employee-file?type=SalaryAdvance&applyAdvanceSalary=true';
                                        }else if(res == 'zero amount'){
                                            alert('You cannot apply a Zero Amount advance Salary');
                                            $("#my-button-1").attr('disabled', false).text('Save Details');
                                        }else if(res == 'empty narration'){
                                            alert('Please provide a Reason as to why you want an Advance Salary');
                                            $("#my-button-1").attr('disabled', false).text('Save Details');
                                        }else if(res == 'zero duration'){
                                            alert('You cannot Pay an Advance Salary with  a Zero Duration');
                                            $("#my-button-1").attr('disabled', false).text('Save Details');
                                        }else if(res == 'more duration'){
                                            alert('You cannot Pay an Advance Salary with more than 12 Months');
                                            $("#my-button-1").attr('disabled', false).text('Save Details');
                                        }else if(res == 'uncleared advances'){
                                            alert('You have Uncleared Advances. Please clear them to Apply a New One');
                                            $("#my-button-1").attr('disabled', false).text('Save Details');
                                        }else if(res == 'error'){
                                            alert('There was an Error while trying to apply for an Advance Salary');
                                            $("#my-button-1").attr('disabled', false).text('Save Details');
                                        }else{
                                            alert('System Encountered an Error. Please Contact System Admin');
                                            window.location = '/employee-file?type=SalaryAdvance&applyAdvanceSalary=false';
                                        }
                                    }
                                });
                            }
                            return false;
                        }
                    }
                ],
                open: function() {
                    $(this).parent().css({'top': 50});
                }
            });
        }

        
        function viewAdvanceSalaryReport(id){
            var route_link = '/advance-salary-repayment-report/'+id;

            $('#edit_dialog_content').html('<div style="text-align: center; margin: 20px 0 20px 0;"><img src="<?php echo e(asset('images/loads/loader.gif')); ?>" border=0></div>')
                .load(encodeURI(route_link))
                .dialog({
                    modal: true,
                    width: 650,
                    title: "Advance Salary Repayment Report",
                    open: function() {
                        $(this).parent().css({'top': 50});
                    }
                });
        }
    </script>
<?php $__env->stopSection(); ?>


<?php $__env->startSection('internal-css'); ?>
    <style>
        #example1 th, td {
            text-align: left;
            padding: 5px;
        }
        #example1 tr:hover {background-color: #a3aef6;}

        #example2 th, td {
            text-align: left;
            padding: 5px;
        }
        #example2 tr:hover {background-color: #a3aef6;}

        #advanceSalaryTable th, td {
            text-align: left;
            padding: 5px;
        }
        #advanceSalaryTable tr:hover {background-color: #a3aef6;}

        #payroll-history-table th, td {
            text-align: left;
            padding: 5px;
        }
        #payroll-history-table tr:hover {background-color: #a3aef6;}
    </style>
<?php $__env->stopSection(); ?>




<?php $__env->startSection('heading'); ?>
    My User Profile:
    <?php if(isset($employee)): ?>
        <span class="error"><?php echo strtoupper($employee->firstName." ".$employee->lastName); ?></span> |
        <span class="success"> <?php echo $employee->accessType($employee->access); ?></span> |
        <span class="error">
        <?php if($employee->branchDetails != null): ?>
                <?php echo $employee->branchDetails->name.' Branch'; ?>

            <?php endif; ?>
        </span>
    <?php endif; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('searches', ''); ?>


<?php $__env->startSection('content'); ?>
    <?php if(isset($_GET['applyAdvanceSalary'])): ?>
        <div class="error-section">
            <span onclick="this.parentElement.style.display='none'" class="topright" style="color: white ;margin-top: -4px;font-weight: bold; margin-right: 5px">&times</span>
            <?php if($_GET['applyAdvanceSalary'] == 'true'): ?>
                <div class="yesFound">Salary Advance Successfully Applied. Please wait for it to be Approved</div><br>
            <?php elseif($_GET['applyAdvanceSalary'] == 'false'): ?>
                <div class="notFound">System is unable to save Advance Salary Details submitted . Please Contact System Admin for Assistance</div><br>
            <?php endif; ?>
        </div>
    <?php endif; ?>
    <div class="guestDetails_buttons_left">
        <div class="guestDetails_buttons_left">
            <button type="button" class="navButtons" style="background-color: #2f45d7;margin-left: 0;margin-bottom: 0" onclick="updateMyPersonalDetails()"><i class="fa fa-pencil-square-o"></i> &nbsp;PERSONAL DETAILS</button>
            <button type="button" class="navButtons" style="background-color: #2f45d7;margin-bottom: 0" onclick="addEducationDetails()"><i class="fa fa-plus-circle"></i> &nbsp;EDUCATION DETAILS</button>
            <button type="button" class="navButtons" style="background-color: #14CF5F;margin-bottom: 0" onclick="applyForAdvanceSalary()"><i class="fa fa-money"></i> &nbsp;APPLY ADVANCE SALARY</button>
            <button type="button" class="navButtons" style="background-color: #14CF5F;margin-bottom: 0" onclick="applyForLeave()"><i class="fa fa-calendar"></i> &nbsp;APPLY LEAVE</button>
            <button type="button" class="navButtons" style="background-color: #f1d414;margin-bottom: 0; color: black" onclick="downloadPNineForm()"><i class="fa fa-download"></i> &nbsp;DOWNLOAD P9 FORMS</button>
        </div>
    </div>
    <div class="guestDetails_inputDivider2"></div>
    <div class="tab">
        <button class="tablinks" onclick="openCity(event, 'general')" <?php if(isset($_GET['type']) && $_GET['type'] == 'active'): ?> id="defaultOpen" <?php else: ?> id="personal-details-url"<?php endif; ?> >General Personal Details</button>
        <button class="tablinks" onclick="openCity(event, 'education')" <?php if(isset($_GET['type']) && $_GET['type'] == 'EducationDetails'): ?> id="defaultOpen" <?php else: ?> id="education-details-url"<?php endif; ?>>Education Details</button>
        <button class="tablinks" onclick="openCity(event, 'employment')" <?php if(isset($_GET['type']) && $_GET['type'] == 'EmploymentDetails'): ?> id="defaultOpen" <?php else: ?> id="employment-details-url"<?php endif; ?>>Employment Details</button>
        <button class="tablinks" onclick="openCity(event, 'leave')" <?php if(isset($_GET['type']) && $_GET['type'] == 'LeaveManagement'): ?> id="defaultOpen" <?php else: ?> id="leave-details-url"<?php endif; ?>>Leave Management</button>
        <button class="tablinks" onclick="openCity(event, 'advances')" <?php if(isset($_GET['type']) && $_GET['type'] == 'SalaryAdvance'): ?> id="defaultOpen" <?php else: ?> id="salary-advance-url"<?php endif; ?>>Salary Advances</button>
        <button class="tablinks" onclick="openCity(event, 'payroll')" <?php if(isset($_GET['type']) && $_GET['type'] == 'PayrollDetails'): ?> id="defaultOpen" <?php else: ?> id="payroll-details-url"<?php endif; ?>>Payroll Details</button>
        <button class="tablinks" onclick="openCity(event, 'payrollHistory')" <?php if(isset($_GET['type']) && $_GET['type'] == 'PayrollHistory'): ?> id="defaultOpen" <?php else: ?> id="payroll-history-url"<?php endif; ?>>Payroll History</button>
    </div>

    <div class="tabcontent" id="general">
        <h3><span class="error" style="margin-right: 20px">My Personal Details</span></h3>
        <div style="background-color: rgba(234,236,238,0.72); border-radius: 5px; padding: 5px 6px">
            <div id="main-div-section">
                <div class="wrapperer" id="client-table-wrapper">
                    <div class="column" style="max-width: 12%">
                        <table  style="width: 100%; border-collapse: collapse">
                            <tr >
                                <th rowspan="6"><img src="<?php echo e(asset('images/user.png')); ?>" style="width: 100px; height: 90px; border-radius: 50%"><br>
                                    <?php if(app('CompanyModules')->dms == 1): ?>
                                        <button type="button" style="cursor: pointer; font-size: 8pt"><i class="fa fa-upload" aria-hidden="true"></i> &nbsp; Upload Photo</button>
                                    <?php endif; ?>
                                </th>
                            </tr>
                        </table>
                    </div>
                    <div class="column">
                        <table  class="table" style="width: 100%; border-collapse:collapse; margin: 5px">
                            <tr>
                                <th>User Name:</th>
                                <td><b class="error"><?php echo strtoupper($employee->firstName." ".$employee->lastName); ?></b></td>
                            </tr>
                            <tr>
                                <th>Branch:</th>
                                <td>
                                    <?php if($employee->branchDetails): ?>
                                        <b class="error"><?php echo strtoupper($employee->branchDetails->name); ?></b>
                                    <?php else: ?>
                                        -
                                    <?php endif; ?>
                                </td>
                            </tr>
                            <tr>
                                <th>Employee Number:</th>
                                <td><b class="error"><?php echo $employee->e_no ?? '-'; ?></b></td>
                            </tr>
                            <tr>
                                <th>Physical Location:</th>
                                <td><?php echo $employee->address ?? '-'; ?></td>
                            </tr>
                            <tr>
                                <th>Personal Email Address:</th>
                                <td><b style="color: #0000cc"><?php echo $employee->personal_email ?? '-'; ?></b></td>
                            </tr>
                            <tr>
                                <th>Date Created:</th>
                                <td><b><?php echo e($employee->created_at->format('j F Y H:i:s a')); ?></b></td>
                            </tr>
                            <tr>
                                <th>Created By:</th>
                                <td>
                                    <?php if($employee->createdBy != null): ?>
                                        <b><?php echo e($employee->createdBy->firstName." ".$employee->createdBy->lastName); ?></b>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="column">
                        <table class="table" style="width: 100%; border-collapse:collapse; margin: 5px">
                            <tr>
                                <th>Company Email Address:</th>
                                <td><b style="color: #0000cc"><?php echo $employee->email; ?></b></td>
                            </tr>
                            <tr>
                                <th>Phone Number:</th>
                                <td><b><?php echo strtoupper($employee->phone); ?></b></td>
                            </tr>
                            <tr>
                                <th>NHIF Number:</th>
                                <td><b style="color: #0000cc"><?php echo $employee->nhif ?? '-'; ?></b></td>
                            </tr>
                            <tr>
                                <th>NSSF Number:</th>
                                <td><b style="color: #0000cc"><?php echo $employee->nssf ?? '-'; ?></b></td>
                            </tr>
                            <tr>
                                <th>KRA PIN:</th>
                                <td><?php echo $employee->kra_pin ?? '-'; ?></td>
                            </tr>
                            <tr>
                                <th>Huduma Number:</th>
                                <td><?php echo $employee->huduma_number ?? '-'; ?></td>
                            </tr>
                            <tr>
                                <th>ID Number:</th>
                                <td><?php echo $employee->id_no ?? '-'; ?></td>
                            </tr>
                        </table>

                    </div>
                    <div class="column">
                        <table class="table" style="width: 100%; border-collapse:collapse; margin: 5px">
                            <tr>
                                <th>Bank Name:</th>
                                <td><?php echo $employee->bank_name ?? '-'; ?></td>
                            </tr>
                            <tr>
                                <th>Branch:</th>
                                <td><?php echo $employee->bank_branch ?? '-'; ?></td>
                            </tr>
                            <tr>
                                <th>Bank Code:</th>
                                <td><?php echo $employee->bank_code ?? '-'; ?></td>
                            </tr>
                            <tr>
                                <th>Account Number:</th>
                                <td><b class="error"><?php echo $employee->acc_no ?? '-'; ?></b></td>
                            </tr>
                        </table>
                        <div class="guestDetails_inputDivider"></div>
                        <table style="width: 100%; border-collapse: collapse;">
                            <tr>
                                <td>
                                    <button type="button" class="navButtons" style="background-color: #d9ffff;color: black; margin-bottom: 0;font-weight: bold; min-width: 200px ;font-size: 14px">ADVANCE SAL BAL
                                        (<span class="error">KES</span>):
                                        <b class="error" style="margin-left: 10px">
                                            <?php echo e('0.00'); ?>

                                        </b>
                                    </button>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div><br>
    </div>
    <div class="tabcontent" id="education">
        <h3 ><span class="error" style="margin-right: 20px">My Education Details</span></h3>
        <table id="example1" class="display" style="width: 100%; border-collapse: collapse">
            <thead>
            <tr style="background-color: #a1b5d3">
                <th>No</th>
                <th>Trans Type</th>
                <th>Ref</th>
                <th>Details</th>
                <th>Bill Amount</th>
                <th>Paid Amount</th>
                <th>Bill Date</th>
                <th>Bill Due Date</th>
                <th>View/Upload Docs</th>
            </tr>
            </thead>
            <tbody>
            </tbody>
            <tfoot>
            <tr style="background-color: #a1b5d3">
                <th>No</th>
                <th>Trans Type</th>
                <th>Ref</th>
                <th>Details</th>
                <th>Bill Amount</th>
                <th>Paid Amount</th>
                <th>Bill Date</th>
                <th>Bill Due Date</th>
                <th>View/Upload Docs</th>
            </tr>
            </tfoot>
        </table>
    </div>
    
    <div class="tabcontent" id="employment">
        <h3 ><span class="error" style="margin-right: 20px">Employement Details</span></h3>

    </div>
    
    <div class="tabcontent" id="leave">
        <h3 ><span class="error" style="margin-right: 20px">Leave Management</span></h3>

    </div>

    
    <div class="tabcontent" id="advances">
        <h3 ><span class="error" style="margin-right: 20px">My Advance Salary Analysis</span></h3>
        <table id="advanceSalaryTable" class="display" style="width: 100%; border-collapse: collapse">
            <thead>
            <tr style="background-color: #a1b5d3">
                <th>No</th>
                <th>Applied Advance Amount</th>
                <th>Repayment Cycle(Months)</th>
                <th>First Approved</th>
                <th>Second Approved</th>
                <th>Disbursed</th>
                <th>Paid Amount</th>
                <th>Advance Balance</th>
                <th>Application date</th>
                <th>View More</th>
            </tr>
            </thead>
            <tbody>
            <?php $__currentLoopData = $advances; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $advance): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td class="lr"></td>
                    <td><b><?php echo number_format($advance->amount, 2); ?></b></td>
                    <td><b><?php echo $advance->duration; ?></b></td>
                    <td>
                        <?php if($advance->first_approved == 1): ?>
                            <b class="success">YES</b>
                        <?php else: ?>
                            <b class="error">NO</b>
                        <?php endif; ?>
                    </td>
                    <td>
                        <?php if($advance->second_approved == 1): ?>
                            <b class="success">YES</b>
                        <?php else: ?>
                            <b class="error">NO</b>
                        <?php endif; ?>
                    </td>
                    <td>
                        <?php if($advance->disbursed == 1): ?>
                            <b class="success">YES</b>
                        <?php else: ?>
                            <b class="error">NO</b>
                        <?php endif; ?>
                    </td>
                    <td><b class="success"><?php echo number_format($advance->paid_amount, 2); ?></b></td>
                    <td><b class="error"><?php echo number_format(($advance->amount- $advance->paid_amount), 2); ?></b></td>
                    <td><?php echo date('d/m/Y', strtotime($advance->created_at)); ?></td>
                    <td><i onclick="viewAdvanceSalaryReport('<?php echo e($advance->id); ?>')" class="fa fa-eye error" style="cursor: pointer; font-size: 14px"></i></td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
            <tfoot>
            <tr style="background-color: #a1b5d3">
                <th>No</th>
                <th>Applied Advance Amount</th>
                <th>Repayment Cycle(Months)</th>
                <th>First Approved</th>
                <th>Second Approved</th>
                <th>Disbursed</th>
                <th>Paid Amount</th>
                <th>Advance Balance</th>
                <th>Application date</th>
                <th>View More</th>
            </tr>
            </tfoot>
        </table>
    </div>

    
    <div class="tabcontent" id="payroll">
        <h3 ><span class="error" style="margin-right: 20px">Payroll Details</span></h3>
        <div class="guestDetails_inputDivider1"></div>
        <div class="error" style="font-size: 12px"><b>1. My Basic Salary Section</b></div><br>
        <div class="guestDetails_input">
            <div class="guestDetails_inputLabel">
                Your Basic Salary is:
                <b style="margin-left: 10px; font-size: 14px" class="error"><?php echo number_format($employee->basicSalary ? $employee->basicSalary->basic_salary : 0,2); ?></b>
            </div>
        </div>
        <div class="guestDetails_inputDivider"></div>
        <div class="error" style="font-size: 12px"><b>2. My Allowances Section</b></div><br>
        <?php if(count($allowances) > 0): ?>
            <?php $__currentLoopData = $allowances; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $allowance): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="allowance-row">
                    <div class="guestDetails_input">
                        <div class="guestDetails_inputLabel">
                            Your <?php echo strtoupper($allowance->allowanceType ? $allowance->allowanceType->name : '-'); ?> Amount is:
                            <b style="margin-left: 10px; font-size: 14px" class="error">
                                <?php echo number_format($allowance->allowance_amount ?? 0,2); ?>

                            </b>
                        </div>
                    </div>
                </div>
                <div class="guestDetails_inputDivider1"></div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <?php else: ?>
            <div class="error" style="text-align: center;"><b><i>You dont have any Allowances</i></b></div><br>
        <?php endif; ?>

        <div class="guestDetails_inputDivider"></div>
        <div class="error" style="font-size: 12px"><b>3. My Deductions Section</b></div><br>
        <?php if(count($deductions) > 0): ?>
            <?php $__currentLoopData = $deductions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $deduction): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="deduction-row">
                    <div class="guestDetails_input">
                        <div class="guestDetails_inputLabel">
                            Your <?php echo strtoupper($deduction->deductionType ? $deduction->deductionType->name : '-'); ?> Amount is:
                            <b style="margin-left: 10px; font-size: 14px" class="error">
                                <?php echo number_format($deduction->deduction_amount ?? 0,2); ?>

                            </b>
                        </div>
                    </div>
                </div>
                <div class="guestDetails_inputDivider1"></div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <?php else: ?>
            <div class="error" style="text-align: center;"><b><i>You dont have any Deductions</i></b></div><br>
        <?php endif; ?>
        <div class="guestDetails_inputDivider"></div>

    </div>

    
    <div class="tabcontent" id="payrollHistory">
        <h3 ><span class="error" style="margin-right: 20px">Payroll History</span></h3>

        <table id="payroll-history-table" style="width: 100%; border-collapse: collapse; ">
            <thead>
            <tr style="background-color: #a1b5d3">
                <th>No</th>
                <th>Payroll Period:</th>
                <th>Basic Salary</th>
                <th>Total Allowances</th>
                <th>Non-Taxable Deductions</th>
                <th>Gross Salary</th>
                <th>Taxable Salary</th>
                <th>Income Tax</th>
                <th>Reliefs</th>
                <th>P.A.Y.E</th>
                <th>Taxable Deductions</th>
                <th>Advance Salaries</th>
                <th>Net Salaries</th>
                <th>Prepared By</th>
                <th>Date & Time</th>
                <th>Payslip</th>
            </tr>
            </thead>
            <tbody>
            <?php $__currentLoopData = $payrolls; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payroll): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td class="ar"></td>
                    <td><b class="error"><?php echo $payroll->month."/".$payroll->year; ?></b></td>
                    <td><b><?php echo number_format($payroll->basic_salary,2); ?></b></td>
                    <td><b><?php echo number_format($payroll->total_allowance,2); ?></b></td>
                    <td><b><?php echo number_format($payroll->non_taxable_deductions,2); ?></b></td>
                    <td><b><?php echo number_format($payroll->gross_salary,2); ?></b></td>
                    <td><b><?php echo number_format($payroll->taxable_salary,2); ?></b></td>
                    <td><b><?php echo number_format($payroll->income_tax,2); ?></b></td>
                    <td><b class="success"><?php echo number_format($payroll->total_reliefs,2); ?></b></td>
                    <td><b><?php echo number_format($payroll->paye,2); ?></b></td>
                    <td><b><?php echo number_format($payroll->taxable_deductions,2); ?></b></td>
                    <td><b><?php echo number_format($payroll->advance_salary,2); ?></b></td>
                    <td><b class="error"><?php echo number_format($payroll->net_salary,2); ?></b></td>
                    <td>
                        <?php if($payroll->user): ?>
                            <?php echo $payroll->user->firstName." ".$payroll->user->lastName; ?>

                        <?php endif; ?>
                    </td>
                    <td><?php echo date('d/m/Y H:i:s a'); ?></td>
                    <td><a href="<?php echo e(url('generate-employee-payroll-payslip-pdf/'.$payroll->id)); ?>" class="inner" target="_blank" title="Download Payslip"><i class="fa fa-print error" style="cursor: pointer; font-size: 14px"></i></a></td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
            <tfoot>
            <tr style="background-color: #a1b5d3">
                <th>No</th>
                <th>Payroll Period:</th>
                <th>Basic Salary</th>
                <th>Total Allowances</th>
                <th>Non-Taxable Deductions</th>
                <th>Gross Salary</th>
                <th>Taxable Salary</th>
                <th>Income Tax</th>
                <th>Reliefs</th>
                <th>P.A.Y.E</th>
                <th>Taxable Deductions</th>
                <th>Advance Salaries</th>
                <th>Net Salaries</th>
                <th>Prepared By</th>
                <th>Date & Time</th>
                <th>Payslip</th>
            </tr>
            </tfoot>
        </table>
    </div>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('created-by'); ?>
    * User Account Created
    <?php if($employee->createdBy != null): ?>
        By <b><?php echo e($employee->createdBy->firstName." ".$employee->createdBy->lastName); ?></b>
    <?php endif; ?>
    on <b><?php echo e($employee->created_at->format('j F Y H:i:s')); ?></b>
<?php $__env->stopSection(); ?>


<?php $__env->startSection('modal_heading'); ?>
    <h1>User Profile</h1>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('modal_title'); ?>
    <h3><u>Dashboard Functionalities</u></h3>
    <b>
        <ol>
            <li>View Your Personal Details</li>
            <li>Amend your Personal Details</li>
            <li>View and Apply for a Leave</li>
            <li>Request for Salary Advances</li>
        </ol>
    </b>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/zedarroot/public_html/edwulp/resources/views/hr/employees/employee-file.blade.php ENDPATH**/ ?>