@extends('layouts.dashboard') @section('Title') {{ __('Loan Calculator') . ' ( ' .str_to_upper(Request()->segments()[count(Request()->segments())-1]) . ' )'}} @endsection @section('css') @endsection @section('content') @if(isset($storeByAjax) && $storeByAjax) @endif @if(isset($triggerClick)) @endif
@if(Session::has('success'))
@endif
{{ csrf_field() }}
@if($type =='fixed')
*
@if ($errors->has('installment_interval'))
{{ $errors->first('fixed_loan_type') }}
@endif
@endif
date ) value="{{\Carbon\Carbon::make($longTermFunding->date)->format('Y-m-d')}}" readonly @elseif(Request()->has('date')) value="{{\Carbon\Carbon::make(Request()->get('date'))->format('Y-m-d')}}" readonly @endif required type="date" id="start-date" name="start_date" class="form-control number interval-calcs" placeholder="{{__('Loan Start Date')}} {{__('Autoload')}} .." />
@if(isset($longTermFunding)) @elseif(Request()->has('financial_id')) @endif
long_term_banking_facility_amount) value="{{$longTermFunding->long_term_banking_facility_amount}}" readonly @elseif(Request()->has('current_amount')) value="{{ Request()->get('current_amount') }}" readonly @else value="{{ @old('loan_amount') }}" @endif type="number" step="any" id="loan_amount" name="loan_amount" class="form-control number" placeholder="{{__('Loan Amount')}} .." required /> @if ($errors->has('loan_amount'))
{{ $errors->first('loan_amount') }}
@endif
@if($type == 'fixed')
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
@if($type =='fixed')
*
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
@endif @endif
@if($type != 'fixed')
borrowing_rate) value="{{$loan->borrowing_rate ?: old('borrowing_rate') }}" @else value="{{ @old('borrowing_rate') }}" @endif type="number" step="any" id="borrowing_rate" name="borrowing_rate" class="form-control number" placeholder="{{__('Borrowing Rate')}} .." /> @if ($errors->has('borrowing_rate'))
{{ $errors->first('borrowing_rate') }}
@endif
margin_interest) value="{{$loan->margin_interest ?: old('margin_interest') }}" @else value="{{ @old('margin_interest') }}" @endif type="number" step="any" id="margin_interest" name="margin_interest" class="form-control number" placeholder="{{__('Interest Margin')}} .." /> @if ($errors->has('margin_interest'))
{{ $errors->first('margin_interest') }}
@endif
loan_interest) value="{{$loan->loan_interest ?: old('loan_interest') }}" @else value="{{ @old('loan_interest') }}" @endif type="text" step="any" id="loan_interest" name="loan_interest" class="form-control number" placeholder="{{__('Loan Interest')}}.." disabled />
min_interest) value="{{$loan->min_interest ?: old('min_interest') }}" @else value="{{ @old('min_interest') }}" @endif type="number" step="any" id="min_interest" name="min_interest" value="{{ @old('min_interest') }}" class="form-control number" placeholder="{{__('Min Interest')}} .." /> @if ($errors->has('min_interest'))
{{ $errors->first('min_interest') }}
@endif
@endif @if($type !='fixed')
{{--

{{@old('loan_type') == 'variable'? 'Variable Installment' : 'Fixed Installment'}}

--}}
repayment_duration) value="{{$loan->repayment_duration ?: old('repayment_duration') }}" @else value="{{ @old('repayment_duration') }}" @endif type="number" step="any" max="600" id="repayment_duration" name="repayment_duration" value="{{ @old('repayment_duration') }}" class="form-control number max-tenor-limit" placeholder="{{__('Duration')}} .." /> @if ($errors->has('repayment_duration'))
{{ $errors->first('repayment_duration') }}
@endif
@if ($errors->has('grace_period'))
{{ $errors->first('grace_period') }}
@endif
@if ($errors->has('installment_interval'))
{{ $errors->first('installment_interval') }}
@endif
@if ($errors->has('interest_interval'))
{{ $errors->first('interest_interval') }}
@endif
@endif @push('js') {{-- --}} @endpush
@if(isset($longTermFunding->financial_id)) @endif
{{--
--}}
@endsection @section('js') {{-- salah --}} @if($type == 'fixed' ) @if(isset($triggerClick)) @endif @endif @endsection {{-- {{ dd('e') }} --}}