@extends('layouts.app') @section('title', 'Savings') @section('content')
@if(($savings ?? collect())->isEmpty())
@else
@foreach($savings as $log) @endforeach
Type Amount (SAR) Estimated Realized Source Recommendation Notes Logged
{{ ucfirst(str_replace('_', ' ', $log->savings_type ?? '')) }} {{ number_format($log->amount_sar ?? 0, 2) }} {{ $log->estimated_amount_sar !== null ? number_format($log->estimated_amount_sar, 2) : '—' }} @if($log->realized) Yes
{{ optional($log->realized_at)->format('Y-m-d') }}
@else No @endif
{{ ucfirst(str_replace('_', ' ', $log->source_type ?? '—')) }} @if($log->recommendation) #{{ $log->recommendation_id }} @else — @endif {{ \Illuminate\Support\Str::limit($log->notes, 40) ?: '—' }} {{ optional($log->created_at)->format('Y-m-d') }}
@if(method_exists($savings, 'links'))
{{ $savings->withQueryString()->links() }}
@endif
@endif @endsection