<head>
    <style type="text/css">

        @media print {
            body {
                -webkit-print-color-adjust: exact;
            }

            table.details tr th {
                background-color: #F2F2F2 !important;
            }

            .print_bg {
                background-color: #F2F2F2 !important;
            }

        }

        .print_bg {
            background-color: #F2F2F2 !important;
        }

        body {
            /* font-family: "Open Sans", helvetica, sans-serif; */
            font-family: Verdana, Arial, Helvetica, sans-serif;
            font-size: 13px;
            color: #000000;
        }

        table.logo {
            -webkit-print-color-adjust: exact;
            border-collapse: inherit;
            width: 100%;
            margin-bottom: 10px;
            padding: 10px;
            border-bottom: 2px solid #25221F;
        }

        #logo {
            height: 50px;
        }

        table.emp {
            width: 100%;
            margin-bottom: 10px;
            padding: 10px 0;
        }

        table.details, table.payment_details {
            width: 100%;
            border-collapse: collapse;
            /* margin-bottom: 10px; */
        }

        table.payment_total {
            border-collapse: collapse;
            width: 100%;
            margin-top: 10px;
            text-align: center;
        }

        table.emp tr td {
            /* width: 100%; */
            padding: 10px 0;
        }

        table.details tr th {
            /* border: 1px solid #000000; */
            background-color: #F2F2F2;
            font-size: 15px;
            padding: 10px
        }

        table.details tr td {
            vertical-align: top;
            width: 30%;
            padding: 3px
        }

        table.payment_details > tbody > tr > td {
            /* border: 1px solid #000000; */
            padding: 12px 7px;
        }

        table.payment_total > tbody > tr > td {
            padding: 5px;
            width: 60%
        }

        table.logo > tbody > tr > td {
            border: 1px solid transparent;
        }

        .active {
            text-transform: uppercase;
        }

        .netpay {
            padding: 15px 10px;
            text-align: center;
            border: 1px solid #edeff0;
        }

        .text-info {
            color: #03a9f3;
            font-size: 15px;
        }

        .netsalary-title {
            text-transform: uppercase;
            font-size: 20px;
        }

        .netsalary-formula {
            font-size: 16px;
            color: #555555;
        }
    </style>
</head>
<body>
<table class="logo">
    <tr>
        <td>

        </td>
        <td><p style="text-align: right;">
                <img src="<?php echo e($company->logo_url); ?>" id="logo">
            </p>

            <p style="text-align: right;">

                <b><?php echo e($company->company_name); ?></b><br/>
                <?php echo nl2br($company->defaultAddress->address); ?><br/>
                <b><?php echo app('translator')->get('app.phone'); ?></b>: <?php echo e($company->company_phone); ?><br/>
                <b><?php echo app('translator')->get('app.email'); ?></b>: <?php echo e($company->company_email); ?>


            </p>
        </td>
    </tr>
</table>
<table class="emp">
    <tbody>
    <tr>
        <td colspan="3" style="font-size: 18px; padding-bottom: 20px;">
            <strong><?php echo app('translator')->get('payroll::modules.payroll.salarySlipHeading'); ?> <?php echo e(\Carbon\Carbon::parse($salarySlip->year.'-'.$salarySlip->month.'-01')->translatedFormat('F Y')); ?>

            </strong></td>
    </tr>
    <tr>
        <td><strong><?php echo app('translator')->get('modules.employees.employeeId'); ?>:</strong> <?php echo e($salarySlip->user->employeeDetail->employee_id); ?>

        </td>
        <td><strong><?php echo app('translator')->get('app.name'); ?>:</strong> <?php echo e($salarySlip->user->name); ?></td>
        <td><strong><?php echo app('translator')->get("payroll::modules.payroll.salarySlipNumber"); ?>:</strong> <?php echo e($salarySlip->id); ?></td>
    </tr>
    <tr>
        <td><strong><?php echo app('translator')->get('app.department'); ?>
                :</strong> <?php echo e((!is_null($salarySlip->user->employeeDetail->department)) ? $salarySlip->user->employeeDetail->department->team_name : '-'); ?>

        </td>
        <td><strong><?php echo app('translator')->get('app.designation'); ?>
                :</strong> <?php echo e((!is_null($salarySlip->user->employeeDetail->designation)) ? $salarySlip->user->employeeDetail->designation->name : '-'); ?>

        </td>
        <td><strong><?php echo app('translator')->get('modules.employees.joiningDate'); ?>
                :</strong> <?php echo e($salarySlip->user->employeeDetail->joining_date->translatedFormat($company->date_format)); ?></td>
    </tr>
    <?php if(isset($fields) && !is_null($fields)): ?>
        <?php $numberCheck = 0; ?>
        <tr>
            <?php $__currentLoopData = $fields; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php if($numberCheck == 2): ?>
                    <?php $numberCheck = 0;?>
                <?php endif; ?>
                <td>
                    <strong><?php echo e($field->label); ?>:</strong>
                    <?php if( $field->type == 'text'): ?>
                        <?php echo e($employeeDetail->custom_fields_data['field_'.$field->id] ?? '--'); ?>

                    <?php elseif($field->type == 'password'): ?>
                        <?php echo e($employeeDetail->custom_fields_data['field_'.$field->id] ?? '--'); ?>

                    <?php elseif($field->type == 'number'): ?>
                        <?php echo e($employeeDetail->custom_fields_data['field_'.$field->id] ?? '--'); ?>

                    <?php elseif($field->type == 'textarea'): ?>
                        <?php echo e($employeeDetail->custom_fields_data['field_'.$field->id] ?? '--'); ?>

                    <?php elseif($field->type == 'radio'): ?>
                        <?php echo e(!is_null($employeeDetail->custom_fields_data['field_'.$field->id]) ? $employeeDetail->custom_fields_data['field_'.$field->id] : '--'); ?>

                    <?php elseif($field->type == 'select'): ?>
                        <?php echo e((!is_null($employeeDetail->custom_fields_data['field_'.$field->id]) && $employeeDetail->custom_fields_data['field_'.$field->id] != '') ? $field->values[$employeeDetail->custom_fields_data['field_'.$field->id]] : '--'); ?>

                    <?php elseif($field->type == 'checkbox'): ?>
                        <ul>
                            <?php $__currentLoopData = $field->values; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php if($employeeDetail->custom_fields_data['field_'.$field->id] != '' && in_array($value ,explode(', ', $employeeDetail->custom_fields_data['field_'.$field->id]))): ?>
                                    <li><?php echo e($value); ?></li> <?php endif; ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                    <?php elseif($field->type == 'date'): ?>
                        <?php echo e(isset($employeeDetail->custom_fields_data['field_'.$field->id])? Carbon\Carbon::parse($employeeDetail->custom_fields_data['field_'.$field->id])->translatedFormat($company->date_format): ''); ?>

                    <?php endif; ?>
                </td>

                <?php if(($numberCheck == 0 && $key != 0) || sizeof($fields) == $key+1 ): ?>
        </tr>
        <tr>
            <?php endif; ?>
            <?php $numberCheck++ ?>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tr>
    <?php endif; ?>
    </tbody>
</table>

<!-- Table for Details -->
<table class="details">

    <tr>
        <!-- Payment Info Slip Start-->
        <td>

            <table class="payment_details">
                <thead>
                <tr class="active">
                    <th class="text-uppercase"><?php echo app('translator')->get('payroll::modules.payroll.earning'); ?></th>
                    <th align="right" class="text-uppercase"><?php echo app('translator')->get('app.amount'); ?></th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td><?php echo app('translator')->get('payroll::modules.payroll.basicPay'); ?></td>
                    <td align="right"
                        class="text-uppercase"><?php echo e(currency_format($salarySlip->basic_salary, ($payrollSetting->currency ? $payrollSetting->currency->id : company()->currency->id), false)); ?> <?php echo htmlentities($payrollSetting->currency ? $payrollSetting->currency->currency_code : company()->currency->currency_code); ?>

                    </td>
                </tr>
                <?php $__currentLoopData = $earnings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if($key == 'Time Logs'): ?>
                        <tr>
                            <td><?php echo e(($key)); ?>

                                <?php if(array_key_exists("Total Hours",$earnings)): ?>
                                    ( <?php echo app('translator')->get('payroll::modules.payroll.totalHours'); ?> <?php echo e($earnings['Total Hours']); ?> )
                                <?php endif; ?></td>
                            <td align="right"><?php echo e(currency_format($item,  ($payrollSetting->currency ? $payrollSetting->currency->id : company()->currency->id), false)); ?></td>
                        </tr>
                    <?php elseif($key != 'Total Hours'): ?>
                        <tr>
                            <td><?php echo e(($key)); ?></td>
                            <td align="right"><?php echo e(currency_format($item,  ($payrollSetting->currency ? $payrollSetting->currency->id : company()->currency->id), false)); ?></td>
                        </tr>
                    <?php endif; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                <?php $__empty_1 = true; $__currentLoopData = $earningsExtra; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr>
                        <td><?php echo e($key); ?></td>
                        <td align="right"><?php echo e(currency_format($item, ($payrollSetting->currency ? $payrollSetting->currency->id : company()->currency->id), false)); ?> <?php echo htmlentities($payrollSetting->currency ? $payrollSetting->currency->currency_code : company()->currency->currency_code); ?></td>
                    </tr>

                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                <?php if($fixedAllowance > 0): ?>
                <tr>
                    <td><?php echo app('translator')->get('payroll::modules.payroll.fixedAllowance'); ?></td>
                    <td align="right"><?php echo e(currency_format($fixedAllowance, ($payrollSetting->currency ? $payrollSetting->currency->id : company()->currency->id), false)); ?> <?php echo htmlentities($payrollSetting->currency ? $payrollSetting->currency->currency_code : company()->currency->currency_code); ?></td>
                </tr>
                <?php endif; ?>

                <?php $__empty_2 = true; $__currentLoopData = $earningsAdditional; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_2 = false; ?>
                    <tr>
                        <td><?php echo e($key); ?></td>
                        <td align="right"><?php echo e(currency_format($item, ($payrollSetting->currency ? $payrollSetting->currency->id : company()->currency->id), false)); ?> <?php echo htmlentities($payrollSetting->currency ? $payrollSetting->currency->currency_code : company()->currency->currency_code); ?></td>
                    </tr>

                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>
            <!-- Table for Details -->
        </td>
        <!--  Payment Info Slip End-->


        <!-- Deduction start -->
        <td>
            <table class="payment_details">
                <thead>
                <tr class="active">
                    <th class="text-uppercase"><?php echo app('translator')->get('payroll::modules.payroll.deduction'); ?></th>
                    <th align="right" class="text-uppercase"><?php echo app('translator')->get('app.amount'); ?></th>
                </tr>
                </thead>
                <tbody>
                <?php $__currentLoopData = $deductions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td><?php echo e($key); ?></td>
                        <td align="right"><?php echo e(currency_format($item, ($payrollSetting->currency ? $payrollSetting->currency->id : company()->currency->id), false)); ?> <?php echo htmlentities($payrollSetting->currency ? $payrollSetting->currency->currency_code : company()->currency->currency_code); ?></td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php $__currentLoopData = $deductionsExtra; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td><?php echo e($key); ?></td>
                        <td align="right"><?php echo e(currency_format($item, ($payrollSetting->currency ? $payrollSetting->currency->id : company()->currency->id), false)); ?> <?php echo htmlentities($payrollSetting->currency ? $payrollSetting->currency->currency_code : company()->currency->currency_code); ?></td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                </tbody>

            </table>
        </td>
        <!--  Deductions End-->
    </tr>
    <tr>
        <td>
            <table class="payment_details">
                <tr>

                    <td><strong><?php echo app('translator')->get('payroll::modules.payroll.grossEarning'); ?></strong></td>
                    <td align="right">
                        <strong><?php echo e(currency_format($salarySlip->gross_salary, ($payrollSetting->currency ? $payrollSetting->currency->id : company()->currency->id), false)); ?> <?php echo htmlentities($payrollSetting->currency ? $payrollSetting->currency->currency_code : company()->currency->currency_code); ?></strong>
                    </td>
                </tr>
            </table>
        </td>
        <td>
            <table class="payment_details">
                <tr>
                    <td><strong><?php echo app('translator')->get('payroll::modules.payroll.totalDeductions'); ?></strong></td>
                    <td align="right">
                        <strong><?php echo e(currency_format($salarySlip->total_deductions, ($payrollSetting->currency ? $payrollSetting->currency->id : company()->currency->id), false)); ?> <?php echo htmlentities($payrollSetting->currency ? $payrollSetting->currency->currency_code : company()->currency->currency_code); ?></strong>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <table class="payment_details">
                <tr>
                    <th align="left">
                        <?php echo app('translator')->get('payroll::modules.payroll.reimbursement'); ?>
                    </th>
                    <th align="right">
                        <?php echo app('translator')->get('app.amount'); ?>
                    </th>
                </tr>
                <tr>
                    <td><?php echo app('translator')->get('payroll::modules.payroll.expenseClaims'); ?></td>
                    <td align="right">
                        <?php echo e(currency_format($salarySlip->expense_claims, ($payrollSetting->currency ? $payrollSetting->currency->id : company()->currency->id), false)); ?> <?php echo htmlentities($payrollSetting->currency ? $payrollSetting->currency->currency_code : company()->currency->currency_code); ?>

                    </td>
                </tr>
            </table>

        </td>
    </tr>

</table>
<!-- Table for Details -->
<hr>
<!-- TotalTotal -->
<table class="payment_total">

    <tr>
        <td class="netsalary-title">
            <strong style="margin-right: 20px;"><?php echo app('translator')->get('payroll::modules.payroll.netSalary'); ?>:</strong>
            <?php echo e(currency_format(sprintf('%0.2f', $salarySlip->net_salary), ($payrollSetting->currency ? $payrollSetting->currency->id : company()->currency->id), false)); ?> <?php echo htmlentities($payrollSetting->currency ? $payrollSetting->currency->currency_code : company()->currency->currency_code); ?>

        </td>
    </tr>
    <tr>
        <td class="netsalary-formula">
            <h5 class="text-center text-muted"><?php echo app('translator')->get('payroll::modules.payroll.netSalary'); ?> =
                (<?php echo app('translator')->get('payroll::modules.payroll.grossEarning'); ?> - <?php echo app('translator')->get('payroll::modules.payroll.totalDeductions'); ?>
                + <?php echo app('translator')->get('payroll::modules.payroll.reimbursement'); ?>)</h5>
        </td>
    </tr>


</table>
<!-- TotalTotal -->
</body>




<?php /**PATH /home/smartdigitants/public_html/oneops.co.uk/oneops.ai/Modules/Payroll/Providers/../Resources/views/payroll/pdfview.blade.php ENDPATH**/ ?>