@extends('layouts.dashboard') @section('Title') {{ __('Loan Calculator') . ' ( ' .str_to_upper(Request()->segments()[count(Request()->segments())-1]) . ' )'}} @endsection @section('css') @endsection @section('content')
@if(Session::has('success'))
@endif
{{ csrf_field() }}
*
@if ($errors->has('installment_interval'))
{{ $errors->first('fixed_loan_type') }}
@endif
{{--
--}}
@if(isset($longTermFunding)) @elseif(Request()->has('financial_id')) @endif
@if ($errors->has('loan_amount'))
{{ $errors->first('loan_amount') }}
@endif
base_rate) value="{{$loan->base_rate ?: old('base_rate')}}" @endif type="number" step="any" id="base_rate" name="base_rate" class="form-control number pricing-calc-item" placeholder="{{__('Base Rate')}} .." required /> @if ($errors->has('base_rate'))
{{ $errors->first('base_rate') }}
@endif
margin_rate) value="{{$loan->margin_rate ?: old('margin_rate') }}" @endif type="number" step="any" id="margin_rate" name="margin_rate" class="form-control number pricing-calc-item" placeholder="{{__('Margin Rate')}} .." required /> @if ($errors->has('margin_rate'))
{{ $errors->first('margin_rate') }}
@endif
pricing) value="{{$loan->pricing ?: old('pricing') }}" @else value="{{ @old('pricing') }}" @endif disabled type="number" step="any" min="0" id="pricing" name="pricing" class="form-control number pricing-calc-item" placeholder="{{__('Pricing')}} .." required /> @if ($errors->has('pricing'))
{{ $errors->first('pricing') }}
@endif
*
duration) value="{{$loan->duration ?: old('duration') }}" @else value="{{ @old('duration') }}" @endif type="number" step="1" min="1" max="600" id="duration" name="duration" class="form-control number grace-period-class grace_period_calc max-tenor-limit installment_condition" placeholder="{{__('Duration In Months')}} .." required /> @if ($errors->has('duration'))
{{ $errors->first('duration') }}
@endif
*
@if ($errors->has('installment_interval'))
{{ $errors->first('installment_interval') }}
@endif
{{-- --}}
@if(isset($fixedAtEndResult) && count($fixedAtEndResult)) @php $index = 1 ; @endphp @foreach($loanDates as $date ) @php $index++; @endphp @endforeach
{{__("Payment No.")}} {{__("Date")}} {{__("Begining Balance")}} {{__("Schedule Payment")}} {{__("Interest Amount")}} {{__("Principle Amount")}} {{__("End Balance")}}
{{ $index }} {{ $date }} {{ number_format($fixedAtEndResult['beginning'][$date] ?? 0) }} {{ number_format($fixedAtEndResult['schedulePayment'][$date] ?? 0) }} {{ number_format($fixedAtEndResult['interestAmount'][$date] ?? 0) }} {{ number_format($fixedAtEndResult['principleAmount'][$date] ?? 0) }} {{ number_format($fixedAtEndResult['endBalance'][$date] ?? 0) }}
{{ __('Total') }} - - - {{ number_format($fixedAtEndResult['totals']['totalSchedulePayment'] ?? 0) }} {{ number_format($fixedAtEndResult['totals']['totalPrincipleAmount'] ?? 0 )}} {{ number_format($fixedAtEndResult['totals']['totalInterestAmount'] ?? 0) }}
@endif
@endsection @section('js') {{-- salah --}} @endsection