@extends('home.partial.layout') @section('content') @php @endphp

Employee Payroll

@if (session()->has('success'))
{{ session('success') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf
@csrf
Last payroll: @if(isset($last_payroll_entry) && ''!=$last_payroll_entry) {{date('d/m/Y H:i:s', strtotime($last_payroll_entry))}} (For: {{$last_payroll_for}}) @else Not Yet @endif @if( Auth::user()->hasRole(HR_ROLE) && 18 <= date('d'))
@endif
Leave Deduction: Calculated from the next day after the last payroll date to the present.
@if(isset($employees) && !empty($employees)) @foreach($employees as $employee) @if(!empty($employee->employeePayrollInformation) && $employee->employeePayrollInformation->gross_total !=null) @endif @endforeach @endif @if(isset($salary_data) && !empty($salary_data) && !isset($employees)) @foreach($salary_data as $salary) @endforeach @endif
Name Emp. No. Basic Gross Leave
Deduction
Additional
Salary
Other
Deduction
Net
Salary
Action

{{$employee->name}}{{$employee->lname}}@if($employee->designations){{$employee->designations->name}}@else @endif

{{$employee->employee_no}} @if(!empty($employee->employeePayrollInformation)){{$employee->employeePayrollInformation->basic_salary}}@else 0 @endif @if(!empty($employee->employeePayrollInformation)){{$employee->employeePayrollInformation->gross_total}}@else 0 @endif {{ number_format($employee->total_leave_deduction_amount, 1)}} @if ($employee->no_of_leave_days) @else @endif @if ($employee->employeeEarnings) {{ $employee->employeeEarnings->total_addtional_amount }} @else 0 @endif @if ($employee->employeeDeduction) {{ $employee->employeeDeduction->total_deduction_amount }} @else 0 @endif {{ number_format($employee->total_net_salary,2 )}}

{{$salary->employee->name}}{{$salary->employee->lname}}@if($salary->employee->designations) {{$salary->employee->designations->name}} @endif

{{$salary->employee->employee_no}} {{$salary->basic_salary}} {{$salary->total_gross_salary}} {{$salary->total_leave_deduction_amount}} {{$salary->total_addtional_amount}} {{$salary->total_deduction_amount}} {{$salary->net_salary}} Generate Payslip
@endsection