@extends('layouts.pdf') @section('title') {{ $extra['module_name'] }} @endsection @section('content') @php $is_official = $list_extra_data['extra_params']['is_official']; @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; } function findLocationValue($v) { $priceArray = $v->location->pluck('price')->toArray(); $totalLocationPrice = array_sum($priceArray); return $totalLocationPrice; } @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) }}

@if ($is_official == "combine" || $is_official == "separate") @endif @if ($is_official != "official") @endif @if ($is_official != "official") @endif @if ($is_official == "official" || $is_official == "separate") @endif @if ($is_official == "unofficial" || $is_official == "separate") @endif @foreach ($products as $key => $value ) @foreach ($value as $val) @if ($is_official == "combine" || $is_official == "separate") @endif @if ($is_official != "official") @endif @if ($is_official != "official") @endif @if ($is_official == "official" || $is_official == "separate") @endif @if ($is_official == "unofficial") @elseif($is_official == "separate") @endif @php $total_sqr += $val->flat_size; $total_price+= $val->totalValue(); $total_price_official += $val->fixed_amount_official; $total_price_unofficial += $val->fixed_amount_unofficial; $sqr_yard = $val->size_in; @endphp @endforeach @endforeach @if ($is_official == "combine" || $is_official == "separate") @endif @if ($is_official != "official") @endif @if ($is_official != "official") @endif @if ($is_official == "official" || $is_official == "separate") @endif @if ($is_official == "unofficial" || $is_official == "separate") @endif
{{__('lang.sno')}} {{__('lang.property_id_unit_number')}} {{__('lang.project_name')}} {{__('lang.size')}} {{__('lang.rate_per_size')}} {{__('lang.type')}} {{__('lang.block')}} {{__('lang.floor')}}{{__('lang.property_value')}}{{__('lang.location')}}{{__('lang.location_value')}}{{__('lang.location_total_value')}}{{__('lang.property_value_official')}}{{__('lang.property_value_unofficial')}}{{__('lang.total_property_value')}} {{__('lang.status')}}
{{ $key }}
{{ $loop->iteration }} {{$val->product_unique_id}} {{ ucfirst($val->branch->name) }} {{ $val->flat_size . " (". ucfirst($val->size_in) . ")" }} {{ $transaction->convert_money_format($val->rate_per_size)}} {{ $val->type->name }} {{ $val->block->name ?? '-' }} {{ $val->floor->name ?? '-' }} {{ $transaction->convert_money_format($val->totalValue()) }} {!! $val->product_location ? str_replace(', ', ',
', $val->product_location) : '-' !!}
{!! $val->location->pluck('price')->toArray() ? implode(',
',$val->location->pluck('price')->toArray()) : '-'!!}
{{$val->additional_charges}} {{ $transaction->convert_money_format($val->fixed_amount_official) }} {{ $transaction->convert_money_format($val->fixed_amount_unofficial + findLocationValue($val)) }} {{ $transaction->convert_money_format($val->fixed_amount_unofficial) }} @if($is_official == 'official') {{$transaction->convert_money_format($val->fixed_amount_official)}} @elseif ($is_official == 'unofficial') {{$transaction->convert_money_format($val->fixed_amount_unofficial + findLocationValue($val))}} @else {{$transaction->convert_money_format(calculateTotalPropertyValue($val))}} @endif {{ 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_price) }} {{ $transaction->convert_money_format($total_location_value) }} {{$transaction->convert_money_format($total_location_value)}} {{ $transaction->convert_money_format($total_price_official) }} {{ $transaction->convert_money_format($total_price_unofficial) }} @if($is_official == 'official') {{ $transaction->convert_money_format($total_price_official) }} @elseif($is_official == 'unofficial') {{ $transaction->convert_money_format($total_price_unofficial) }} @else {{ $transaction->convert_money_format($grand_total_property_value) }} @endif

@stop