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

Contractor Payment Table

{{-- Filter Form --}}
@csrf
@if(!empty($dfrom) || !empty($dto) || !empty($contractor_id)) Clear @endif
@if(!empty($dfrom) || !empty($dto) || !empty($contractor_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($contractor_id)) @php $selectedContractor = $contractors->firstWhere('vendor_id', $contractor_id); @endphp @if($selectedContractor) for contractor: {{ $selectedContractor->vendor_no }} - {{ $selectedContractor->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 Contractor Payment Type Amount Action
{{$index++}} SSL-{{ 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 Contractor Payment Type Amount Action
@endsection