@extends('layouts.adminapp') @section('title') {{ __('lng.HouseSubscriptionReport') }} - {{ __('lng.Print') }} @endsection @section('active_report', 'active') @section('open_report', 'open') @section('open_subscription_report', 'open') @section('active_subscription_report', 'active') @section('open_house_subscription_report', 'open') @section('active_house_subscription_report', 'active') @section('active_house_sd_subscription_report', 'active') @section('content')

{{ __('lng.Print') }}

@include('PrintHeader.header')

{{__('lng.HouseSubscriptionStandardReport')}}

{{__('lng.Status')}}: {{$Status}}
@php $si=0; @endphp @foreach($ArHouse as $key=>$HouseSubscription) @php // Joining Date $DTs=""; $TotMonth=0; $Amount=0; $OpeningBalance=0; $Payable=0; $Payed=0; $AdBal=0; // if($HouseSubscription) { $DTs = date("Y-m-d",strtotime($HouseSubscription->date)); $TodayDate=date("Y-m-d"); if(strtotime($DTs)date); $month2 = Carbon\Carbon::parse($NOW); $TotMonth = $month1->diffInMonths($month2); } // $TotMonth = $diff-$NOWDate; $Amount = $HouseSubscription->subscriptionpackage->amount; if($HouseSubscription->DRorCR == 'Dr'){ $OpeningBalance = $HouseSubscription->openingbalance; } elseif($HouseSubscription->DRorCR == 'Cr') { $OpeningBalance = -1 * $HouseSubscription->openingbalance; } // } // Payable Caliculation if (is_numeric($TotMonth)) { if($OpeningBalance > 0){ $Payable = ($TotMonth*$Amount)+$OpeningBalance; } else{ $Payable = $TotMonth*$Amount; } } // Payed Caliculation foreach($HouseSubscription->house->subscriptions as $Subscriptionpay) { if($Subscriptionpay->isCancelled!=1) { $Payed+=$Subscriptionpay->amount; } } // Advance Or Balance Caliculation if($OpeningBalance < 0){ $AdBal=($Payable-$Payed)+$OpeningBalance; } else { $AdBal=$Payable-$Payed; } @endphp @foreach($HouseSubscription->house->members as $Member) @if($Member->member_relation_id == App\Extra\General\DBFixedValues::AUTHORITY) @endif @endforeach @endforeach
{{__('lng.SiNo')}} {{__('lng.Authority')}} {{__('lng.Reg.No.')}} {{__('lng.Place')}} {{__('lng.SubscriptionDateOfJoin')}} {{__('lng.OpeningBalance')}}
{{__('lng.Pending')}} / {{__('lng.Advance')}}
{{__('lng.Amount')}} {{__('lng.Month')}} {{__('lng.Payable')}} {{__('lng.Payed')}} {{__('lng.Balance')}} / {{__('lng.Advance')}}
{{++$si}}{{$HouseSubscription->house->name}} - {{$Member->name}}{{$HouseSubscription->house->registernumber}} {{$HouseSubscription->house->place}} {{$DTs}} @if($OpeningBalance<0) @currency($OpeningBalance*-1) @elseif($OpeningBalance>0) @currency($OpeningBalance) @else @currency($OpeningBalance) @endif @currency($HouseSubscription->subscriptionpackage->amount ?? '0') {{$TotMonth}} {{$Payable}} {{$Payed}} @if($AdBal<0) {{$AdBal*-1}} @elseif($AdBal>0) {{$AdBal}} @else {{$AdBal}} @endif
{{ __('lng.Back') }}
@endsection