@php // The excel is built from this html by the phpspreadsheet html reader, which // only understands inline css, so every colour is written on the cell itself. $navy = '#1F3864'; $blue = '#2E75B6'; $orange = '#C55A11'; $green = '#548235'; $band = '#DCE6F1'; $zebra = '#F2F6FC'; $line = '#B4C6E7'; $headBase = 'color: #FFFFFF; font-weight: bold; text-align: center; vertical-align: center; word-wrap: break-word; border: 1px solid #FFFFFF;'; $cellBase = 'vertical-align: center; border: 1px solid ' . $line . ';'; $totalCount = count($reportData); // Actual minus factual, so a positive balance is still owed and a negative one // was overpaid - the two cases are coloured apart to be readable at a glance. $diffStyle = function ($value) { if (round($value, 2) > 0) { return 'color: #C00000; background-color: #FDE9E9; font-weight: bold;'; } if (round($value, 2) < 0) { return 'color: #1E6B34; background-color: #E8F6EC; font-weight: bold;'; } return 'color: #808080;'; }; @endphp @php $totalActualOtHours = $totalFactOtHours = $totalOtHoursDifference = 0; $totalActualOtAmount = $totalFactOtAmount = 0; $totalActualSalary = $totalFactualSalary = $totalSalaryDifference = 0; @endphp @forelse ($reportData as $row) @php $totalActualOtHours += $row->actual_ot_hours; $totalFactOtHours += $row->fact_ot_hours; $totalOtHoursDifference += $row->ot_hours_difference; $totalActualOtAmount += $row->actual_ot_amount; $totalFactOtAmount += $row->fact_ot_amount; $totalActualSalary += $row->actual_salary; $totalFactualSalary += $row->factual_salary; $totalSalaryDifference += $row->salary_difference; $rowBg = $loop->iteration % 2 == 0 ? 'background-color: ' . $zebra . ';' : ''; @endphp @empty @endforelse
{{ $organization->name ?? '' }} - Balance Report
Month: {{ $month_name }}   |   Records: {{ $totalCount }}   |   Generated On: {{ now()->format('d-M-Y h:i A') }}
S.No {{ trans('common/common.month') }} {{ trans('master/master.employee_code') }} {{ trans('master/master.employee_name') }} {{ trans('master/master.department') }} {{ trans('master/master.designation') }} Actual OT Hours Fact OT Hours OT Hours Difference Actual OT Amount Fact OT Amount (Double OT) OT Amount Difference Actual Salary Factual Salary
{{ $loop->iteration }} {{ $row->month }} {{ $row->employee_code }} {{ $row->employee_name }} {{ $row->department }} {{ $row->designation }} {{ number_format($row->actual_ot_hours, 2, '.', '') }} {{ number_format($row->fact_ot_hours, 2, '.', '') }} {{ number_format($row->ot_hours_difference, 2, '.', '') }} {{ round($row->actual_ot_amount) }} {{ round($row->fact_ot_amount) }} {{ round($row->salary_difference) }} {{ round($row->actual_salary) }} {{ round($row->factual_salary) }}
No record found