@extends('layouts.app') @section('title', __('Register')) @section('content')
@include('layouts.leftside-menubar')
@include('components.pages-bar',['pageTitle' =>''. trans('Manage Accounts').' / '.trans('Money Receipt').'']) @include('components.sectionbar.accounts-bar')
{!! Form::open(array('route' => 'accounts.moneyreceipt', 'method' => 'POST', 'role' =>'form','enctype'=>'multipart/form-data', 'class' => 'needs-validation')) !!}
{!! Form::text('date', $date ?? date('d-m-Y'), array('id' => 'date', 'class' => 'form-control datepicker','autocomplete' => 'off', "onchange='myFunction(this)'")) !!} @error('date') {{ trans($message) }} @enderror
{{-- --}} {!! Form::text('studentId', ($student_code?? $_GET['studentId'] ?? null), array('id' => 'studentId', 'required', 'class' => 'form-control','autocomplete' => 'off')) !!} @error('studentId') {{ $message }} @enderror
{!! Form::close() !!}
@isset($dues) @if ($dues->count())
@foreach($dues as $due)
@lang('Student Name') : {{$due->name}}
@lang('Student Id') : {{$due->student_code}}
@lang('Class') : {{ \App\Myclass::findOrFail($due->class_id)->name }}
@lang('Section') : {{\App\Section::findOrFail($due->section_id)->section_number}}
@break($loop->first) @endforeach
{!! Form::open(['route' => ['accounts.moneyreceived',$student_code], 'method' => 'post','id'=>'moneyreceivedForm']) !!} {!! Form::hidden('date', $date ?? date('d-m-Y'), array( 'id'=>'serdate' ,'class' => 'form-control','autocomplete' => 'off')) !!} @error('date') {{ trans($message) }} @enderror @php $total = 0; @endphp @foreach($dues->sortBy('created_at') as $due) @php $total += $due->due; @endphp @endforeach
@lang('Created Date') @lang('Sector Name') @lang('Payable Amount') @lang('Paid Amount') @lang('Waiver')
{{date("F d, Y",strtotime($due->created_at))}} {{$due->account_sectors}} {{$due->due}} {!! Form::number('amount[]', $due->due, ['class' => 'form-control removeDisable width-100 ','id'=>'amount'.$due->id,'disabled'=>'true','oninput'=>'total()', 'max' => $due->due]) !!}
{!! Form::number('waiver[]', 0, ['class' => 'form-control vnull removeDisable width-100','id'=>'waiver'.$due->id,'oninput'=>'total()','disabled'=>'true', 'max' => $due->due]) !!}
@lang('Total Amount') {{number_format($total,2)}}
@lang('Received Amount') 0
@lang('Notes')
@lang('Ledger') @error('ledger_id') {{ $message }} @enderror
{!! Form::button(trans('Submit'), ['class' => btnClass(),'onclick'=>'confirmSubmit()']) !!}
{!! Form::close() !!}
@else @lang('No Related Data Found.') @endif @endisset
@endsection