@extends('layouts.master') @section('title', 'Receive-Payment') @section('page-header') Receive-Payment @stop @push('style') @endpush @section('content')
@include('partials._alert_message') @php $from = request('from', date('Y-m-d')); $to = request('to', date('Y-m-d')); @endphp

@yield('page-header')

{{-- @include('includes.input-groups.date-field', ['date' => $from, 'is_read_only' => true])--}} {{-- OLD CODE --}} {{-- @include('includes.input-groups.date-range', ['date' => $from, 'is_read_only' => true])--}} {{-- New CODE --}} @php $date1 = isset($from) ? $from : ''; $date2 = isset($to) ? $to : ''; $isReadOnly = isset($is_read_only) ? $is_read_only : false; @endphp
Date

Receive-Payment Report

@if(request('to') && request('from'))

From : {{ fdate(request('from'), 'd/m/Y') }}

To : {{ fdate(request('to'), 'd/m/Y') }}

@elseif(fdate(request('to') ?? today(), 'd/m/Y'))

As On {{ fdate(request('to') ?? today(), 'd/m/Y') }}

@endif
@php $totalPayments = 0; $totalReceive = 0; $opening_balance = 0; $closing_balance = 0; @endphp @foreach($accountGroups as $group) @foreach($group->accountControls as $control) @foreach($control->accountSubsidiaries as $subsidiary) @foreach($subsidiary->accounts as $bank_balance) @php $opening_balance += ($bank_balance->payments - $bank_balance->receive); @endphp @endforeach @endforeach @endforeach @endforeach @foreach($accountGroups as $group) @foreach($group->accountControls as $control) @foreach($control->accountSubsidiaries as $subsidiary) @foreach($subsidiary->accounts->whereNotIn('account_subsidiary_id',112) as $account) @php $totalPayments += $account->payments; $totalReceive += $account->receive; @endphp @if($account->payments > 0 || $account->receive > 0) @endif @endforeach @endforeach @endforeach @endforeach
Account Name Receive Payments
Opening cashInHand: 0.00
Opening cashAtBank: {{number_format($opening_balance + $previous_accountGroups,2)}}
{{ $account->name }} {{ number_format($account->receive, 2) }} {{ number_format($account->payments, 2) }}
Closing CashInHand: 0.00
Closing CashInBank: {{number_format(($closing_balance = $totalReceive + $opening_balance + $previous_accountGroups - $totalPayments),2) }}
Total {{ number_format($totalReceive + $opening_balance + $previous_accountGroups, 2) }} {{ number_format($totalPayments + $closing_balance, 2) }}

@endsection @section('js') @endsection