@if (!$extra['branch']) @endif @php $total_bill_amount = 0; $total_received = 0; $total_surcharge = 0; $total_bill_amount_surcharge = 0; @endphp @foreach ($data_bills_information as $property_unit => $bills_information ) @php $group_total_bill_amount = 0; $group_total_received = 0; $group_total_surcharge = 0; $group_total_bill_amount_surcharge = 0; @endphp @foreach ($bills_information as $bill_information) @php $bill_month = '1-' . $bill_information->month . '-' . $bill_information->year; $bill_month = date('M-Y', strtotime($bill_month)); $surcharge = 0; $bill_total_amount = $bill_information->total_amount; if ($bill_information->amount_received_last_date > $bill_information->bill_date || $bill_information->status != 'Active') { $surcharge = $bill_information->surcharge_amount; $bill_total_amount = $bill_information->amount_after_due_date; } $group_total_bill_amount += $bill_information->total_amount; $group_total_received += $bill_information->amount_received; $group_total_surcharge += $surcharge; $group_total_bill_amount_surcharge += $bill_total_amount; $total_bill_amount += $bill_information->total_amount; $total_received += $bill_information->amount_received; $total_surcharge += $surcharge; $total_bill_amount_surcharge += $bill_total_amount; // BADGES START if( $bill_information->bill_date < date('Y-m-d',strtotime(now())) && $bill_information->amount_received_status !=='Settled' ){ $amount_status_class ='badge-danger'; $bill_information->amount_received_status ='Defaulter'; } else if ($bill_information->amount_received_status == 'Settled') { $amount_status_class = 'badge-success'; } elseif ($bill_information->amount_received_status == 'Partially Settled') { $amount_status_class = 'badge-warning'; } elseif ($bill_information->amount_received_status == 'Pending') { $amount_status_class = 'badge-info'; } if($bill_information->status == 'Active'){ $status_class ='badge-success'; } elseif($bill_information->status == 'Over Due'){ $status_class ='badge-danger'; } else { $status_class = 'badge-info'; } // BADGES END if(str_contains($bill_information->bill_no,'FOB')){ $bill_type ='Maintenance Bill'; $edit_route = 'maintenance.customer_bill.edit'; } else if(str_contains($bill_information->bill_no,'FWB')){ $bill_type ='Water Bill'; $edit_route = 'maintenance.bill.water.edit'; } else if(str_contains($bill_information->bill_no,'FEB')){ $bill_type ='Electricity Bill'; $edit_route = 'maintenance.bill.electricity.edit'; } @endphp @if (!$extra['branch']) @endif @endforeach @endforeach
{{ __('lang.sno') }} {{ __('lang.project') }} {{ __('lang.owner') }} {{ __('lang.property_id') }} {{ __('lang.bill_type') }} {{ __('lang.bill_no') }} {{ __('lang.bill_month') }} {{ __('lang.bill_amount') }} {{$transaction->systemSettingCurrency()}} {{ __('lang.surcharge_amount') }} {{$transaction->systemSettingCurrency()}} {{ __('lang.bill_total_amount') }} {{$transaction->systemSettingCurrency()}} {{ __('lang.bill_due_date') }} {{ __('lang.payment_received') }} {{$transaction->systemSettingCurrency()}} {{ __('lang.last_payment_date') }} {{ __('lang.status') }} {{ __('lang.payment_status') }}
{{ __('lang.property_id') }} - {{ $property_unit }}
{{ $loop->iteration }}{{ $bill_information->product->branch->name }}{{ $bill_information->product->owner->name }} {{ $bill_information->product->product_unique_id }} {{ $bill_type }} {{ $bill_information->bill_no }} {{ $bill_month }} {{ $transaction->convert_money_format($bill_information->total_amount) }} {{ $transaction->convert_money_format($surcharge) }} {{ $transaction->convert_money_format($bill_total_amount) }} {{ $transaction->date_format($bill_information->bill_date) }} {{ $transaction->convert_money_format($bill_information->amount_received) }} {{ $transaction->date_format($bill_information->amount_received_last_date) ?? '-' }} {{ $bill_information->status }} {{ $bill_information->amount_received_status }}
{{$property_unit}} {{__('lang.total')}} {{ $transaction->convert_money_format($group_total_bill_amount) }} {{ $transaction->convert_money_format($group_total_surcharge) }} {{ $transaction->convert_money_format($group_total_bill_amount_surcharge) }} {{ $transaction->convert_money_format($group_total_received) }}
{{__('lang.total')}} {{ $transaction->convert_money_format($total_bill_amount) }} {{ $transaction->convert_money_format($total_surcharge) }} {{ $transaction->convert_money_format($total_bill_amount_surcharge) }} {{ $transaction->convert_money_format($total_received) }}