@php $rs = sizeof($mfnSavingsProducts); $rs = $rs + 1;@endphp
{{-- div for Company --}} @php $company = DB::table('gnr_company')->where('id', Auth::user()->company_id_fk)->select('name','address')->first(); @endphp {{$company->name}}
{{$company->address}}
Daily Collection Report Component Wise
{{-- --}}
Branch Name & Code: {{ $BrDatas->name }} & {{ $BrDatas->branchCode }}
Branch Address: {{ $BrDatas->address }}
Component: @if (sizeof($Component)>1) {{$ShowProduct}} @elseif (sizeof($Component)==1) {{$Component[0]->shortName}} @endif @php // echo 'component size : '.sizeof($Component); @endphp
Reporting Date: {{ $ReportDate }}
Reporting Date
: {{ $ReportDate }}
Print Date
: @php echo date("Y-m-d")@endphp

{{--
--}} @if($SavingsRecoverable == 2) @endif @if ($LoanDisbursementsTotal > 0) @endif @if($SavingsRecoverable == 2) @foreach ($mfnSavingsProducts as $mfnSavingsProduct) @endforeach @endif @foreach ($mfnSavingsProducts as $mfnSavingsProduct) @endforeach @foreach ($mfnSavingsProducts as $mfnSavingsProduct) @endforeach @php $subCount = 0; $val = 1; $val1 = 0; $val2 = 0; $val3 = 0; $val4 = 0; $val5 = 0; $aw = 1; $no_member_found = 0; $no_installment_payer = 0; $no_installment_due = 0; $deposite_amount = 0; $deposite_total = 0; $recoverable_total = 0; $recoverable_amount = 0; $withdraw_amount = 0; $withdraw_total = 0; $numbere_of_loanee_person = 0; $numbere_of_loan_persons_amount = 0; $numbere_of_loan_fully_paid_persons = 0; $numbere_of_loan_fully_paid_persons_amount = 0; $loanRecoverableValues = 0; $regularLoanAmount = 0; $regularLoanPrincipalAmount = 0; $regularLoanInterestAmount = 0; $dailyRecoverableAmount = 0; $dailyCollectionAmount = 0; $dailyDue = 0; $dailyAdvance = 0; $totalLoanCollection_principal_interest = 0; $insurancePremiumAmount = 0; $todaysTotalCollection = 0; $todaysTotalRefund = 0; $sub_total_no_member_found = 0; $sub_total_no_installment_payer = 0; $sub_total_no_installment_due = 0; $sub_total_deposite_amount = 0; $sub_total_deposite_total = 0; $sub_total_recoverable_total = 0; $sub_total_recoverable_amount = 0; $sub_total_withdraw_amount = 0; $sub_total_withdraw_total = 0; $sub_total_numbere_of_loanee_person = 0; $sub_total_numbere_of_loan_persons_amount = 0; $sub_total_numbere_of_loan_fully_paid_persons = 0; $sub_total_numbere_of_loan_fully_paid_persons_amount = 0; $sub_total_loanRecoverableValues = 0; $sub_total_regularLoanAmount = 0; $sub_total_regularLoanPrincipalAmount = 0; $sub_total_regularLoanInterestAmount = 0; $sub_total_dailyRecoverableAmount = 0; $sub_total_dailyCollectionAmount = 0; $sub_total_dailyDue = 0; $sub_total_dailyAdvance = 0; $sub_total_principalCollectedToday = 0; $sub_total_interestColletedToday = 0; $sub_total_totalLoanCollection_principal_interest = 0; $sub_total_insurancePremiumAmount = 0; $sub_total_todaysTotalCollection = 0; $sub_total_todaysTotalRefund = 0; $final_total_no_member_found = 0; $final_total_no_installment_payer = 0; $final_total_no_installment_due = 0; $final_total_deposite_amount = 0; $final_total_deposite_total = 0; $final_total_recoverable_total = 0; $final_total_recoverable_amount = 0; $final_total_withdraw_amount = 0; $final_total_withdraw_total = 0; $final_total_numbere_of_loanee_person = 0; $final_total_numbere_of_loan_persons_amount = 0; $final_total_numbere_of_loan_fully_paid_persons = 0; $final_total_numbere_of_loan_fully_paid_persons_amount = 0; $final_total_loanRecoverableValues = 0; $final_total_regularLoanAmount = 0; $final_total_regularLoanPrincipalAmount = 0; $final_total_regularLoanInterestAmount = 0; $final_total_dailyRecoverableAmount = 0; $final_total_dailyCollectionAmount = 0; $final_total_dailyDue = 0; $final_total_dailyAdvance = 0; $final_total_principalCollectedToday = 0; $final_total_interestColletedToday = 0; $final_total_totalLoanCollection_principal_interest = 0; $final_total_insurancePremiumAmount = 0; $final_total_todaysTotalCollection = 0; $final_total_todaysTotalRefund = 0; $sub_total_savings_recoverable = array (); $sub_total_savings_deposite = array (); $sub_total_savings_withdraw = array (); $final_total_savings_recoverable = array (); $final_total_savings_deposite = array (); $final_total_savings_withdraw = array (); $sub_total_savings_recoverable_total = 0; $sub_total_savings_deposite_total = 0; $sub_total_savings_withdraw_total = 0; $final_total_savings_recoverable_total = 0; $final_total_savings_deposite_total = 0; $final_total_savings_withdraw_total = 0; foreach ($mfnSavingsProducts as $mfnSavingsProduct) { $sub_total_savings_recoverable[$mfnSavingsProduct->id] = 0; $sub_total_savings_deposite[$mfnSavingsProduct->id] = 0; $sub_total_savings_withdraw[$mfnSavingsProduct->id] = 0; $final_total_savings_recoverable[$mfnSavingsProduct->id] = 0; $final_total_savings_deposite[$mfnSavingsProduct->id] = 0; $final_total_savings_withdraw[$mfnSavingsProduct->id] = 0; } $fieldWorkerId = 0; $fieldWorkerLoop = 0; @endphp @if ($SamityComponents != null) @php $Comp = sizeof($SamityComponents); @endphp @foreach ($FieldOffcers as $FieldOfficer) {{-- FIELD OFFICER --}} @foreach ($FieldOfficer as $FieldWorker) @php $s = 0; ++$fieldWorkerLoop; @endphp @foreach ($Samities as $Samity) @if ($Samity->fieldOfficerId == $FieldWorker->id) @php $s = $s + 1; @endphp @endif @endforeach @if ($Comp == 1) @php if ($subCount == 0) { $s = ($s * 1) + 1; } else { $s = ($s * 1) + $subCount; } @endphp @elseif ($Comp > 1) @php $s = ($s * $Comp) + $subCount; @endphp @endif @if ($fieldWorkerLoop > 1) @php $s+=1; @endphp @endif @php $count = 1; @endphp @php $a1 = 1;@endphp @foreach ($Samities as $Samity) {{-- SAMITY --}} @if ($Samity->fieldOfficerId == $FieldWorker->id) @if ($val==1) @endif @foreach ($SamityComponents as $SamityComponent) {{-- PRODUCTS --}} @foreach($SamityComponent as $SamityCompon) @if($val==1) @foreach ($totalMembers as $totalMember) {{-- TOTAL MEMBER --}} @if ($totalMember->samityIdFk == $Samity->id and $totalMember->productIdFk == $SamityCompon->id) @php $no_member_found+=1; $sub_total_no_member_found+= $totalMember->numbere_of_member; @endphp @endif @endforeach @foreach ($totalLoanee as $totalLoaneeMember) {{-- TOTAL LOANEE --}} @if ($totalLoaneeMember->samityIdFk == $Samity->id and $totalLoaneeMember->productIdFk == $SamityCompon->id) @php $no_member_found+=1; @endphp @endif @endforeach @if($no_member_found == 0) {{-- check member exist or not --}} @endif @foreach ($installmentPayer as $installmentPayerVaLue) {{-- TOTAL INSTALLMENT PAYER --}} @if ($installmentPayerVaLue->samityIdFk == $Samity->id and $installmentPayerVaLue->productIdFk == $SamityCompon->id) @php $no_installment_payer+=1; $sub_total_no_installment_payer+= $installmentPayerVaLue->numbere_of_installment_payer; @endphp @endif @endforeach @if($no_installment_payer == 0) {{-- check installment payer exist or not --}} @endif @foreach ($installmentDue as $installmentDueVaLue) {{-- TOTAL INSTALLMENT DUE --}} @if ($installmentDueVaLue->samityIdFk == $Samity->id and $installmentDueVaLue->productIdFk == $SamityCompon->id) @php $no_installment_due+=1; $sub_total_no_installment_due+= $installmentDueVaLue->numbere_of_installment_due; @endphp @endif @endforeach @if($no_installment_due == 0) {{-- check installment due exist or not --}} @endif @if($SavingsRecoverable == 2) {{--SAVINGS RECOVERABLE--}} {{-- @foreach ($mfnSavingsProducts as $mfnSavingsProduct) @endforeach --}} @foreach ($mfnSavingsProducts as $mfnSavingsProduct) @foreach ($savingsRecoverableValues as $savingsRecoverableValue) {{-- SAVINGS RECOVERABLE --}} @if ($savingsRecoverableValue->samityIdFk == $Samity->id and $savingsRecoverableValue->primaryProductIdFk == $SamityCompon->id and $mfnSavingsProduct->id == $savingsRecoverableValue->productIdFk) @php $recoverable_amount+=1; $recoverable_total+=$savingsRecoverableValue->recoverable_amount; $sub_total_savings_recoverable[$mfnSavingsProduct->id]+= $savingsRecoverableValue->recoverable_amount; $final_total_savings_recoverable[$mfnSavingsProduct->id]+= $savingsRecoverableValue->recoverable_amount; @endphp @endif @endforeach @if ($recoverable_amount == 0) @endif @php $recoverable_amount = 0; @endphp @endforeach @php $recoverable_total = 0; @endphp @endif @foreach ($mfnSavingsProducts as $mfnSavingsProduct) @foreach ($savingsDeposite as $savingsDepositeVaLue) {{-- SAVINGS DEPOSITE --}} @if ($savingsDepositeVaLue->samityIdFk == $Samity->id and $savingsDepositeVaLue->primaryProductIdFk == $SamityCompon->id and $mfnSavingsProduct->id == $savingsDepositeVaLue->productIdFk) @php $deposite_amount+=1; $deposite_total+=$savingsDepositeVaLue->deposite_amount; $todaysTotalCollection+= $savingsDepositeVaLue->deposite_amount; $sub_total_savings_deposite[$mfnSavingsProduct->id]+= $savingsDepositeVaLue->deposite_amount; $final_total_savings_deposite[$mfnSavingsProduct->id]+= $savingsDepositeVaLue->deposite_amount; @endphp @endif @endforeach @if ($deposite_amount == 0) @endif @php $deposite_amount = 0; @endphp @endforeach @foreach ($mfnSavingsProducts as $mfnSavingsProduct) @foreach ($savingsWithdraw as $savingsWithdrawVaLue) {{-- SAVINGS WITHDRAW --}} @if ($savingsWithdrawVaLue->samityIdFk == $Samity->id and $savingsWithdrawVaLue->primaryProductIdFk == $SamityCompon->id and $mfnSavingsProduct->id == $savingsWithdrawVaLue->productIdFk) @php $withdraw_amount+=1; $withdraw_total+=$savingsWithdrawVaLue->withdraw_amount; $todaysTotalRefund+= $savingsWithdrawVaLue->withdraw_amount; $sub_total_savings_withdraw[$mfnSavingsProduct->id]+= $savingsWithdrawVaLue->withdraw_amount; $final_total_savings_withdraw[$mfnSavingsProduct->id]+= $savingsWithdrawVaLue->withdraw_amount; @endphp @endif @endforeach @if ($withdraw_amount == 0) @endif @php $withdraw_amount = 0; @endphp @endforeach {{--SAVINGS WITHDRAW TOTAL--}} @foreach ($numbere_of_loanee_persons as $numbere_of_loanee_person) {{-- NUMBER OF LOANEE PERSONS --}} @if ($numbere_of_loanee_person->samityIdFk == $Samity->id and $numbere_of_loanee_person->productIdFk == $SamityCompon->id) @php $numbere_of_loanee_person+=1; $sub_total_numbere_of_loanee_person+= $numbere_of_loanee_person->numbere_of_loanee; $final_total_numbere_of_loanee_person+= $numbere_of_loanee_person->numbere_of_loanee; @endphp @endif @endforeach @if ($numbere_of_loanee_person == 0) @endif @foreach ($numbere_of_loan_persons_amounts as $numbere_of_loan_persons_amount) {{-- NUMBER OF LOAN AMOUNT TODAY DISBURSED--}} @if ($numbere_of_loan_persons_amount->samityIdFk == $Samity->id and $numbere_of_loan_persons_amount->productIdFk == $SamityCompon->id) @php $numbere_of_loan_persons_amount+=1; $sub_total_numbere_of_loan_persons_amount+= $numbere_of_loan_persons_amount->loan_amount; $final_total_numbere_of_loan_persons_amount+= $numbere_of_loan_persons_amount->loan_amount;@endphp @endif @endforeach @if ($numbere_of_loan_persons_amount == 0) @endif @foreach ($numbere_of_loan_paid_persons as $numbere_of_loan_paid_person) {{-- NUMBER OF LOAN FULLY PAID TODAY--}} @if ($numbere_of_loan_paid_person->samityIdFk == $Samity->id and $numbere_of_loan_paid_person->productIdFk == $SamityCompon->id) @php $numbere_of_loan_fully_paid_persons+=1; $sub_total_numbere_of_loan_fully_paid_persons+= $numbere_of_loan_paid_person->numbere_of_loan_paid_persons; $final_total_numbere_of_loan_fully_paid_persons+= $numbere_of_loan_paid_person->numbere_of_loan_paid_persons;@endphp @endif @endforeach @if ($numbere_of_loan_fully_paid_persons == 0) @endif @foreach ($numbere_of_loan_paid_persons_amounts as $numbere_of_loan_paid_persons_amount) {{-- LOAN AMOUNT FULLY PAID TODAY--}} @if ($numbere_of_loan_paid_persons_amount->samityIdFk == $Samity->id and $numbere_of_loan_paid_persons_amount->productIdFk == $SamityCompon->id) @php $numbere_of_loan_fully_paid_persons_amount+=1; $sub_total_numbere_of_loan_fully_paid_persons_amount+= $numbere_of_loan_paid_persons_amount->loan_amount; $final_total_numbere_of_loan_fully_paid_persons_amount+= $numbere_of_loan_paid_persons_amount->loan_amount;@endphp @endif @endforeach @if ($numbere_of_loan_fully_paid_persons_amount == 0) @endif @foreach ($loanRecoverable as $loanRecoverableValue) {{-- LOAN RECOVERABLE TODAY--}} @if ($loanRecoverableValue->samityIdFk == $Samity->id and $loanRecoverableValue->productIdFk == $SamityCompon->id) @php $loanRecoverableValues+=1; $dailyRecoverableAmount = $loanRecoverableValue->recoverable_amount; $sub_total_dailyRecoverableAmount+= $loanRecoverableValue->recoverable_amount; $final_total_dailyRecoverableAmount+= $loanRecoverableValue->recoverable_amount;@endphp @endif @endforeach @if ($loanRecoverableValues == 0) @endif @foreach ($regularLoan as $regularLoanValue) {{-- LOAN COLLECTED TODAY--}} @if ($regularLoanValue->samityIdFk == $Samity->id and $regularLoanValue->productIdFk == $SamityCompon->id) @php $regularLoanAmount+=1; $dailyCollectionAmount = $regularLoanValue->amount; $sub_total_dailyCollectionAmount += $regularLoanValue->amount; $final_total_dailyCollectionAmount+= $regularLoanValue->amount; @endphp @endif @endforeach @if ($regularLoanAmount == 0) @endif {{-- GET THE DUE AND ADVANCE AMOUNT --}} @php $dailyDue = $dailyRecoverableAmount - $dailyCollectionAmount; $dailyAdvance = $dailyCollectionAmount - $dailyRecoverableAmount; $dailyRecoverableAmount = 0; $dailyCollectionAmount = 0; @endphp @if ($dailyDue < 0) @php $dailyDue = 0; @endphp @elseif ($dailyAdvance < 0) @php $sub_total_dailyDue+= $dailyDue; $final_total_dailyDue+= $dailyDue; $sub_total_dailyAdvance+= $dailyAdvance; $final_total_dailyAdvance+= $dailyAdvance; $dailyAdvance = 0; @endphp @endif {{-- Loan Due --}} {{-- Loan Advance --}} @php $dailyAdvance = 0; @endphp {{-- Loan Rebate --}} @foreach ($regularLoanPrincipal as $regularLoanPrincipalValue) {{-- LOAN PRINCIPAL AMOUNT COLLECTED TODAY--}} @if ($regularLoanPrincipalValue->samityIdFk == $Samity->id and $regularLoanPrincipalValue->productIdFk == $SamityCompon->id) @php $regularLoanPrincipalAmount+=1; $totalLoanCollection_principal_interest+= $regularLoanPrincipalValue->principalAmount; $sub_total_principalCollectedToday+= $regularLoanPrincipalValue->principalAmount; $final_total_regularLoanPrincipalAmount+ $regularLoanPrincipalValue->principalAmount;@endphp @endif @endforeach @if ($regularLoanPrincipalAmount == 0) @endif @foreach ($regularLoanInterest as $regularLoanInterestlValue) {{-- LOAN INTEREST AMOUNT COLLECTED TODAY--}} @if ($regularLoanInterestlValue->samityIdFk == $Samity->id and $regularLoanInterestlValue->productIdFk == $SamityCompon->id) @php $regularLoanInterestAmount+=1; $totalLoanCollection_principal_interest+= $regularLoanInterestlValue->interestAmount; $sub_total_interestColletedToday+= $regularLoanInterestlValue->interestAmount; $final_total_regularLoanInterestAmount+= $regularLoanInterestlValue->interestAmount;@endphp @endif @endforeach @if ($regularLoanInterestAmount == 0) @endif @php $todaysTotalCollection+= $totalLoanCollection_principal_interest; $totalLoanCollection_principal_interest = 0; @endphp {{-- TODAY'S DUE --}} @php $dailyDue = 0; @endphp @foreach ($insurancePremium as $insurancePremiumValue) {{-- LOAN INSURANCE PREMIUM COLLECTED TODAY--}} @if ($insurancePremiumValue->samityIdFk == $Samity->id and $insurancePremiumValue->productIdFk == $SamityCompon->id) @php $insurancePremiumAmount+=1; $sub_total_insurancePremiumAmount+= $insurancePremiumValue->insurance_amount; @endphp @endif @endforeach @if ($insurancePremiumAmount == 0) @endif @php $aw = $aw + 1; @endphp @php $val = $val + 1; $no_member_found = 0; $no_installment_payer = 0; $no_installment_due = 0; $deposite_total = 0; $withdraw_total = 0; $numbere_of_loanee_person = 0; $numbere_of_loan_persons_amount = 0; $numbere_of_loan_fully_paid_persons = 0; $numbere_of_loan_fully_paid_persons_amount = 0; $loanRecoverableValues = 0; $regularLoanAmount = 0; $regularLoanPrincipalAmount = 0; $regularLoanInterestAmount = 0; $insurancePremiumAmount = 0; $sub_total_todaysTotalCollection+= $todaysTotalCollection; $sub_total_todaysTotalRefund+= $todaysTotalRefund; $final_total_todaysTotalCollection+= $todaysTotalCollection; $final_total_todaysTotalRefund+= $todaysTotalRefund; $todaysTotalCollection = 0; $todaysTotalRefund = 0; @endphp @endif @endforeach @endforeach @endif @php $count = 2; @endphp @endforeach @foreach ($Samities as $Samity) {{-- SAMITY --}} @if ($Samity->fieldOfficerId == $FieldWorker->id) @if ($val1 == $Comp) @endif @foreach ($SamityComponents as $SamityComponent) {{-- PRODUCTS --}} @foreach($SamityComponent as $SamityCompon) @php $SavingsDepositeTotal = 0; @endphp @php $SubTotalSavingsTotalRecoverable1 = 0; @endphp @php $SavingsWithdrawTotal = 0; @endphp @if ($val == 3) @foreach ($totalMembers as $totalMember) {{-- TOTAL MEMBER --}} @if ($totalMember->samityIdFk == $Samity->id and $totalMember->productIdFk == $SamityCompon->id) @php $no_member_found+=1; $sub_total_no_member_found+= $totalMember->numbere_of_member; @endphp @endif @endforeach @foreach ($totalLoanee as $totalLoaneeMember) {{-- TOTAL LOANEE --}} @if ($totalLoaneeMember->samityIdFk == $Samity->id and $totalLoaneeMember->productIdFk == $SamityCompon->id) @php $no_member_found+=1; @endphp @endif @endforeach @if($no_member_found == 0) {{-- check member exist or not --}} @endif @foreach ($installmentPayer as $installmentPayerVaLue) {{-- TOTAL INSTALLMENT PAYER --}} @if ($installmentPayerVaLue->samityIdFk == $Samity->id and $installmentPayerVaLue->productIdFk == $SamityCompon->id) @php $no_installment_payer+=1; $sub_total_no_installment_payer+= $installmentPayerVaLue->numbere_of_installment_payer; @endphp @endif @endforeach @if($no_installment_payer == 0) {{-- check installment payer exist or not --}} @endif @foreach ($installmentDue as $installmentDueVaLue) {{-- TOTAL INSTALLMENT DUE --}} @if ($installmentDueVaLue->samityIdFk == $Samity->id and $installmentDueVaLue->productIdFk == $SamityCompon->id) @php $no_installment_due+=1; $sub_total_no_installment_due+= $installmentDueVaLue->numbere_of_installment_due; @endphp @endif @endforeach @if($no_installment_due == 0) {{-- check installment due exist or not --}} @endif @if($SavingsRecoverable == 2) {{--SAVINGS RECOVERABLE--}} {{-- @foreach ($mfnSavingsProducts as $mfnSavingsProduct) @endforeach --}} @foreach ($mfnSavingsProducts as $mfnSavingsProduct) @foreach ($savingsRecoverableValues as $savingsRecoverableValue) {{-- SAVINGS RECOVERABLE --}} @if ($savingsRecoverableValue->samityIdFk == $Samity->id and $savingsRecoverableValue->primaryProductIdFk == $SamityCompon->id and $mfnSavingsProduct->id == $savingsRecoverableValue->productIdFk) @php $recoverable_amount+=1; $recoverable_total+=$savingsRecoverableValue->recoverable_amount; $sub_total_savings_recoverable[$mfnSavingsProduct->id]+= $savingsRecoverableValue->recoverable_amount; $final_total_savings_recoverable[$mfnSavingsProduct->id]+= $savingsRecoverableValue->recoverable_amount; @endphp @endif @endforeach @if ($recoverable_amount == 0) @endif @php $recoverable_amount = 0; @endphp @endforeach @php $recoverable_total = 0; @endphp @endif @foreach ($mfnSavingsProducts as $mfnSavingsProduct) @foreach ($savingsDeposite as $savingsDepositeVaLue) {{-- SAVINGS DEPOSITE --}} @if ($savingsDepositeVaLue->samityIdFk == $Samity->id and $savingsDepositeVaLue->primaryProductIdFk == $SamityCompon->id and $mfnSavingsProduct->id == $savingsDepositeVaLue->productIdFk) @php $deposite_amount+=1; $deposite_total+=$savingsDepositeVaLue->deposite_amount; $todaysTotalCollection+= $savingsDepositeVaLue->deposite_amount; $sub_total_savings_deposite[$mfnSavingsProduct->id]+= $savingsDepositeVaLue->deposite_amount; $final_total_savings_deposite[$mfnSavingsProduct->id]+= $savingsDepositeVaLue->deposite_amount; @endphp @endif @endforeach @if ($deposite_amount == 0) @endif @php $deposite_amount = 0; @endphp @endforeach {{--SAVINGS DEPOSITE TOTAL--}} @foreach ($mfnSavingsProducts as $mfnSavingsProduct) @foreach ($savingsWithdraw as $savingsWithdrawVaLue) {{-- SAVINGS WITHDRAW --}} @if ($savingsWithdrawVaLue->samityIdFk == $Samity->id and $savingsWithdrawVaLue->primaryProductIdFk == $SamityCompon->id and $mfnSavingsProduct->id == $savingsWithdrawVaLue->productIdFk) @php $withdraw_amount+=1; $withdraw_total+=$savingsWithdrawVaLue->withdraw_amount; $sub_total_savings_withdraw[$mfnSavingsProduct->id]+= $savingsWithdrawVaLue->withdraw_amount; $final_total_savings_withdraw[$mfnSavingsProduct->id]+= $savingsWithdrawVaLue->withdraw_amount; @endphp @endif @endforeach @if ($withdraw_amount == 0) @endif @php $withdraw_amount = 0; @endphp @endforeach {{--SAVINGS WITHDRAW TOTAL--}} @foreach ($numbere_of_loanee_persons as $numbere_of_loanee_person) {{-- NUMBER OF LOANEE PERSONS TODAY DISBURSED--}} @if ($numbere_of_loanee_person->samityIdFk == $Samity->id and $numbere_of_loanee_person->productIdFk == $SamityCompon->id) @php $numbere_of_loanee_person+=1; $todaysTotalRefund+=$numbere_of_loanee_person->numbere_of_loanee; $sub_total_numbere_of_loanee_person+= $numbere_of_loanee_person->numbere_of_loanee; $final_total_numbere_of_loanee_person+= $numbere_of_loanee_person->numbere_of_loanee;@endphp @endif @endforeach @if ($numbere_of_loanee_person == 0) @endif @foreach ($numbere_of_loan_persons_amounts as $numbere_of_loan_persons_amount) {{-- NUMBER OF LOAN AMOUNT TODAY DISBURSED--}} @if ($numbere_of_loan_persons_amount->samityIdFk == $Samity->id and $numbere_of_loan_persons_amount->productIdFk == $SamityCompon->id) @php $numbere_of_loan_persons_amount+=1; $sub_total_numbere_of_loan_persons_amount+= $numbere_of_loan_persons_amount->loan_amount; $final_total_numbere_of_loan_persons_amount+= $numbere_of_loan_persons_amount->loan_amount;@endphp @endif @endforeach @if ($numbere_of_loan_persons_amount == 0) @endif @foreach ($numbere_of_loan_paid_persons as $numbere_of_loan_paid_person) {{-- NUMBER OF LOAN FULLY PAID TODAY--}} @if ($numbere_of_loan_paid_person->samityIdFk == $Samity->id and $numbere_of_loan_paid_person->productIdFk == $SamityCompon->id) @php $numbere_of_loan_fully_paid_persons+=1; $sub_total_numbere_of_loan_fully_paid_persons+= $numbere_of_loan_paid_person->numbere_of_loan_paid_persons; $final_total_numbere_of_loan_fully_paid_persons+= $numbere_of_loan_paid_person->numbere_of_loan_paid_persons;@endphp @endif @endforeach @if ($numbere_of_loan_fully_paid_persons == 0) @endif @foreach ($numbere_of_loan_paid_persons_amounts as $numbere_of_loan_paid_persons_amount) {{-- LOAN AMOUNT FULLY PAID TODAY--}} @if ($numbere_of_loan_paid_persons_amount->samityIdFk == $Samity->id and $numbere_of_loan_paid_persons_amount->productIdFk == $SamityCompon->id) @php $numbere_of_loan_fully_paid_persons_amount+=1; $sub_total_numbere_of_loan_fully_paid_persons_amount+= $numbere_of_loan_paid_persons_amount->loan_amount; $final_total_numbere_of_loan_fully_paid_persons_amount+= $numbere_of_loan_paid_persons_amount->loan_amount;@endphp @endif @endforeach @if ($numbere_of_loan_fully_paid_persons_amount == 0) @endif @foreach ($loanRecoverable as $loanRecoverableValue) {{-- LOAN RECOVERABLE TODAY--}} @if ($loanRecoverableValue->samityIdFk == $Samity->id and $loanRecoverableValue->productIdFk == $SamityCompon->id) @php $loanRecoverableValues+=1; $dailyRecoverableAmount = $loanRecoverableValue->recoverable_amount; $sub_total_dailyRecoverableAmount+= $loanRecoverableValue->recoverable_amount; $final_total_dailyRecoverableAmount+= $loanRecoverableValue->recoverable_amount;@endphp @endif @endforeach @if ($loanRecoverableValues == 0) @endif @foreach ($regularLoan as $regularLoanValue) {{-- LOAN COLLECTED TODAY--}} @if ($regularLoanValue->samityIdFk == $Samity->id and $regularLoanValue->productIdFk == $SamityCompon->id) @php $regularLoanAmount+=1; $dailyCollectionAmount = $regularLoanValue->amount; $sub_total_dailyCollectionAmount += $regularLoanValue->amount; $final_total_dailyCollectionAmount+= $regularLoanValue->amount; @endphp @endif @endforeach @if ($regularLoanAmount == 0) @endif {{-- GET THE DUE AND ADVANCE AMOUNT --}} @php $dailyDue = $dailyRecoverableAmount - $dailyCollectionAmount; $dailyAdvance = $dailyCollectionAmount - $dailyRecoverableAmount; $dailyRecoverableAmount = 0; $dailyCollectionAmount = 0; @endphp @if ($dailyDue < 0) @php $dailyDue = 0; @endphp @elseif ($dailyAdvance < 0) @php $dailyAdvance = 0; @endphp @endif {{-- Loan Due --}} {{-- Loan Advance --}} @php $sub_total_dailyDue+= $dailyDue; $final_total_dailyDue+= $dailyDue; $sub_total_dailyAdvance+= $dailyAdvance; $final_total_dailyAdvance+= $dailyAdvance; $dailyAdvance = 0; @endphp {{-- Loan Rebate --}} @foreach ($regularLoanPrincipal as $regularLoanPrincipalValue) {{-- LOAN PRINCIPAL AMOUNT COLLECTED TODAY--}} @if ($regularLoanPrincipalValue->samityIdFk == $Samity->id and $regularLoanPrincipalValue->productIdFk == $SamityCompon->id) @php $regularLoanPrincipalAmount+=1; $totalLoanCollection_principal_interest+= $regularLoanPrincipalValue->principalAmount; $sub_total_principalCollectedToday+= $regularLoanPrincipalValue->principalAmount; $final_total_regularLoanPrincipalAmount+ $regularLoanPrincipalValue->principalAmount;@endphp @endif @endforeach @if ($regularLoanPrincipalAmount == 0) @endif @foreach ($regularLoanInterest as $regularLoanInterestlValue) {{-- LOAN INTEREST AMOUNT COLLECTED TODAY--}} @if ($regularLoanInterestlValue->samityIdFk == $Samity->id and $regularLoanInterestlValue->productIdFk == $SamityCompon->id) @php $regularLoanInterestAmount+=1; $totalLoanCollection_principal_interest+= $regularLoanInterestlValue->interestAmount; $sub_total_interestColletedToday+= $regularLoanInterestlValue->interestAmount; $final_total_regularLoanInterestAmount+= $regularLoanInterestlValue->interestAmount;@endphp @endif @endforeach @if ($regularLoanInterestAmount == 0) @endif @php $todaysTotalCollection+= $totalLoanCollection_principal_interest; $totalLoanCollection_principal_interest = 0; @endphp {{-- TODAY'S DUE --}} @php $dailyDue = 0; @endphp @foreach ($insurancePremium as $insurancePremiumValue) {{-- LOAN INSURANCE PREMIUM COLLECTED TODAY--}} @if ($insurancePremiumValue->samityIdFk == $Samity->id and $insurancePremiumValue->productIdFk == $SamityCompon->id) @php $insurancePremiumAmount+=1; $sub_total_insurancePremiumAmount+= $insurancePremiumValue->insurance_amount; @endphp @endif @endforeach @if ($insurancePremiumAmount == 0) @endif @endif @php $val = 3; if ($val1 < $Comp) { $val1 = $val1 + 1; } $no_member_found = 0; $no_installment_payer = 0; $no_installment_due = 0; $deposite_total = 0; $withdraw_total = 0; $numbere_of_loanee_person = 0; $numbere_of_loan_persons_amount = 0; $numbere_of_loan_fully_paid_persons = 0; $numbere_of_loan_fully_paid_persons_amount = 0; $loanRecoverableValues = 0; $regularLoanAmount = 0; $regularLoanPrincipalAmount = 0; $regularLoanInterestAmount = 0; $insurancePremiumAmount = 0; $sub_total_todaysTotalCollection+= $todaysTotalCollection; $sub_total_todaysTotalRefund+= $todaysTotalRefund; $final_total_todaysTotalCollection+= $todaysTotalCollection; $final_total_todaysTotalRefund+= $todaysTotalRefund; $todaysTotalCollection = 0; $todaysTotalRefund = 0; @endphp @endforeach @endforeach @endif @endforeach @php $subCount = 0; @endphp @foreach ($sub_total_savings_recoverable as $sub_total_savings_recoverable_value) @php $sub_total_savings_recoverable_total+= $sub_total_savings_recoverable_value; $final_total_savings_recoverable_total+= $sub_total_savings_recoverable_value; @endphp @endforeach @foreach ($sub_total_savings_deposite as $sub_total_savings_deposite_value) @php $sub_total_savings_deposite_total+= $sub_total_savings_deposite_value; $final_total_savings_deposite_total+= $sub_total_savings_deposite_value; @endphp @endforeach @foreach ($sub_total_savings_withdraw as $sub_total_savings_withdraw_value) @php $sub_total_savings_withdraw_total+= $sub_total_savings_withdraw_value; $final_total_savings_withdraw_total+= $sub_total_savings_withdraw_value; @endphp @endforeach {{-- Loan Rebate --}} @php $final_total_no_member_found+= $sub_total_no_member_found; $final_total_no_installment_payer+= $sub_total_no_installment_payer; $final_total_no_installment_due+= $sub_total_no_installment_due; $sub_total_no_member_found = 0; $sub_total_no_installment_payer = 0; $sub_total_no_installment_due = 0; $sub_total_savings_recoverable_total = 0; $sub_total_savings_deposite_total = 0; $sub_total_savings_withdraw_total = 0; $sub_total_numbere_of_loanee_person = 0; $sub_total_numbere_of_loan_persons_amount = 0; $sub_total_numbere_of_loan_fully_paid_persons = 0; $sub_total_numbere_of_loan_fully_paid_persons_amount = 0; $sub_total_dailyRecoverableAmount = 0; $sub_total_dailyCollectionAmount = 0; $sub_total_dailyDue = 0; $sub_total_dailyAdvance = 0; $final_total_totalLoanCollection_principal_interest+= ($sub_total_principalCollectedToday + $sub_total_interestColletedToday); $sub_total_principalCollectedToday = 0; $sub_total_interestColletedToday = 0; $final_total_insurancePremiumAmount+= $sub_total_insurancePremiumAmount; $sub_total_insurancePremiumAmount = 0; $sub_total_todaysTotalCollection = 0; $sub_total_todaysTotalRefund = 0; @endphp @foreach ($mfnSavingsProducts as $mfnSavingsProduct) @php $sub_total_savings_recoverable[$mfnSavingsProduct->id] = 0; $sub_total_savings_deposite[$mfnSavingsProduct->id] = 0; $sub_total_savings_withdraw[$mfnSavingsProduct->id] = 0; @endphp @endforeach @endforeach @endforeach @foreach ($final_total_savings_recoverable as $final_total_savings_recoverable_value) @endforeach @foreach ($final_total_savings_deposite as $final_total_savings_deposite_value) @endforeach @foreach ($final_total_savings_withdraw as $final_total_savings_withdraw_value) @endforeach {{-- Loan Rebate --}} @endif
Field Worker
Samity
Component
Total Members
Total Loanee
Total No.Install. Payer
Total No.Install. Due
Savings Recoverable
Savings Deposit
Savings Refund
Loan Disbursement
Fully Payment Loan
Additional Fee Collection
Loan Recoverable
Loan Collection
Today's Due
Insurance Premium
Today's Total Collection
Today's Total Refund
Today's Total Net Collection
Field Worker ID
Field Worker Name
Samity ID
Samity Name
{{$mfnSavingsProduct->shortName}}
Total
{{$mfnSavingsProduct->shortName}}
Total
{{$mfnSavingsProduct->shortName}}
Total
NO. of Person
Amount
NO. of Person
Amount
Regular Loan
Loan Due
Loan Advance
Loan Rebate
Loan Received (Pri.)
Service Charge
Total (P+I)
{{ $FieldWorker->emp_id }} {{ $FieldWorker->emp_name_english }}{{ $Samity->code }} {{ $Samity->name }}{{$SamityCompon->shortName}} {{$totalMember->numbere_of_member}}{{$totalLoaneeMember->numbere_of_loanee}}0 0{{$installmentPayerVaLue->numbere_of_installment_payer}}0{{$installmentDueVaLue->numbere_of_installment_due}}00.00{{number_format($savingsRecoverableValue->recoverable_amount, 2)}}0.00{{number_format($recoverable_total, 2)}}{{number_format($savingsDepositeVaLue->deposite_amount, 2)}}0.00{{number_format($deposite_total, 2)}}{{number_format($savingsWithdrawVaLue->withdraw_amount, 2)}}0.00{{number_format($withdraw_total, 2)}}{{$numbere_of_loanee_person->numbere_of_loanee}}0{{number_format($numbere_of_loan_persons_amount->loan_amount, 2)}}0.00{{$numbere_of_loan_paid_person->numbere_of_loan_paid_persons}}0{{number_format($numbere_of_loan_paid_persons_amount->loan_amount, 2)}}0.00{{number_format($loanRecoverableValue->recoverable_amount, 2)}}0.00{{number_format($regularLoanValue->amount, 2)}}0.00 {{ number_format($dailyDue, 2) }} {{ number_format($dailyAdvance, 2) }} 0.00{{number_format($regularLoanPrincipalValue->principalAmount, 2)}}0.00{{number_format($regularLoanInterestlValue->interestAmount, 2)}}0.00{{ number_format($totalLoanCollection_principal_interest, 2) }}{{ number_format($dailyDue, 2) }}{{number_format($insurancePremiumValue->insurance_amount, 2)}}0.00 {{number_format($todaysTotalCollection, 2)}} {{number_format($todaysTotalRefund, 2)}} {{number_format($todaysTotalCollection - $todaysTotalRefund, 2)}}
{{ $Samity->code }} {{ $Samity->name }}{{$SamityCompon->shortName}} {{$totalMember->numbere_of_member}}{{$totalLoaneeMember->numbere_of_loanee}}0 0{{$installmentPayerVaLue->numbere_of_installment_payer}}0{{$installmentDueVaLue->numbere_of_installment_due}}00.00{{number_format($savingsRecoverableValue->recoverable_amount, 2)}}0.00{{number_format($recoverable_total, 2)}}{{number_format($savingsDepositeVaLue->deposite_amount, 2)}}0.00{{number_format($deposite_total, 2)}}{{number_format($savingsWithdrawVaLue->withdraw_amount, 2)}}0.00{{number_format($withdraw_total, 2)}}{{$numbere_of_loanee_person->numbere_of_loanee}}0{{number_format($numbere_of_loan_persons_amount->loan_amount, 2)}}0.00{{$numbere_of_loan_paid_person->numbere_of_loan_paid_persons}}0{{number_format($numbere_of_loan_paid_persons_amount->loan_amount, 2)}}0.00{{number_format($loanRecoverableValue->recoverable_amount, 2)}}0.00{{number_format($regularLoanValue->amount, 2)}}0.00 {{ number_format($dailyDue, 2) }} {{ number_format($dailyAdvance, 2) }} 0.00{{number_format($regularLoanPrincipalValue->principalAmount, 2)}}0.00{{number_format($regularLoanInterestlValue->interestAmount, 2)}}0.00{{ number_format($totalLoanCollection_principal_interest, 2) }}{{ number_format($dailyDue, 2) }}{{number_format($insurancePremiumValue->insurance_amount, 2)}}0.00 {{ number_format($todaysTotalCollection, 2) }} {{ number_format($todaysTotalRefund, 2) }} {{number_format($todaysTotalCollection - $todaysTotalRefund, 2)}}
Sub Total {{$sub_total_no_member_found}} {{$sub_total_no_member_found}} {{$sub_total_no_installment_payer}} {{$sub_total_no_installment_due}}{{number_format($sub_total_savings_recoverable_value, 2)}} {{ number_format($sub_total_savings_recoverable_total, 2) }} {{number_format($sub_total_savings_deposite_value, 2)}} {{ number_format($sub_total_savings_deposite_total, 2) }} {{number_format($sub_total_savings_withdraw_value, 2)}} {{ number_format($sub_total_savings_withdraw_total, 2) }} {{ $sub_total_numbere_of_loanee_person }} {{ number_format($sub_total_numbere_of_loan_persons_amount, 2) }} {{ $sub_total_numbere_of_loan_fully_paid_persons }} {{ number_format($sub_total_numbere_of_loan_fully_paid_persons_amount, 2) }} {{ number_format($sub_total_dailyRecoverableAmount, 2) }} {{ number_format($sub_total_dailyCollectionAmount, 2) }} {{ number_format($sub_total_dailyDue, 2) }} {{ number_format($sub_total_dailyAdvance, 2) }} 0.00 {{ number_format($sub_total_principalCollectedToday, 2) }} {{ number_format($sub_total_interestColletedToday, 2) }} {{ number_format($sub_total_principalCollectedToday + $sub_total_interestColletedToday, 2) }} {{ number_format($sub_total_dailyDue, 2) }} {{ number_format($sub_total_insurancePremiumAmount, 2) }} {{ number_format($sub_total_todaysTotalCollection, 2) }} {{ number_format($sub_total_todaysTotalRefund, 2) }} {{ number_format($sub_total_todaysTotalCollection - $sub_total_todaysTotalRefund, 2) }}
Total {{ $final_total_no_member_found }} {{ $final_total_no_member_found }} {{ $final_total_no_installment_payer }} {{ $final_total_no_installment_due }} {{number_format($final_total_savings_recoverable_value, 2)}} {{ number_format($final_total_savings_recoverable_total, 2) }} {{number_format($final_total_savings_deposite_value, 2)}} {{ number_format($final_total_savings_deposite_total, 2) }} {{number_format($final_total_savings_withdraw_value, 2)}} {{ number_format($final_total_savings_withdraw_total, 2) }} {{ $final_total_numbere_of_loanee_person }} {{ number_format($final_total_numbere_of_loan_persons_amount, 2) }} {{ $final_total_numbere_of_loan_fully_paid_persons }} {{ number_format($final_total_numbere_of_loan_fully_paid_persons_amount, 2) }} {{ number_format($final_total_loanRecoverableValues, 2) }} {{ number_format($final_total_dailyCollectionAmount, 2) }} {{ number_format($final_total_dailyDue, 2) }} {{ number_format($final_total_dailyAdvance, 2) }} 0.00 {{ number_format($final_total_principalCollectedToday, 2) }} {{ number_format($final_total_interestColletedToday, 2) }} {{ number_format($final_total_totalLoanCollection_principal_interest, 2) }} {{ number_format($final_total_dailyDue, 2) }} {{ number_format($final_total_insurancePremiumAmount, 2) }} {{ number_format($final_total_todaysTotalCollection, 2) }} {{ number_format($final_total_todaysTotalRefund, 2) }} {{ number_format($final_total_todaysTotalCollection - $final_total_todaysTotalRefund, 2) }}
{{--
--}}
Prepared By :
Signature :
Designation :
Verified By :
Signature :
Designation :
Approved By :
Signature :
Designation: :