@extends('mainlayout.layout') @section('title') @endsection @push('css') @endpush @php use App\Models\{Property,PropertyOwner,Order,Transactions,User}; $customer=User::find($order->userid); $transactions=Transactions::query(); $transactions=$transactions->where('reference',$order->referenceid)->get(); @endphp @section('content')

Reference

{{$order->referenceid}}

Status

{{$order->status_description}}

Amount To Be Paid

TZS {{ number_format($order->amount,0,'.',',') }}

Order Type

{{$order->order_type}}

Total Transaction

{{$transactions->count()}}

Amount Paid

TZS {{ number_format($transactions->sum('amount_paid'),0,'.',',')}}

{{count($transactions)}} Results found

@php $total_paid=0; @endphp @foreach($transactions as $index => $transaction) @php $total_paid=$total_paid+$transaction->amount_paid; @endphp @endforeach
# Reference ID Amount Paid Receipt Transaction ID Source Institution Status Occured On
{{++$index}} {{$transaction->reference}} TZS {{number_format($transaction->amount_paid,0,'.',',') }} {{$transaction->receipt}} {{$transaction->transactionId}} {{$transaction->sourceInstitution}} {{$transaction->status_description}} {{$transaction->created_at}}
TOTA TZS {{number_format($total_paid,0,'.',',')}}
@endsection @push('scripts') @endpush