@extends('layouts.app') @php use Illuminate\Support\Facades\Storage; @endphp @section('content')

Edit Payment

Back
{{-- ID Match Status Message --}}
{{ $canEdit ?? true ? 'Edit Allowed' : 'Edit Not Allowed' }}

{{ $editMessage ?? 'Edit status not determined' }}

@if(!($canEdit ?? true))

Note: Edit is only allowed when sales_invoice_transections.id matches bank_transactions.sales_invoice_transections_id

@endif
@csrf @method('PUT')
@php $paymentMethods = [ 'cash' => 'Cash', 'bank_transfer' => 'Bank Transfer', 'check' => 'Cheque', 'bkash' => 'bKash', 'nagad' => 'Nagad', 'rocket' => 'Rocket', 'online' => 'Online', 'other' => 'Other', ]; $selectedMethod = old('payment_method', $payment->payment_method); @endphp
@if($payment->bank_account && !$payment->bank_account_info_id) Previous: {{ $payment->bank_account }} @endif
@if(is_array($payment->receipt_images) && count($payment->receipt_images))
Existing uploads
@foreach($payment->receipt_images as $imagePath) @php $imageUrl = Storage::disk('public')->exists($imagePath) ? Storage::disk('public')->url($imagePath) : null; @endphp
@if($imageUrl) Payment image @else
Missing file
@endif
@endforeach
@endif @error('attachments.*')
{{ $message }}
@enderror
@endsection @push('scripts') @endpush