@extends('mainlayout.layout') @php use App\Models\Order; use App\Models\Transactions; @endphp @section('title') {{env('APP_NAME')}} | {{$owner->name}} @endsection @php use App\Models\{Property,PropertyOwner,Customer,PropertyPlotPricing,LandUse,PropertyPlot}; $propertyids= Property::where('propertyownerid', $owner->id)->pluck('id') @endphp @push('css') @endpush @section('content')

PROJECT OWNER

Owner's Name

{{$owner->name}}

Mobile number

{{$owner->mobilenumber}}

Email

{{$owner->email}}

Address

{{$owner->address}}

Registered On

{{$owner->created_at}}
@if(!empty($owner->bank))

Bank

{{App\Models\BankList::find($owner->bank)->name}}

Account Name

{{$owner->accountname}}

Account Number

{{$owner->accountnumber}}
@endif

Owner Description

{{$owner->description}}

Projects

{{$owner->projects->count()}}

Plots

{{$plotscount}}

Sold Plots

{{Order::wherein('propertyid',$propertyids)->where('status',2)->count()}}

Revenue

TZS {{number_format(Order::wherein('propertyid',$propertyids)->where('status',2)->sum('amount'),0,'.',',')}}

Projects

{{Property::where('propertyownerid',$owner->id)->count()}} Results Found

@foreach(Property::where('propertyownerid',$owner->id)->get() as $index => $p) @endforeach
# Name Status Description Created On Action
{{++$index}} {{$p->name}} {{$p->status_description}} {{$p->created_at}} View More

Payment Transaction

@php $transactions=Transactions::wherein('propertyid',$propertyids)->get(); $total_amount=0; @endphp @foreach($transactions as $index => $transaction) @php $total_amount=$total_amount+$transaction->amount_paid; @endphp @endforeach
# Reference Transaction ID Receipt Project Plot ID Date Source Amount Status
{{++$index}} {{$transaction->reference}} {{$transaction->transactionId}} {{$transaction->receipt}} {{Property::find($transaction->propertyid)->name}} {{PropertyPlot::find($transaction->plotid)->plotnumber}} {{$transaction->created_at}} {{$transaction->sourceInstitution}} TZS {{number_format($transaction->amount_paid, 0, '.', ',')}} reference)->first()->status==2) style="color:#e67e22" @endif> {{Order::where('referenceid',$transaction->reference)->first()->status_description}}
TOTAL TZS {{number_format($total_amount,0,'.',',')}}
@endsection @push('scripts') @endpush