{{-- --}} {{-- {{ dd($permitData->payments()->orderBy('id', 'desc')->get()) }} --}} @foreach ($permitData->payments()->orderBy('id', 'desc')->get() as $payment) {{-- {{ dd($payment) }} --}} @php if ($payment->status == 'Paid') { $color = 'green'; }elseif ($payment->status == 'Unpaid') { $color = 'black'; }elseif ($payment->status == 'Cancelled') { $color = 'red'; } @endphp @endforeach
Sr.No. Invoice No Invoice Date Amount Payment DescriptionMode of PaymentPayment Method Created By Status Invoice Receipt Action
{{ $loop->iteration }} {{ $payment->invoice_number }} {{ $payment->created_at ? date(config('site.dateFormat'), strtotime($payment->created_at)) : '' }} ${{ $payment->total_amount }} @php $description = ''; foreach ($payment->details as $details) { $description .= $details->description . ', '; } if($payment->late_fee > 0){ $description .= 'Late Fee' . ', '; } if($payment->planReviewFee > 0){ $description .= 'Plan Review Fee' . ', '; } if($payment->disc_or_add_note){ $description .= $payment->disc_or_add_note . ', '; } @endphp {{ rtrim($description, ', ') }} @php $history = null; if ($payment->paymentHistory && $payment->paymentHistory->isNotEmpty()) { $history = $payment->paymentHistory->last(); } @endphp {{ $history ? $history->payment_mode : '' }} {{ $payment->createdBy ? $payment->createdBy->first_name.' '.$payment->createdBy->last_name: ''}} {{ $payment->status }} @if ($payment->status == 'Paid') @endif @if (request()->routeIs("*.edit")) @if ($payment->status == 'Unpaid' && $payment->is_mail_send == '1') {{-- --}} @endif @if($history) @if($payment->status == 'Unpaid' && $payment->is_mail_send == '2' && $history->payment_status == '1') Payment Link Send To Email @endif @if($payment->status == 'Unpaid' && $history->payment_status == '3') Payment Has Been Canceled @endif @if($payment->status == 'Unpaid' && $history->payment_status == '4') Payment Has Been Declined @endif @else @if ($payment->status == 'Unpaid') @endif @endif @if(auth()->user()->roles()->first()->name == 'Developer' || auth()->user()->roles()->first()->name == 'Superadmin' || auth()->user()->roles()->first()->name == 'Admin') @if ($payment->status == 'Paid' && $payment->is_payment_note == '0') @endif @endif @endif {{-- Cancel --}}