@extends('super_admin.layouts.master') @section('title', 'Plan History - ' . $planPricing->plan_name) @section('page_title', 'Pricing History') @section('content')

{{ $planPricing->plan_name }} - History

All pricing changes for this plan

Edit Plan

Current Monthly Price

₹{{ number_format($planPricing->monthly_price) }}

Current Yearly Price

₹{{ number_format($planPricing->yearly_price ?? 0) }}

Total Changes

{{ $histories->total() }}

Last Updated

{{ $planPricing->updated_at->diffForHumans() }}

Price Change History

@forelse($histories as $history) @empty @endforelse
Date Change Type Monthly Price Yearly Price Reason Changed By
{{ $history->created_at->format('M d, Y') }}
{{ $history->created_at->format('h:i A') }}
@if($history->change_type === 'increase') Increase @elseif($history->change_type === 'decrease') Decrease @else No Change @endif
₹{{ number_format($history->old_monthly_price) }}
₹{{ number_format($history->new_monthly_price) }}
@php $monthlyDiff = $history->new_monthly_price - $history->old_monthly_price; @endphp @if($monthlyDiff != 0)
{{ $monthlyDiff > 0 ? '+' : '' }}₹{{ number_format($monthlyDiff) }}
@endif
@if($history->old_yearly_price || $history->new_yearly_price)
₹{{ number_format($history->old_yearly_price ?? 0) }}
₹{{ number_format($history->new_yearly_price ?? 0) }}
@php $yearlyDiff = ($history->new_yearly_price ?? 0) - ($history->old_yearly_price ?? 0); @endphp @if($yearlyDiff != 0)
{{ $yearlyDiff > 0 ? '+' : '' }}₹{{ number_format($yearlyDiff) }}
@endif @else - @endif

{{ $history->change_reason }}

Effective: {{ $history->effective_date->format('M d, Y') }}

{{ $history->changedBy->name ?? 'Unknown' }}

{{ $history->changedBy->email ?? '' }}

No price changes found for this plan.

Price changes will appear here when you update the plan pricing.

@if($histories->hasPages())
{{ $histories->links() }}
@endif
@endsection