@extends('backEnd.master') @section('title') @lang('hr.payroll_report') @endsection @section('mainContent') @php $setting = generalSetting(); if (!empty($setting->currency_symbol)) { $currency = $setting->currency_symbol; } else { $currency = '$'; } @endphp

@lang('common.select_criteria')

{{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'searchPayrollReport', 'method' => 'POST', 'enctype' => 'multipart/form-data']) }}
@if ($errors->has('role_id')) {{ $errors->first('role_id') }} @endif
@php $month = date('F'); @endphp
@if ($errors->has('payroll_month')) {{ $errors->first('payroll_month') }} @endif
@if ($errors->has('payroll_year')) {{ $errors->first('payroll_year') }} @endif
{{ Form::close() }}
@if (isset($staffsPayroll))

@lang('hr.staff_list')

@php $basic_salary = 0; $earnings = 0; $deductions = 0; $gross_salary = 0; $tax = 0; $net_salary = 0; @endphp @foreach ($staffsPayroll as $value) @php $basic_salary += $value->basic_salary; $gross_salary += $value->gross_salary; $tax += $value->tax; $net_salary += $value->net_salary; @endphp @endforeach
@lang('hr.staff_name') @lang('hr.role') @lang('common.description') @lang('hr.month_year') @lang('hr.payslip') # @lang('hr.basic_salary')({{ generalSetting()->currency_symbol }}) @lang('hr.earnings')({{ generalSetting()->currency_symbol }}) @lang('hr.deductions')({{ generalSetting()->currency_symbol }}) @lang('leave.leave_deductions')({{ generalSetting()->currency_symbol }}) @lang('hr.gross_salary')({{ generalSetting()->currency_symbol }}) @lang('hr.tax')({{ generalSetting()->currency_symbol }}) @lang('hr.net_salary')({{ generalSetting()->currency_symbol }})
{{ $value->full_name }} {{ $value->name }} {{ $value->title }} {{ $value->payroll_month }} - {{ $value->payroll_year }} {{ $value->id }} {{ $value->basic_salary }} @php $totalEarnings = App\SmHrPayrollEarnDeduc::getTotalEarnings($value->id); @endphp @if ($totalEarnings > 0) {{ $totalEarnings }} @php $earnings +=$totalEarnings; @endphp @else {{ 0 }} @endif @php $totalDeductions = App\SmHrPayrollEarnDeduc::getTotalDeductions($value->id); @endphp @if ($totalDeductions > 0) {{ $totalDeductions }} @php $deductions +=$totalDeductions; @endphp @else {{ 0 }} @endif @php $leaveDeductions = App\SmLeaveDeductionInfo::select('salary_deduct') ->where('payroll_id', $value->id) ->first(); @endphp @if (@$leaveDeductions->salary_deduct > 0) {{ @$leaveDeductions->salary_deduct }} @else {{ 0 }} @endif {{ $value->gross_salary }} {{ $value->tax }} {{ $value->net_salary }}
@lang('fees.grand_total') {{ currency_format($basic_salary) }} {{ currency_format($earnings) }} {{ currency_format($deductions) }} {{ currency_format(@$leaveDeductions->salary_deduct) }} {{ currency_format($gross_salary) }} {{ currency_format($tax) }} {{ currency_format($net_salary) }}
@endif
{{-- @endif --}}
@endsection @include('backEnd.partials.data_table_js')