@php $unittype = []; foreach ($model[0]['unittypes'] as $key => $value) { $val = []; $val['unittype'] = $value['unittype']; $val['building'] = []; $val['unit_sold'] = 0; // $val['actual'] = 0; // $val['extra'] = 0; $val['total'] = 0; $val['dis'] = 0; $val['net'] = 0; $val['rcvd'] = 0; $val['post_dated_receipts']=0; $val['net_bal'] = 0; $val['total_receivable'] = 0; $val['total_bal'] = 0; $val['dld_charges'] = 0; $val['admin_fee'] = 0; $unittype[] = $val; } // $grand_total_actual = 0; // $grand_total_extra = 0; $grand_total_unit_total = 0; $grand_total_discount = 0; $grand_total_net_price = 0; $grand_total_recieved = 0; $grand_total_receivable = 0; $grand_outstanding = 0; $grand_post_dated_receipts=0; $grand_bal = 0; $grand_total_dld_charges = 0; $grand_total_admin_fee = 0; $buildings = []; @endphp @foreach($model as $building_key => $item) @php $building_units_count = 0; @endphp




@php // $building_total_actual = 0; // $building_total_extra = 0; $building_total_unit_total = 0; $building_total_discount = 0; $building_total_net_price = 0; $building_total_recieved = 0; $building_total_receivable = 0; $building_outstanding = 0; $building_post_dated_receipts=0; $building_bal = 0; $building_total_dld_charges = 0; $building_total_admin_fee = 0; @endphp {{-- --}} {{-- --}} @foreach ($item["unittypes"] as $unittype_key => $unittypes) @php $val = []; $val['count'] = count($unittypes['units']); $building_units_count += $val['count']; $unittype[$unittype_key]['building'][] = $val; // $total_actual = 0; // $total_extra = 0; $total_unit_total = 0; $total_discount = 0; $total_net_price = 0; $total_recieved = 0; $total_receivable = 0; $total_outstanding = 0; $total_post_dated_receipts = 0; $total_bal = 0; $total_dld_charges = 0; $total_admin_fee = 0; @endphp @if (count($unittypes['units']) > 0) @foreach ($unittypes['units'] as $key => $unit ) @php // $total_actual = $total_actual+(float)$unit['price']; // $total_extra = $total_extra+(float)$unit['total_extra_charges']; $unit_total = (float)$unit['price'] + (float)$unit['total_extra_charges']; $total_unit_total = $total_unit_total + $unit_total; $total_discount = $total_discount+ (float)$unit['discount']; $total_net_price = $total_net_price+(float)$unit['net_payable']; $total_recieved = $total_recieved+(float)$unit['total_receipts']; // $total_receivable = $total_receivable+(float)$unit['total_receivables']; $total_outstanding = $total_outstanding+(float)$unit['current_outstanding']; $total_post_dated_receipts = $total_post_dated_receipts+(float)$unit['post_dated_receipts']; $total_bal = $total_net_price-(float)$total_recieved; $total_dld_charges = $total_dld_charges+(float)$unit['dld_charges']-(float)$unit['dld_receipts']; $total_admin_fee = $total_admin_fee+(float)$unit['admin_fee']- (float)$unit['admin_receipts']; @endphp {{-- --}} {{-- --}} @endforeach @else @endif {{-- --}} {{-- --}} @php // $building_total_actual = $building_total_actual + $total_actual; // $building_total_extra = $building_total_extra + $total_extra; $building_total_unit_total = $building_total_unit_total + $total_unit_total; $building_total_discount = $building_total_discount + $total_discount; $building_total_net_price = $building_total_net_price + $total_net_price; $building_total_recieved = $building_total_recieved + $total_recieved; $building_post_dated_receipts = $building_post_dated_receipts + $total_post_dated_receipts; $building_total_receivable = $building_total_receivable + $total_receivable; $building_outstanding = $building_outstanding + $total_outstanding; $building_bal = $building_bal + $total_bal; $building_total_dld_charges = $building_total_dld_charges + $total_dld_charges; $building_total_admin_fee = $building_total_admin_fee + $total_admin_fee; // $unittype[$unittype_key]['actual'] += $total_actual; // $unittype[$unittype_key]['extra'] += $total_extra; $unittype[$unittype_key]['total'] += $total_unit_total; $unittype[$unittype_key]['dis'] += $total_discount; $unittype[$unittype_key]['net'] += $total_net_price; $unittype[$unittype_key]['rcvd'] += $total_recieved; $unittype[$unittype_key]['total_receivable'] += $total_receivable; $unittype[$unittype_key]['post_dated_receipts'] += $total_post_dated_receipts; $unittype[$unittype_key]['net_bal'] += $total_outstanding; $unittype[$unittype_key]['total_bal'] += $total_bal; $unittype[$unittype_key]['dld_charges'] += $total_dld_charges; $unittype[$unittype_key]['admin_fee'] += $total_admin_fee; @endphp @endforeach @php $val= []; $val['count'] = $building_units_count; $buildings[] = $val; @endphp {{-- --}} {{-- --}} {{-- --}} {{-- --}} @php // $grand_total_actual = $grand_total_actual + $building_total_actual; // $grand_total_extra = $grand_total_extra + $building_total_extra; $grand_total_unit_total = $grand_total_unit_total + $building_total_unit_total; $grand_total_discount = $grand_total_discount + $building_total_discount; $grand_total_net_price = $grand_total_net_price + $building_total_net_price; $grand_total_recieved = $grand_total_recieved + $building_total_recieved; $grand_post_dated_receipts = $grand_post_dated_receipts + $building_post_dated_receipts; $grand_total_receivable = $grand_total_receivable + $building_total_receivable; $grand_outstanding = $grand_outstanding + $building_outstanding; $grand_bal = $grand_bal + $building_bal; $grand_total_dld_charges = $grand_total_dld_charges + $building_total_dld_charges; $grand_total_admin_fee = $grand_total_admin_fee + $building_total_admin_fee; @endphp

Empire Developments

Date: {{$data['date']}}
{{ $item->buildingname }}
S.No Unit No Customer DetailsActual ExtrasSelling Price Discount Net Selling Price Received Received Percentage PDC'sCurrent ReceivableOutstanding Total Balance DLD Charges Admin Fee Followup/BkDate
{{ $unittypes['unittype'] }}
{{ ($key+1) }} {{ $unit['unitname'] }} {{ $unit['customername'] }}
({{ $unit['mobile'] }})
{{ number_format($unit['price'],2) }} {{ number_format($unit['total_extra_charges'],2) }}{{ number_format($unit_total,2) }} {{ number_format($unit['discount'],2) }} {{ number_format($unit['net_payable'],2) }} {{ number_format($unit['total_receipts'],2) }} @if ($unit['net_payable'] > 0) {{ number_format(($unit['total_receipts'] / $unit['net_payable']) * 100, 2) }}% @else 0% @endif {{ number_format($unit['post_dated_receipts'],2) }}{{ number_format($unit['total_receivables'],2) }}{{ number_format($unit['current_outstanding'],2) }} {{ number_format($unit['net_payable'] - $unit['total_receipts'],2) }} {{ number_format($unit['dld_charges']-$unit['dld_receipts'],2) }} {{ number_format($unit['admin_fee']-$unit['admin_receipts'],2) }} {{ ($unit["latestFollowup"] != null) ? $unit["latestFollowup"]["remarks"] : '-' }}({{date('d-M-Y', strtotime( $unit['booking_date'])) }})
0 0 0 0 0 0 - 0 0 0 -
Total{{ number_format($total_actual,2) }} {{ number_format($total_extra,2) }}{{ number_format($total_unit_total,2) }} {{ number_format($total_discount,2) }} {{ number_format($total_net_price,2) }} {{ number_format($total_recieved,2) }} @if($total_net_price > 0) {{ number_format(($total_recieved / $total_net_price) * 100, 2) }}% @else 0% @endif {{ number_format($total_post_dated_receipts,2) }}{{ number_format($total_receivable,2) }}{{ number_format($total_outstanding,2) }} {{ number_format($total_bal,2) }} {{ number_format($total_dld_charges,2) }} {{ number_format($total_admin_fee,2) }}
 
ACTUAL EXTRATOTAL DIS NET RCVD RCVD %AGE PDC'sCurrent ReceivableOutstanding BAL DLD CHARGES ADMIN FEE
{{ $item->shortname }}{{ number_format($building_total_actual,2) }} {{ number_format($building_total_extra,2) }}{{ number_format($building_total_unit_total,2) }} {{ number_format($building_total_discount,2) }} {{ number_format($building_total_net_price,2) }} {{ number_format($building_total_recieved,2) }} @if ($building_total_net_price > 0) {{ number_format(($building_total_recieved / $building_total_net_price) * 100,2) }}% @else 0% @endif {{ number_format($building_post_dated_receipts,2) }}{{ number_format($building_total_receivable,2) }}{{ number_format($building_outstanding,2) }} {{ number_format($building_bal,2) }} {{ number_format($building_total_dld_charges,2) }} {{ number_format($building_total_admin_fee,2) }}
 
@endforeach {{-- --}} {{-- --}} {{-- --}} {{-- --}}
ACTUAL EXTRATOTAL DIS NET RCVD RCVD %AGE PDC'sCurrent ReceivableOUTSTANDING BAL DLD CHARGES ADMIN FEE
GRAND TOTAL{{ number_format($grand_total_actual,2) }} {{ number_format($grand_total_extra,2) }}{{ number_format($grand_total_unit_total,2) }} {{ number_format($grand_total_discount,2) }} {{ number_format($grand_total_net_price,2) }} {{ number_format($grand_total_recieved,2) }} @if ($grand_total_net_price > 0) {{ number_format(($grand_total_recieved / $grand_total_net_price) * 100,2) }}% @else 0% @endif {{ number_format($grand_post_dated_receipts,2) }}{{ number_format($grand_total_receivable,2) }}{{ number_format($grand_outstanding,2) }} {{ number_format($grand_bal,2) }} {{ number_format($grand_total_dld_charges,2) }} {{ number_format($grand_total_admin_fee,2) }}
{{-- --}} {{-- --}} @foreach ($model as $block) @endforeach @foreach ($unittype as $row) @php $unit_sold = 0; @endphp @foreach ($row['building'] as $item) @php $unit_sold += $item['count']; @endphp @endforeach {{-- --}} {{-- --}} @endforeach @php $total_units = 0; @endphp @foreach ($buildings as $row) @php $total_units += $row['count']; @endphp @endforeach {{-- --}} {{-- --}}
SALES SUMMARY UPTO {{ $data['date'] }}
TYPE BLOCK UNITS SOLDACTUAL EXTRATOTAL DIS NET RCVD RCVD %AGE PDC'sCurrent ReceivableOutstanding BAL DLD Chargse Admin Fee
{{ $block->shortname }}
{{ $row['unittype'] }}{{ $item['count']}}{{ $unit_sold }}{{ number_format($row['actual'],2) }} {{ number_format($row['extra'],2) }}{{ number_format($row['total'],2) }} {{ number_format($row['dis'],2) }} {{ number_format($row['net'],2) }} {{ number_format($row['rcvd'],2) }} @if ($row['net']) {{ number_format(($row['rcvd'] / $row['net']) * 100, 2) }}% @else 0% @endif {{ number_format($row['post_dated_receipts'],2) }}{{ number_format($row['total_receivable'],2) }}{{ number_format($row['net_bal'],2) }} {{ number_format($row['total_bal'],2) }} {{ number_format($row['dld_charges'],2) }} {{ number_format($row['admin_fee'],2) }}
Total{{ $row['count'] }}{{ $total_units }}{{ number_format($grand_total_actual,2) }} {{ number_format($grand_total_extra,2) }}{{ number_format($grand_total_unit_total,2) }} {{ number_format($grand_total_discount,2) }} {{ number_format($grand_total_net_price,2) }} {{ number_format($grand_total_recieved,2) }} @if ($grand_total_net_price > 0) {{ number_format(($grand_total_recieved / $grand_total_net_price) * 100, 2) }}% @else 0% @endif {{ number_format($grand_post_dated_receipts,2) }}{{ number_format($grand_total_receivable,2) }}{{ number_format($grand_outstanding,2) }} {{ number_format($grand_bal,2) }} {{ number_format($grand_total_dld_charges,2) }} {{ number_format($grand_total_admin_fee,2) }}