@extends('master') @section('content')

{{__('Payslip')}} ({{$payslip->month_year}})

@if(!empty($employee->user()->profile_photo)) @else @endif {{$employee->full_name}} ({{$employee->user->username ?? ''}})

{{__('Payment Details')}} ( {{$payslip->payment_type}} )

@if($payslip->payment_type == 'Hourly') @else
@if($payslip->allowances)
@php $allowance_total = 0; @endphp @foreach($payslip->allowances as $allowance) @php $allowance_total += $allowance['allowance_amount'] @endphp @endforeach
@endif @if($payslip->commissions)
@php $commission_total = 0; @endphp @foreach($payslip->commissions as $commission) @php $commission_total += $commission['commission_amount'] @endphp @endforeach
@endif @if($payslip->loans)
@php $loan_total=0; @endphp @foreach($payslip->loans as $loan) @php $loan_total += $loan['monthly_payable'] @endphp @endforeach
@endif @if($payslip->deductions)
@php $deduction_total = 0.00; @endphp @foreach($payslip->deductions as $deduction) @php $deduction_total += $deduction['deduction_amount'] @endphp @endforeach
@endif @if($payslip->other_payments)
@php $other_payment_total = 0; @endphp @foreach($payslip->other_payments as $other_payment) @php $other_payment_total += $other_payment['other_payment_amount'] @endphp @endforeach
@endif
@forelse ($leaveTypeUnserialize as $item) @empty @endforelse {{-- --}}
@if($payslip->overtimes)
@php $overtime_total = 0; @endphp @foreach($payslip->overtimes as $overtime) @php $overtime_total += $overtime['overtime_amount'] @endphp @endforeach
# {{__('Overtime Title')}} {{__('Number of days')}} {{trans('file.Hours')}} {{trans('file.Rate')}} {{trans('file.Amount')}}
{{$loop->iteration}} {{$overtime['overtime_title']}} {{$overtime['no_of_days']}} {{$overtime['overtime_hours']}} {{$overtime['overtime_rate']}} {{$overtime['overtime_amount']}}
{{trans('file.Total')}} : {{$overtime_total}}
@endif

{{trans('file.Details')}}

@if($payslip->payment_type == 'Hourly') @else @endif @isset($allowance_total) @endisset @isset($commission_total ) @endisset @isset($payslip->pension_amount ) @endisset @isset($loan_total) @endisset @isset($deduction_total) @endisset @isset($other_payment_total) @endisset @isset($overtime_total) @endisset @if(config('variable.currency_format') =='suffix') @else @endif
@endsection