@extends('admin.layouts.app') @push('style') @endpush @section('title') Salary Sheet @endsection @section('container')
@if(count($salaries) > 0)

{{ config('app.name', 'Laravel') }}

For the month of @if (count($employees) > 0) @if ($month == 1) {{ 'January' }} @endif @if ($month == 2) {{ 'February' }} @endif @if ($month == 3) {{ 'March' }} @endif @if ($month == 4) {{ 'April' }} @endif @if ($month == 5) {{ 'May' }} @endif @if ($month == 6) {{ 'June' }} @endif @if ($month == 7) {{ 'July' }} @endif @if ($month == 8) {{ 'August' }} @endif @if ($month == 9) {{ 'September' }} @endif @if ($month == 10) {{ 'October' }} @endif @if ($month == 11) {{ 'November' }} @endif @if ($month == 12) {{ 'December' }} @endif @endif {{request()->get('year')}}

@isset($salaries)
@php $advanceAmountTotal = 0; @endphp @foreach($salaries as $salary) @php $advanceAmount = \App\Models\EmployeeSalaryAdvance::where('employee_id',$salary->employee_id) ->where('year',$year) ->where('month',$month) ->sum('advance'); @endphp @php $advanceAmountTotal += $advanceAmount; @endphp @endforeach
Sl No. Process Date Employee Name Basic Salary Advance Absent Absent Deduct Late Hours Late Deduct Total Deduct Gross Salary Net Salary Remarks Action
{{$loop->iteration}} {{ \Carbon\Carbon::parse($salary->date)->format('d-m-Y') }} {{$salary->employee->name ?? ''}} {{number_format($salary->gross_salary,2)}} {{number_format($advanceAmount,2)}} {{ $salary->absent_day }} {{ number_format($salary->absent_deduct,2) }} {{ $salary->late_hours }} {{ number_format($salary->late_deduct,2) }} {{ number_format($salary->absent_deduct,2) }} {{number_format($salary->gross_salary,2)}} {{number_format($salary->total_salary,2)}} @if (count($salaries) > 0) @if ($month == 1) {{ 'Month Of January' }} @endif @if ($month == 2) {{ 'Month Of February' }} @endif @if ($month == 3) {{ 'Month Of March' }} @endif @if ($month == 4) {{ 'Month Of April' }} @endif @if ($month == 5) {{ 'Month Of May' }} @endif @if ($month == 6) {{ 'Month Of June' }} @endif @if ($month == 7) {{ 'Month Of July' }} @endif @if ($month == 8) {{ 'Month Of August' }} @endif @if ($month == 9) {{ 'Month Of September' }} @endif @if ($month == 10) {{ 'Month Of October' }} @endif @if ($month == 11) {{ 'Month Of November' }} @endif @if ($month == 12) {{ 'Month Of December' }} @endif @endif
Total {{number_format($salaries->sum('gross_salary'),2)}} {{number_format($advanceAmountTotal,2)}} {{number_format($salaries->sum('absent_day'))}} {{number_format($salaries->sum('absent_deduct'),2)}} {{number_format($salaries->sum('late_deduct'),2)}} {{number_format($salaries->sum('absent_deduct')+$salaries->sum('late_deduct'),2)}} {{number_format($salaries->sum('gross_salary'),2)}} {{number_format($salaries->sum('total_salary'),2)}}

Amount in words (Tk): {{ DecimalToWords::convert($salaries->sum('total_salary'),'Taka', 'Poisa')}}.

@endisset
@endif @endsection @push('scripts') @endpush