@extends('layouts.vertical', ['withLoader' => true]) @php $billingCycle = config('constant.billingCycle'); $is_update = false; if(isset($setup->record) && !empty($setup->record)) { $is_update = true; } $session_hourly_rate = 0; @endphp @section('css') @endsection @section('breadcrumb')

{{ $is_update ? 'Update funded hours' : 'Setup funded hours' }}

@endsection @section('content')
@csrf @if($is_update) @endif
child
{{$setup->child->name}}
@if (!$is_update) This child has an active billing type: @else Billing type: @endif @if($setup->subscription->type == "b7") Subscription package @elseif($setup->subscription->type == "b8") {{ isset($setup->subscription->useSession) && $setup->subscription->useSession == true ? 'Session rates' : 'Attendance hours' }} @elseif($setup->subscription->type == "b9") Daily @endif

Billing period: {{\Carbon\Carbon::parse($setup->subscription->billStartDate)->format('d/m/Y')}} to {{\Carbon\Carbon::parse($setup->subscription->billEndDate)->format('d/m/Y')}} ({{isset($billingCycle[$setup->subscription->billCycle]) ? $billingCycle[$setup->subscription->billCycle] : '-'}})

@if($setup->subscription->type == "b8")

Create funding scheme for

record->sessions) || (isset($setup->record->sessions) && empty($setup->record->sessions))) ? 'checked' : '' }}>
record->sessions) && !empty($setup->record->sessions) ? 'checked' : '' }}>

{{ $is_update ? 'Update' : 'Add' }} funding scheme details

hours/week
@if (!$is_update || ($is_update && isset($setup->record->sessions) && !empty($setup->record->sessions)))

Select sessions

Select the session that you wish to apply funding to

@if(isset($setup->sessions) && !empty($setup->sessions)) @foreach($setup->sessions as $session) @php $fromTime = $toTime = ""; $totalMinutes = ($session->toTime - $session->fromTime); if($totalMinutes <= 0 ) { $totalMinutes = 1; } $amount = round((60 * $session->amount / ceil($totalMinutes)), 2); if(isset($session->fromTime)){ $fromTime = Helper::getTimeFromMinute($session->fromTime); } if(isset($session->toTime)){ $toTime = Helper::getTimeFromMinute($session->toTime); } $is_show = 0; $str = "This session is already assigned to another funding scheme (:fromDate to :toDate)"; $str1 = ""; if(isset($session->selected) && $session->selected) { $session_hourly_rate = $amount; } @endphp @if(isset($session->otherSchemes) && !empty($session->otherSchemes)) @php $is_show = 1; $str1 = str_replace(':fromDate', \Carbon\Carbon::parse($session->otherSchemes[0]->fromDate)->format('d/m/Y'), $str); $str1 = str_replace(':toDate', \Carbon\Carbon::parse($session->otherSchemes[0]->toDate)->format('d/m/Y'), $str1); @endphp @endif
{{$session->roomName}} ({{$setup->currency}}{{$session->amount}})

{{$fromTime}} to {{$toTime}} {{$setup->currency}}{{$amount}}/hour

selected) && $session->selected ? "checked" : ""}} {{ isset($session->otherSchemes) && !empty($session->otherSchemes) ? 'disabled' : ''}}>
@endforeach @endif
@endif

Funding type

{{-- --}}
record->fullyFunded) && $setup->record->fullyFunded == true) || !$is_update) ? 'checked' : '' }}>
record->fullyFunded) && $setup->record->fullyFunded == false) ? 'checked' : '' }}>
{{-- --}}
{{$setup->currency}}
/hours
@if( isset($setup->isConsumeAllHoursAllowed) && !empty($setup->isConsumeAllHoursAllowed) && $setup->isConsumeAllHoursAllowed == true)
record->consumeAllHours) && !empty($setup->record->consumeAllHours) && $setup->record->consumeAllHours == true ? 'checked' : '' }}>
@endif
record->roundUpHours) && !empty($setup->record->roundUpHours) && $setup->record->roundUpHours == true ? 'checked' : '' }}>

The childcare hourly rate is {{$setup->currency}}{{$setup->applicableAmount}}/hour, the funded amount is {{$setup->currency}}0/hour, meaning that the amount the child actually pays per hour is {{$setup->currency}}0/hour

The session hourly rate is {{$setup->currency}}{{$session_hourly_rate}}/hour, the funded amount is {{$setup->currency}}0/hour, meaning that the amount the child actually pays per hour is {{$setup->currency}}0/hour

Please enter the start date the funded hours should start being applied to the child's invoice.

If you enter a past date, only the current billing period will be invoiced for.

Total period of this funding scheme is 0 weeks and 0 days.

The current period for this funding scheme is 0 weeks and 0 days.

You’ve stretched the funded hours for 0 weeks 0 days.

record->stretchDate) && !empty($setup->record->stretchDate) ? 'checked' : '' }}>
{{-- --}} {{-- --}}
@else

Set billing type as Attendance hours or Session.

Manage recurring billing

You can set funded hours for the children who have active billing types as Attendance hours or sessions.

{{--

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

--}}
@endif
@if($setup->subscription->type == "b8")

This funded scheme will be applied on the invoice sent on {{isset($setup->subscription->nextInvoice) && !empty($setup->subscription->nextInvoice) ? \Carbon\Carbon::parse($setup->subscription->nextInvoice)->format('d/m/Y') : \Carbon\Carbon::parse($setup->subscription->billStartDate)->format('d/m/Y') }}.

@endif
@endsection @section('script-bottom') @endsection