@extends('admin.layouts.dashboard') @section('title', 'Subscription') @section('content') @php $hasDue = (int) $lastPackageInfo['total_due'] !== 0; $stillRunning = date('Y-m-d') < date('Y-m-d', strtotime($lastPackageInfo['ending_date'])); $showCurrent = $hasDue || $stillRunning; @endphp History Back to list @if ($showCurrent) {{ $stillRunning ? 'Running' : 'Ended' }} @if ($hasDue) Due {{ number_format($lastPackageInfo->total_due, 2) }} @endif
Starting date
{{ date('d M Y', strtotime($lastPackageInfo->starting_date)) }}
Ending date
{{ date('d M Y', strtotime($lastPackageInfo->ending_date)) }}
Amount
{{ number_format($lastPackageInfo->amount, 2) }}
Discount
{{ number_format($lastPackageInfo->discount, 2) }}
Paid
{{ number_format($lastPackageInfo->total_paid, 2) }}
Due
{{ number_format($lastPackageInfo->total_due, 2) }}
@if ($hasDue) @include('admin.includes.subcription-more') @endif @else @include('admin.includes.subcription') @endif @endsection