@extends('admin.layouts.app') @section('content')

{{ $pageTitle }}

{{ trans('update.open_installments') }}

{{ $openInstallments['count'] }} {{ handlePrice($openInstallments['amount']) }}

{{ trans('update.pending_verification') }}

{{ $pendingVerifications }}

{{ trans('update.finished_installments') }}

{{ $finishedInstallments['count'] }} {{ handlePrice($finishedInstallments['amount']) }}

{{ trans('update.overdue_installments') }}

{{ $overdueInstallmentsCount }}

{{ trans('update.installment_overview') }}

@if(!empty($installment->upfront)) @php $upfrontPayment = $payments->where('type', 'upfront')->first(); @endphp @endif @foreach($installment->steps as $step) @php $stepPayment = $payments->where('selected_installment_step_id', $step->id)->where('status', 'paid')->first(); $dueAt = ($step->deadline * 86400) + $order->created_at; $isOverdue = ($dueAt < time() and empty($stepPayment)); @endphp @endforeach
{{ trans('admin/main.title') }} {{ trans('admin/main.amount') }} {{ trans('update.due_date') }} {{ trans('update.payment_date') }} {{ trans('public.status') }}
{{ trans('update.upfront') }} @if($installment->upfront_type == 'percent') ({{ $installment->upfront }}%) @endif {{ handlePrice($installment->getUpfront($itemPrice)) }} - {{ !empty($upfrontPayment) ? dateTimeFormat($upfrontPayment->created_at, 'j M Y H:i') : '-' }} @if(!empty($upfrontPayment)) {{ trans('public.paid') }} @else {{ trans('update.unpaid') }} @endif
{{ $step->title }} @if($step->amount_type == 'percent') ({{ $step->amount }}%) @endif
{{ trans('update.n_days_after_purchase', ['days' => $step->deadline]) }}
{{ handlePrice($step->getPrice($itemPrice)) }} {{ dateTimeFormat($dueAt, 'j M Y') }} {{ !empty($stepPayment) ? dateTimeFormat($stepPayment->created_at, 'j M Y H:i') : '-' }} @if(!empty($stepPayment)) {{ trans('public.paid') }} @else {{ trans('update.unpaid') }} {{ $isOverdue ? "(". trans('update.overdue') .")" : '' }} @endif

{{ trans('update.user_uploaded_files') }}

@if(!empty($attachments) and count($attachments))
@foreach($attachments as $attachment) @endforeach
{{ trans('admin/main.title') }} {{ trans('admin/main.actions') }}
{{ $attachment->title }} id}/attachments/{$attachment->id}/download") }}" class="" data-toggle="tooltip" data-placement="top" title="{{ trans('home.download') }}">
@else @include('admin.includes.no-result',[ 'file_name' => 'faq.png', 'title' => trans('update.no_uploaded_files'), 'hint' => trans('update.no_uploaded_files_hint'), 'noResultSmLogo' => true ]) @endif
@if($order->status == "pending_verification") @include('admin.includes.delete_button',[ 'url' => getAdminPanelUrl("/financial/installments/orders/{$order->id}/approve"), 'btnClass' => 'btn btn-success text-white', 'btnText' => ''. trans("admin/main.approve") .'', 'noBtnTransparent' => true, ]) @endif @if($order->status == "open") @include('admin.includes.delete_button',[ 'url' => getAdminPanelUrl("/financial/installments/orders/{$order->id}/reject"), 'btnClass' => 'btn btn-danger text-white ml-1', 'btnText' => ''. trans("admin/main.reject") .'', 'noBtnTransparent' => true, ]) @endif
@endsection