@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
| Reference |
Customer |
Product |
Contribution |
Current status |
@foreach ($exported as $subscription)
|
{{ $subscription->subscription_no }}
|
{{ $subscription->customer->full_name }} |
{{ $subscription->product->code }} / {{ $subscription->plan?->code }} |
{{ number_format((float) $subscription->contribution_amount) }} |
{{ $subscription->status->label() }}
|
@endforeach
@if ($exported->hasPages())
{{ $exported->links() }}
@endif
@else
| Row |
Reference |
Outcome |
Message |
@forelse ($rows as $row)
| {{ $row->row_no }} |
@if ($row->subscription)
{{ $row->subscription->subscription_no }}
@else
{{ $row->reference ?? '-' }}
@endif
|
{{ ucfirst($row->status) }}
|
{{ $row->message }} |
@empty
| No rows recorded for this batch. |
@endforelse
@if ($rows->hasPages())
{{ $rows->links() }}
@endif
@endif
@endsection