@extends('index') @section('content')

Employee Payment Table

{{-- Filter Form --}}
@csrf
@if(!empty($dfrom) || !empty($dto) || !empty($employee_id)) Clear @endif
@if(!empty($dfrom) || !empty($dto) || !empty($employee_id))
Filtered Results: @if(!empty($dfrom) && !empty($dto)) Showing payments from {{ date("d-m-Y", strtotime($dfrom)) }} to {{ date("d-m-Y", strtotime($dto)) }} @endif @if(!empty($employee_id)) @php $selectedEmp = $employees->firstWhere('employee_id', $employee_id); @endphp @if($selectedEmp) for employee: {{ $selectedEmp->employee_no }} - {{ $selectedEmp->name }} @endif @endif
@endif
@if($transaction->count()) @php $index = 1 @endphp @foreach($transaction as $item) @unless($item->transaction_type == 'openingBalance') @endunless @endforeach @endif
Sr. Voucher No Date Employee Payment Type Amount Action
{{$index++}} SLE-{{ date('Y') }}-{{ str_pad($item->transaction_id, 4, '0', STR_PAD_LEFT) }} {{\Carbon\Carbon::parse($item->transaction_date)->format('d-m-Y')}} {{$item->employee_no}} - {{$item->name}} {{ucfirst($item->transaction_type)}} {{number_format($item->debit ? $item->debit : $item->credit)}} View Edit
Sr. Voucher No Date Employee Payment Type Amount Action
@endsection