| Employee |
{{ $employee->emp_name_english }} - {{ $employee->emp_id }} |
| Project |
{{ $employee->organization->project->name }} |
| Project Type |
{{ $employee->organization->projectType->name }} |
| Branch |
{{ $employee->organization->branch->branchCode }} -
{{ $employee->organization->branch->name }} |
| Resign Date |
{{ date('d-m-Y', strtotime($employee->organization->terminate_resignation_date)) }}
|
| Voucher Date |
{{ date('d-m-Y', strtotime($finalPaymentDate)) }} |
{{ Form::open(['url' => route('finalPaymentAutoVoucher.store')]) }}
{{ Form::hidden('emp_id_fk', $employee->id, []) }}
{!! Form::hidden('voucher_date', $finalPaymentDate, []) !!}
@foreach ($fpAVMaster->items as $item)
{{ $item->project->name ?? '' }} / {{ $item->projectType->name ?? '' }}
{{ !empty($item->counter) ? $item->counter : '' }}
{{-- Hidden attr for breaking dr and cr id project and project type wise --}}
{{ Form::hidden('debit_amount[]', '-', []) }}
{{ Form::hidden('credit_amount[]', '-', []) }}
{{ Form::hidden('debit_ledger_id[]', '-', []) }}
{{ Form::hidden('credit_ledger_id[]', '-', []) }}
{!! Form::hidden('project_id_fk[]', $item->project->id ?: null, [
'class' => 'form-control project project-hidden',
'autocomplete' => 'off',
]) !!}
{!! Form::hidden('project_type_id_fk[]', $item->projectType->id ?: null, [
'class' => 'form-control project-type project-type-hidden',
'autocomplete' => 'off',
]) !!}
{!! Form::hidden('voucher_type_id_fk[]', $fpAVMaster->voucher_type_id_fk ?: null, [
'class' => 'form-control voucher-type-hidden',
'autocomplete' => 'off',
]) !!}
| Dr |
Cr |
Amount |
Voucher Description |
@php $totalSubItemAmount = 0.00; @endphp
@foreach ($item->subItems as $subItem)
@php
$amount = $subItem->getAmountByEmployee($employee);
$totalSubItemAmount += $amount;
// Skipp row whose amount is zero
if ($amount < 1) {
continue;
}
@endphp
{!! Form::hidden('debit_amount[]', $amount, ['class' => 'form-control debit', 'autocomplete' => 'off']) !!}
{!! Form::hidden('credit_amount[]', $amount, ['class' => 'form-control credit', 'autocomplete' => 'off']) !!}
@php
$isMatured = ((str_contains($subItem->transactionHead->slug, 'provident-fund') || str_contains($subItem->transactionHead->slug, 'provident-fund-contri') || str_contains($subItem->transactionHead->slug, 'provident-fund-interest')) && $pfMatured);
@endphp
{{-- after pf mature section --}}
@if ($isMatured)
{!! Form::hidden('debit_ledger_id[]', $subItem->after_dr_ledger_id_fk, [
'class' => 'form-control debit',
'autocomplete' => 'off',
]) !!}
{!! Form::hidden('credit_ledger_id[]', $subItem->after_cr_ledger_id_fk, [
'class' => 'form-control credit',
'autocomplete' => 'off',
]) !!}
| {{ $subItem->afterMatureDrLedger->name ?? '' }}
-
{{ $subItem->afterMatureDrLedger->code ?? '' }} |
{{ $subItem->afterMatureCrLedger->name ?? '' }}
-
{{ $subItem->afterMatureCrLedger->code ?? '' }} |
@else
{{-- before pf mature section --}}
{!! Form::hidden('debit_ledger_id[]', $subItem->before_dr_ledger_id_fk, [
'class' => 'form-control debit',
'autocomplete' => 'off',
]) !!}
{!! Form::hidden('credit_ledger_id[]', $subItem->before_cr_ledger_id_fk, [
'class' => 'form-control credit',
'autocomplete' => 'off',
]) !!}
{{ $subItem->beforeMatureDrLedger->name ?? '' }}
-
{{ $subItem->beforeMatureDrLedger->code ?? '' }} |
{{ $subItem->beforeMatureCrLedger->name ?? '' }}
-
{{ $subItem->beforeMatureCrLedger->code ?? '' }} |
@endif
{{ number_format($amount, 2) }} |
Final Payment Auto Voucher |
@endforeach
| Total |
{{ number_format($totalSubItemAmount, 2) }}
|
|
@endforeach
{{ Form::close() }}