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

Order Payment Table

{{-- Filter Form --}}
@csrf
@if(!empty($dfrom) || !empty($dto) || !empty($customer_id)) Clear @endif
@if(!empty($dfrom) || !empty($dto) || !empty($customer_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($customer_id)) @php $selectedCustomer = $customers->firstWhere('customer_id', $customer_id); @endphp @if($selectedCustomer) for customer: {{ $selectedCustomer->customer_no }} - {{ $selectedCustomer->fname }} {{ $selectedCustomer->lname }} @endif @endif
@endif
@if($transaction->count()) @foreach($transaction as $item) @endforeach @endif
Sr. Voucher No Date Customer No Order No Amount Fees Action
{{$loop->index + 1}} SLE-{{ date('Y') }}-{{ str_pad($item->transaction_id, 4, '0', STR_PAD_LEFT) }} {{\Carbon\Carbon::parse($item->transaction_date)->format('d-m-Y')}} {{$item->customer_no}} - {{$item->fname}} {{$item->lname}} {{$item->order_no}} {{number_format($item->debit ? $item->debit : $item->credit)}} {{$item->fb_charges ? number_format($item->fb_charges) : 'N/A'}} View Edit
Sr. Voucher No Date Customer No Order No Amount Fees Action
@endsection