@extends('layouts.pdf') @section('title') {{ $extra['module_name'] }} @endsection @section('content') @php @endphp @php $head_name = array(); $total_location_value = 0; $grand_total_property_value = 0; function calculateTotalPropertyValue($v) { $priceArray = $v->location->pluck('price')->toArray(); $totalLocationPrice = array_sum($priceArray); $total_location_value += $totalLocationPrice; $total_property_value = $v->totalValue() + $totalLocationPrice; return $total_property_value; } @endphp
@include('admin.partials.header', ['extra' => $extra])
@include('admin.partials.report_download_options', ['removeExcel' => true])

@if($list_extra_data['extra_params']['product_type'] != "") Product Type: {{ $list_extra_data['extra_params']['product_type'] }} @endif @if($list_extra_data['extra_params']['block'] != "") Block: {{ $list_extra_data['extra_params']['block'] }} @endif

@php foreach($products as $key => $product) { foreach($product as $v) { $total_sqr_top += $v->flat_size; $total_price_top+= $v->totalValue(); $sqr_yard_top = $v->size_in; $priceArray = $v->location->pluck('price')->toArray(); $totalLocationPrice= array_sum($priceArray); $total_location_value += $totalLocationPrice; $total_property_value = calculateTotalPropertyValue($v); $grand_total_property_value += $total_property_value; } } @endphp
{{__('lang.total_inventory')}}: {{ $productCount }}
{{__('lang.total_size_in')}} {{ $sqr_yard_top }}: {{ $transaction->convert_money_format($total_sqr_top) }}
{{__('lang.total_property_value')}}: {{ $transaction->convert_money_format($grand_total_property_value) }}

@foreach ($products as $key => $value ) @foreach ($value as $val) @php $total_sqr += $val->flat_size; $total_price+= $val->totalValue(); $sqr_yard = $val->size_in; @endphp @endforeach @endforeach
{{__('lang.property_id_unit_number')}} {{__('lang.project_name')}} {{__('lang.size')}} {{__('lang.type')}} {{__('lang.location')}} {{__('lang.location_value')}} {{__('lang.property_value')}} {{__('lang.total_property_value')}} {{__('lang.status')}}
{{ $key }}
{{$val->product_unique_id}} {{ ucfirst($val->branch->name) }} {{ $val->flat_size . " (". ucfirst($val->size_in) . ")" }} {{ $val->type->name }} {!! $val->product_location ? str_replace(', ', ',
', $val->product_location) : '-' !!}
{!! $val->location->pluck('price')->toArray() ? implode(',
',$val->location->pluck('price')->toArray()) : '-'!!}
{{ $transaction->convert_money_format($val->totalValue()) }} {{$transaction->convert_money_format(calculateTotalPropertyValue($val))}} {{ isset($val->sell) ? $val->sell->customer->name : ($val->status == 'HOLD' ? "( ".$val->status . " By " . $val->hold_by ." ) " : $val->status)}} {{ isset($val->sell) ? '(' . $val->sell->registration_no . ') (SOLD)' : ''}}
{{__('lang.total')}} {{ $productCount }} {{ $transaction->convert_money_format($total_sqr) }} {{ $sqr_yard }} {{ $transaction->convert_money_format($total_location_value) }} {{ $transaction->convert_money_format($total_price) }} {{ $transaction->convert_money_format($grand_total_property_value) }}

@stop