@extends('layouts.app') @section('title', 'Payment Transfers - Pharmacy Management') @section('content')

Payment Transfers

Transfer funds between payment accounts

@can('create_payment_transfers') New Transfer @endcan

Total Transferred

${{ number_format($totalAmount, 2) }}

Pending

{{ $transfers->where('status', 'pending')->count() }}

Approved

{{ $transfers->where('status', 'approved')->count() }}

Rejected

{{ $transfers->where('status', 'rejected')->count() }}

@canany(['approve_payment_transfers', 'edit_payment_transfers', 'delete_payment_transfers']) @endcanany @forelse($transfers as $transfer) @canany(['approve_payment_transfers', 'edit_payment_transfers', 'delete_payment_transfers']) @endcanany @empty @endforelse
Reference Description From To Date Amount StatusActions
{{ $transfer->reference_no }}

{{ $transfer->description ?? '-' }}

@if($transfer->notes)

{{ Str::limit($transfer->notes, 50) }}

@endif
{{ $transfer->fromAccount?->name ?? '-' }} {{ $transfer->toAccount?->name ?? '-' }} {{ displayDate($transfer->transfer_date) }} ${{ number_format($transfer->amount, 2) }} @php $colors = ['pending' => 'bg-yellow-100 text-yellow-800', 'approved' => 'bg-green-100 text-green-800', 'rejected' => 'bg-red-100 text-red-800']; @endphp {{ $transfer->status }} @can('approve_payment_transfers') @if($transfer->status === 'pending')
@csrf
@csrf
@endif @endcan @can('edit_payment_transfers') @endcan @can('delete_payment_transfers')
@csrf @method('DELETE')
@endcan
No transfers found
{{ $transfers->withQueryString()->links() }}
@endsection