@component('components.widget', ['title' => 'Account'])
- Type
- {{ \App\Utils\StoredValueService::LABELS[$account->type] ?? $account->type }}
- Customer
- {{ optional($account->contact)->name ?: 'Bearer' }}
- Initial value
- @format_currency($account->initial_balance)
- Balance
- @format_currency($account->balance)
- Status
- {{ ucfirst($account->status) }}
- Expires
- {{ optional($account->expires_at)->format('M d, Y h:i A') ?: 'Never' }}
{!! Form::open(['route' => ['stored-value.status', $account->id], 'method' => 'post', 'style' => 'display:inline']) !!}
{!! Form::hidden('status', $account->status === 'active' ? 'suspended' : 'active') !!}
{!! Form::close() !!}
Back
@endcomponent
@component('components.widget', ['title' => 'Manager adjustment'])
{!! Form::open(['route' => ['stored-value.adjust', $account->id], 'method' => 'post']) !!}
{!! Form::label('amount', 'Amount:*') !!}
{!! Form::text('amount', null, ['class' => 'form-control input_number', 'required', 'placeholder' => 'Use a negative number to deduct']) !!}
{!! Form::label('notes', 'Reason:*') !!}
{!! Form::textarea('notes', null, ['class' => 'form-control', 'rows' => 2, 'required']) !!}
{!! Form::close() !!}
@endcomponent
@component('components.widget', ['title' => 'Balance ledger'])
| Date | Type | Reference | Notes | Change | Balance |
@foreach($ledger as $entry)
| {{ $entry->created_at->format('M d, Y h:i A') }} |
{{ ucwords(str_replace('_', ' ', $entry->entry_type)) }} |
{{ $entry->reference }} |
{{ $entry->notes }} |
@format_currency($entry->amount) |
@format_currency($entry->balance_after) |
@endforeach
{{ $ledger->links() }}
@endcomponent