@use(App\Models\Payment) @extends('adminlte::layouts.app') @section('htmlheader_title') Unapplied Payments @endsection @section('page_title') Unapplied @endsection @section('contentheader_title') Unapplied Payments @endsection @section('contentheader_description') @endsection @section('main-content')
@foreach(Payment::active()->unapplied()->with(['account.user','checkout','items'])->get() as $o) @continue(! $o->balance) @endforeach
ID Date Paid Account Method Total Balance Invoices
{{ $o->id }} {{ $o->paid_at->format('Y-m-d') }} {{ $o->account->name }} {{ $o->checkout->name }} {{ number_format($o->total_amt,2) }} {{ number_format($o->balance,2) }} {!! $o->items->pluck('invoice_id')->map(function($item) { return sprintf('%d',url('u/invoice',$item),$item); })->join(', ') !!}
@endsection @pa(datatables,rowgroup|conditionalpaging) @section('page-scripts') @append