@extends('portal.layouts.app') @section('title', $batch->batch_no) @section('subtitle', $batch->type->label()) @section('actions') @if ($batch->file_path) Download file @endif @endsection @section('content')
@if ($batch->error_message)
{{ $batch->error_message }}
@endif
@foreach ([ 'Type' => $batch->type->label(), 'Direction' => ucfirst($batch->direction), 'Business date' => $batch->business_date?->format('d M Y') ?? '-', 'Original file' => $batch->original_name ?? '-', 'Size' => $batch->file_size ? $batch->humanSize() : '-', 'Created by' => $batch->creator?->name ?? 'System', 'Processed by' => $batch->processor?->name ?? '-', 'Created' => $batch->created_at->format('d M Y H:i'), ] as $label => $value)
{{ $label }}
{{ $value }}
@endforeach
@if ($batch->file_hash)

SHA-256 {{ $batch->file_hash }}

@endif
@if ($batch->direction === 'outbound') @php $exported = $batch->exportedSubscriptions()->with(['customer', 'product', 'plan'])->paginate(50); @endphp
@foreach ($exported as $subscription) @endforeach
Reference Customer Product Contribution Current status
{{ $subscription->subscription_no }} {{ $subscription->customer->full_name }} {{ $subscription->product->code }} / {{ $subscription->plan?->code }} {{ number_format((float) $subscription->contribution_amount) }} {{ $subscription->status->label() }}
@if ($exported->hasPages())
{{ $exported->links() }}
@endif
@else
@forelse ($rows as $row) @empty @endforelse
Row Reference Outcome Message
{{ $row->row_no }} @if ($row->subscription) {{ $row->subscription->subscription_no }} @else {{ $row->reference ?? '-' }} @endif {{ ucfirst($row->status) }} {{ $row->message }}
No rows recorded for this batch.
@if ($rows->hasPages())
{{ $rows->links() }}
@endif
@endif @endsection