@extends('index') @section('content')
{{-- Vendor / Contractor Payment Table --}}

Vendor Payment Table

{{-- Filter Form --}}
@csrf
@if(!empty($dfrom) || !empty($dto) || !empty($vendor_id)) Clear @endif
@if(!empty($dfrom) || !empty($dto) || !empty($vendor_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($vendor_id)) @php $selectedVendor = $vendors->firstWhere('vendor_id', $vendor_id); @endphp @if($selectedVendor) for vendor: {{ $selectedVendor->vendor_no }} - {{ $selectedVendor->fname }} @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 Vendor 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->vendor_no}} - {{$item->fname}} {{ucfirst($item->transaction_type)}} {{number_format($item->debit ? $item->debit : $item->credit)}} View Edit
Sr. Voucher No Date Vendor Payment Type Amount Action
@endsection