@extends('core::layouts.master') @section('title') {{ trans_choice('payroll::general.payroll',1) }} #{{ $payroll->id }} @endsection @section('content')

{{ trans_choice('payroll::general.payroll',1) }} #{{ $payroll->id }}

{{ trans_choice('user::general.user',1) }} {{$payroll->employee_name}}
{{ trans_choice('core::general.date',1) }} {{$payroll->date}}
{{ trans_choice('payroll::general.template',1) }} @if(!empty($payroll->payroll_template)) {{$payroll->payroll_template->name}} @endif
{{ trans_choice('payroll::general.work_duration',1) }} {{number_format($payroll->work_duration,2)}}
{{ trans_choice('payroll::general.duration_unit',1) }} {{$payroll->duration_unit}}
{{ trans_choice('payroll::general.amount_per_duration',1) }} {{number_format($payroll->amount_per_duration,2)}}
{{ trans_choice('payroll::general.total_duration_amount',1) }} {{number_format($payroll->total_duration_amount,2)}}
{{ trans_choice('payroll::general.gross',1) }} {{ trans_choice('payroll::general.amount',1) }} {{number_format($payroll->gross_amount,2)}}
{{ trans_choice('payroll::general.payment',2) }} {{number_format($payments,2)}}
{{ trans_choice('payroll::general.balance',1) }} {{number_format($payroll->gross_amount-$payments,2)}}

{{trans_choice('payroll::general.allowance',2)}}

@foreach($payroll->payroll_items->where('type','allowance')->all() as $key) @endforeach
{{trans_choice('payroll::general.allowance',1)}} {{trans_choice('payroll::general.amount',1)}} {{trans_choice('payroll::general.type',1)}} {{trans_choice('payroll::general.amount',1)}}
{{$key->name}} @if($key->amount_type=='fixed') {{trans_choice('payroll::general.fixed',1)}} @endif @if($key->amount_type=='percentage') {{trans_choice('payroll::general.percentage',1)}} @endif {{number_format($key->amount,2)}}
{{trans_choice('payroll::general.total',1)}} {{ number_format($payroll->total_allowances,2) }}

{{trans_choice('payroll::general.deduction',2)}}

@foreach($payroll->payroll_items->where('type','deduction')->all() as $key) @endforeach
{{trans_choice('payroll::general.deduction',1)}} {{trans_choice('payroll::general.amount',1)}} {{trans_choice('payroll::general.type',1)}} {{trans_choice('payroll::general.amount',1)}}
{{$key->name}} @if($key->amount_type=='fixed') {{trans_choice('payroll::general.fixed',1)}} @endif @if($key->amount_type=='percentage') {{trans_choice('payroll::general.percentage',1)}} @endif {{number_format($key->amount,2)}}
{{trans_choice('payroll::general.total',1)}} {{ number_format($payroll->total_deductions,2) }}

{{trans_choice('payroll::general.payment',2)}}

@can('payroll.payroll.create') {{ trans_choice('core::general.add',1) }} {{ trans_choice('core::general.payment',1) }} @endcan

@foreach($payroll->payroll_payments as $key) @endforeach
{{trans_choice('core::general.id',1)}} {{trans_choice('core::general.payment',1)}} {{trans_choice('payroll::general.type',1)}} {{trans_choice('payroll::general.amount',1)}} {{trans_choice('core::general.receipt',1)}} {{trans_choice('core::general.date',1)}} {{trans_choice('core::general.action',1)}}
{{$key->id}} @if(!empty($key->payment_detail)) @if(!empty($key->payment_detail->payment_type)) {{$key->payment_detail->payment_type->name}} @endif @endif {{number_format($key->amount,2)}} @if(!empty($key->payment_detail)) {{$key->payment_detail->receipt}} @endif {{$key->submitted_on}}
{{trans_choice('payroll::general.total',1)}} {{ number_format($payments,2) }}
@endsection @section('scripts') @endsection