Add membership fee system with disability discount and fix document permissions
Features: - Implement two fee types: entrance fee and annual fee (both NT$1,000) - Add 50% discount for disability certificate holders - Add disability certificate upload in member profile - Integrate disability verification into cashier approval workflow - Add membership fee settings in system admin Document permissions: - Fix hard-coded role logic in Document model - Use permission-based authorization instead of role checks Additional features: - Add announcements, general ledger, and trial balance modules - Add income management and accounting entries - Add comprehensive test suite with factories - Update UI translations to Traditional Chinese 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800 dark:text-gray-200">
|
||||
{{ __('Payment Verification Dashboard') }}
|
||||
付款驗證控制台
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
<div class="py-12">
|
||||
<div class="mx-auto max-w-7xl sm:px-6 lg:px-8">
|
||||
@if (session('status'))
|
||||
<div class="mb-4 rounded-md bg-green-50 p-4 dark:bg-green-900/30 border-l-4 border-green-400">
|
||||
<div class="mb-4 rounded-md bg-green-50 p-4 dark:bg-green-900/30 border-l-4 border-green-400 dark:border-green-500">
|
||||
<p class="text-sm text-green-800 dark:text-green-200">{{ session('status') }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div class="mb-4 rounded-md bg-red-50 p-4 dark:bg-red-900/30 border-l-4 border-red-400">
|
||||
<div class="mb-4 rounded-md bg-red-50 p-4 dark:bg-red-900/30 border-l-4 border-red-400 dark:border-red-500">
|
||||
<p class="text-sm text-red-800 dark:text-red-200">{{ session('error') }}</p>
|
||||
</div>
|
||||
@endif
|
||||
@@ -23,14 +23,14 @@
|
||||
<div class="mb-4 border-b border-gray-200 dark:border-gray-700">
|
||||
<nav class="-mb-px flex space-x-8">
|
||||
<a href="{{ route('admin.payment-verifications.index', ['tab' => 'all']) }}"
|
||||
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'all' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300' }}">
|
||||
{{ __('All Payments') }}
|
||||
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'all' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:border-gray-600' }}">
|
||||
所有付款
|
||||
</a>
|
||||
|
||||
@can('verify_payments_cashier')
|
||||
<a href="{{ route('admin.payment-verifications.index', ['tab' => 'cashier']) }}"
|
||||
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'cashier' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300' }}">
|
||||
{{ __('Cashier Queue') }}
|
||||
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'cashier' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:border-gray-600' }}">
|
||||
出納待處理
|
||||
@if($counts['pending'] > 0)
|
||||
<span class="ml-2 rounded-full bg-red-100 px-2 py-0.5 text-xs font-medium text-red-800 dark:bg-red-900 dark:text-red-200">
|
||||
{{ $counts['pending'] }}
|
||||
@@ -41,8 +41,8 @@
|
||||
|
||||
@can('verify_payments_accountant')
|
||||
<a href="{{ route('admin.payment-verifications.index', ['tab' => 'accountant']) }}"
|
||||
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'accountant' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300' }}">
|
||||
{{ __('Accountant Queue') }}
|
||||
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'accountant' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:border-gray-600' }}">
|
||||
會計待處理
|
||||
@if($counts['cashier_approved'] > 0)
|
||||
<span class="ml-2 rounded-full bg-red-100 px-2 py-0.5 text-xs font-medium text-red-800 dark:bg-red-900 dark:text-red-200">
|
||||
{{ $counts['cashier_approved'] }}
|
||||
@@ -53,8 +53,8 @@
|
||||
|
||||
@can('verify_payments_chair')
|
||||
<a href="{{ route('admin.payment-verifications.index', ['tab' => 'chair']) }}"
|
||||
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'chair' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300' }}">
|
||||
{{ __('Chair Queue') }}
|
||||
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'chair' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:border-gray-600' }}">
|
||||
主席待處理
|
||||
@if($counts['accountant_approved'] > 0)
|
||||
<span class="ml-2 rounded-full bg-red-100 px-2 py-0.5 text-xs font-medium text-red-800 dark:bg-red-900 dark:text-red-200">
|
||||
{{ $counts['accountant_approved'] }}
|
||||
@@ -64,13 +64,13 @@
|
||||
@endcan
|
||||
|
||||
<a href="{{ route('admin.payment-verifications.index', ['tab' => 'approved']) }}"
|
||||
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'approved' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300' }}">
|
||||
{{ __('Approved') }} ({{ $counts['approved'] }})
|
||||
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'approved' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:border-gray-600' }}">
|
||||
已核准 ({{ $counts['approved'] }})
|
||||
</a>
|
||||
|
||||
<a href="{{ route('admin.payment-verifications.index', ['tab' => 'rejected']) }}"
|
||||
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'rejected' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300' }}">
|
||||
{{ __('Rejected') }} ({{ $counts['rejected'] }})
|
||||
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'rejected' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:border-gray-600' }}">
|
||||
已拒絕 ({{ $counts['rejected'] }})
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
@@ -79,10 +79,10 @@
|
||||
<div class="mb-4">
|
||||
<form method="GET" action="{{ route('admin.payment-verifications.index') }}" class="flex gap-2">
|
||||
<input type="hidden" name="tab" value="{{ $tab }}">
|
||||
<input type="text" name="search" value="{{ request('search') }}" placeholder="{{ __('Search by member name, email, or reference...') }}"
|
||||
<input type="text" name="search" value="{{ request('search') }}" placeholder="依會員姓名、電子郵件或參考編號搜尋..."
|
||||
class="flex-1 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100">
|
||||
<button type="submit" class="inline-flex items-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500">
|
||||
{{ __('Search') }}
|
||||
<button type="submit" class="inline-flex items-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 dark:bg-indigo-500 dark:hover:bg-indigo-400">
|
||||
搜尋
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -93,13 +93,13 @@
|
||||
<table class="min-w-full divide-y divide-gray-300 dark:divide-gray-600">
|
||||
<thead class="bg-gray-50 dark:bg-gray-900">
|
||||
<tr>
|
||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Member') }}</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Amount') }}</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Payment Date') }}</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Method') }}</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Status') }}</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Submitted') }}</th>
|
||||
<th scope="col" class="relative py-3.5 pl-3 pr-4"><span class="sr-only">{{ __('Actions') }}</span></th>
|
||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">會員</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">金額</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">付款日期</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">方式</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">狀態</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">已提交</th>
|
||||
<th scope="col" class="relative py-3.5 pl-3 pr-4"><span class="sr-only">操作</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white dark:divide-gray-700 dark:bg-gray-800">
|
||||
@@ -133,14 +133,14 @@
|
||||
</td>
|
||||
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium">
|
||||
<a href="{{ route('admin.payment-verifications.show', $payment) }}" class="text-indigo-600 hover:text-indigo-900 dark:text-indigo-400 dark:hover:text-indigo-300">
|
||||
{{ __('View & Verify') }}
|
||||
查看與驗證
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="px-3 py-8 text-center text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ __('No payments found') }}
|
||||
找不到付款記錄
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
@@ -154,4 +154,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
</x-app-layout>
|
||||
@@ -1,7 +1,7 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800 dark:text-gray-200">
|
||||
{{ __('Payment Verification') }} - {{ $payment->member->full_name }}
|
||||
付款驗證 - {{ $payment->member->full_name }}
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
@@ -9,32 +9,32 @@
|
||||
<div class="mx-auto max-w-4xl sm:px-6 lg:px-8 space-y-6">
|
||||
|
||||
@if (session('status'))
|
||||
<div class="rounded-md bg-green-50 p-4 dark:bg-green-900/30 border-l-4 border-green-400">
|
||||
<div class="rounded-md bg-green-50 p-4 dark:bg-green-900/30 border-l-4 border-green-400 dark:border-green-500">
|
||||
<p class="text-sm text-green-800 dark:text-green-200">{{ session('status') }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div class="rounded-md bg-red-50 p-4 dark:bg-red-900/30 border-l-4 border-red-400">
|
||||
<div class="rounded-md bg-red-50 p-4 dark:bg-red-900/30 border-l-4 border-red-400 dark:border-red-500">
|
||||
<p class="text-sm text-red-800 dark:text-red-200">{{ session('error') }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Payment Details --}}
|
||||
<div class="bg-white shadow sm:rounded-lg dark:bg-gray-800 px-4 py-5 sm:p-6">
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">{{ __('Payment Details') }}</h3>
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">付款詳情</h3>
|
||||
|
||||
<dl class="grid grid-cols-1 gap-x-4 gap-y-6 sm:grid-cols-2">
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{{ __('Member') }}</dt>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">會員</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
|
||||
{{ $payment->member->full_name }}<br>
|
||||
<span class="text-gray-500">{{ $payment->member->email }}</span>
|
||||
<span class="text-gray-500 dark:text-gray-400">{{ $payment->member->email }}</span>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{{ __('Status') }}</dt>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">狀態</dt>
|
||||
<dd class="mt-1">
|
||||
<span class="inline-flex items-center rounded-full px-2 py-1 text-xs font-medium
|
||||
@if($payment->status === 'pending') bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200
|
||||
@@ -48,27 +48,53 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{{ __('Amount') }}</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">TWD {{ number_format($payment->amount, 0) }}</dd>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">會費類型</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">{{ $payment->fee_type_label }}</dd>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{{ __('Payment Date') }}</dt>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">繳納金額</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">TWD {{ number_format($payment->amount, 0) }}</dd>
|
||||
</div>
|
||||
|
||||
@if($payment->base_amount)
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">原始金額</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">TWD {{ number_format($payment->base_amount, 0) }}</dd>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($payment->disability_discount)
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">身心障礙優惠</dt>
|
||||
<dd class="mt-1 text-sm text-green-600 dark:text-green-400">-TWD {{ number_format($payment->discount_amount, 0) }}</dd>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($payment->final_amount)
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">應繳金額</dt>
|
||||
<dd class="mt-1 text-sm font-semibold text-indigo-600 dark:text-indigo-400">TWD {{ number_format($payment->final_amount, 0) }}</dd>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">付款日期</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">{{ $payment->paid_at->format('Y-m-d') }}</dd>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{{ __('Payment Method') }}</dt>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">付款方式</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">{{ $payment->payment_method_label }}</dd>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{{ __('Reference Number') }}</dt>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">參考編號</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">{{ $payment->reference ?? '—' }}</dd>
|
||||
</div>
|
||||
|
||||
<div class="sm:col-span-2">
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{{ __('Submitted By') }}</dt>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">提交者</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
|
||||
{{ $payment->submittedBy->name }} on {{ $payment->created_at->format('Y-m-d H:i') }}
|
||||
</dd>
|
||||
@@ -76,21 +102,21 @@
|
||||
|
||||
@if($payment->notes)
|
||||
<div class="sm:col-span-2">
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{{ __('Notes') }}</dt>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">備註</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100 whitespace-pre-line">{{ $payment->notes }}</dd>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($payment->receipt_path)
|
||||
<div class="sm:col-span-2">
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{{ __('Payment Receipt') }}</dt>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">付款收據</dt>
|
||||
<dd class="mt-1">
|
||||
<a href="{{ route('admin.payment-verifications.download-receipt', $payment) }}" target="_blank"
|
||||
class="inline-flex items-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 dark:bg-gray-700 dark:text-gray-100 dark:ring-gray-600">
|
||||
<svg class="-ml-0.5 mr-1.5 h-5 w-5 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
class="inline-flex items-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 dark:bg-gray-700 dark:text-gray-100 dark:ring-gray-600 dark:hover:bg-gray-600">
|
||||
<svg class="-ml-0.5 mr-1.5 h-5 w-5 text-gray-400 dark:text-gray-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
||||
</svg>
|
||||
{{ __('Download Receipt') }}
|
||||
下載收據
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
@@ -100,7 +126,7 @@
|
||||
|
||||
{{-- Verification History --}}
|
||||
<div class="bg-white shadow sm:rounded-lg dark:bg-gray-800 px-4 py-5 sm:p-6">
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">{{ __('Verification History') }}</h3>
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">驗證歷史</h3>
|
||||
|
||||
<div class="flow-root">
|
||||
<ul role="list" class="-mb-8">
|
||||
@@ -112,7 +138,7 @@
|
||||
<svg class="h-5 w-5 text-white" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" /></svg>
|
||||
</span></div>
|
||||
<div class="flex min-w-0 flex-1 justify-between space-x-4 pt-1.5">
|
||||
<div><p class="text-sm text-gray-500 dark:text-gray-400">{{ __('Verified by Cashier') }}: <span class="font-medium text-gray-900 dark:text-gray-100">{{ $payment->verifiedByCashier->name }}</span></p></div>
|
||||
<div><p class="text-sm text-gray-500 dark:text-gray-400">出納已驗證: <span class="font-medium text-gray-900 dark:text-gray-100">{{ $payment->verifiedByCashier->name }}</span></p></div>
|
||||
<div class="whitespace-nowrap text-right text-sm text-gray-500 dark:text-gray-400">{{ $payment->cashier_verified_at->format('Y-m-d H:i') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -128,7 +154,7 @@
|
||||
<svg class="h-5 w-5 text-white" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" /></svg>
|
||||
</span></div>
|
||||
<div class="flex min-w-0 flex-1 justify-between space-x-4 pt-1.5">
|
||||
<div><p class="text-sm text-gray-500 dark:text-gray-400">{{ __('Verified by Accountant') }}: <span class="font-medium text-gray-900 dark:text-gray-100">{{ $payment->verifiedByAccountant->name }}</span></p></div>
|
||||
<div><p class="text-sm text-gray-500 dark:text-gray-400">會計已驗證: <span class="font-medium text-gray-900 dark:text-gray-100">{{ $payment->verifiedByAccountant->name }}</span></p></div>
|
||||
<div class="whitespace-nowrap text-right text-sm text-gray-500 dark:text-gray-400">{{ $payment->accountant_verified_at->format('Y-m-d H:i') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -144,7 +170,7 @@
|
||||
<svg class="h-5 w-5 text-white" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" /></svg>
|
||||
</span></div>
|
||||
<div class="flex min-w-0 flex-1 justify-between space-x-4 pt-1.5">
|
||||
<div><p class="text-sm text-gray-500 dark:text-gray-400">{{ __('Final Approval by Chair') }}: <span class="font-medium text-gray-900 dark:text-gray-100">{{ $payment->verifiedByChair->name }}</span></p></div>
|
||||
<div><p class="text-sm text-gray-500 dark:text-gray-400">主席最終核准: <span class="font-medium text-gray-900 dark:text-gray-100">{{ $payment->verifiedByChair->name }}</span></p></div>
|
||||
<div class="whitespace-nowrap text-right text-sm text-gray-500 dark:text-gray-400">{{ $payment->chair_verified_at->format('Y-m-d H:i') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -161,7 +187,7 @@
|
||||
</span></div>
|
||||
<div class="flex min-w-0 flex-1 justify-between space-x-4 pt-1.5">
|
||||
<div>
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">{{ __('Rejected by') }}: <span class="font-medium text-gray-900 dark:text-gray-100">{{ $payment->rejectedBy->name }}</span></p>
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">拒絕者: <span class="font-medium text-gray-900 dark:text-gray-100">{{ $payment->rejectedBy->name }}</span></p>
|
||||
@if($payment->rejection_reason)
|
||||
<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $payment->rejection_reason }}</p>
|
||||
@endif
|
||||
@@ -179,18 +205,56 @@
|
||||
{{-- Verification Actions --}}
|
||||
@if(!$payment->isRejected() && !$payment->isFullyApproved())
|
||||
<div class="bg-white shadow sm:rounded-lg dark:bg-gray-800 px-4 py-5 sm:p-6">
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">{{ __('Verification Actions') }}</h3>
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">驗證操作</h3>
|
||||
|
||||
<div class="space-y-4">
|
||||
@if($payment->canBeApprovedByCashier() && Auth::user()->can('verify_payments_cashier'))
|
||||
<form method="POST" action="{{ route('admin.payment-verifications.approve-cashier', $payment) }}" class="border-l-4 border-green-400 pl-4">
|
||||
@csrf
|
||||
|
||||
{{-- Disability Certificate Verification (if applicable) --}}
|
||||
@if($payment->member->hasDisabilityCertificate() && $payment->member->isDisabilityPending())
|
||||
<div class="mb-6 p-4 bg-yellow-50 dark:bg-yellow-900/30 rounded-lg">
|
||||
<h4 class="text-sm font-semibold text-yellow-800 dark:text-yellow-200 mb-3">身心障礙手冊審核</h4>
|
||||
<p class="text-sm text-yellow-700 dark:text-yellow-300 mb-3">此會員已上傳身心障礙手冊,請一併審核:</p>
|
||||
|
||||
<a href="{{ route('admin.members.disability-certificate', $payment->member) }}" target="_blank"
|
||||
class="inline-flex items-center mb-4 text-sm text-indigo-600 dark:text-indigo-400 hover:underline">
|
||||
<svg class="w-4 h-4 mr-1" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
|
||||
</svg>
|
||||
檢視身心障礙手冊
|
||||
</a>
|
||||
|
||||
<div class="space-y-2">
|
||||
<label class="flex items-center">
|
||||
<input type="radio" name="disability_action" value="approve" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 dark:border-gray-600">
|
||||
<span class="ml-2 text-sm text-gray-700 dark:text-gray-300">通過 - 確認為有效身心障礙手冊</span>
|
||||
</label>
|
||||
<label class="flex items-center">
|
||||
<input type="radio" name="disability_action" value="reject" class="h-4 w-4 text-red-600 focus:ring-red-500 border-gray-300 dark:border-gray-600">
|
||||
<span class="ml-2 text-sm text-gray-700 dark:text-gray-300">駁回</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="disability_rejection_reason_container" class="mt-3 hidden">
|
||||
<label for="disability_rejection_reason" class="block text-sm font-medium text-gray-700 dark:text-gray-300">駁回原因</label>
|
||||
<input type="text" name="disability_rejection_reason" id="disability_rejection_reason"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100"
|
||||
placeholder="請說明駁回原因">
|
||||
</div>
|
||||
|
||||
<p class="mt-3 text-xs text-yellow-600 dark:text-yellow-400">* 通過後,會員未來繳費將自動享有 50% 優惠</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="cashier_notes" class="block text-sm font-medium text-gray-700 dark:text-gray-300">{{ __('Notes (Optional)') }}</label>
|
||||
<label for="cashier_notes" class="block text-sm font-medium text-gray-700 dark:text-gray-300">備註(選填)</label>
|
||||
<textarea name="notes" id="cashier_notes" rows="2" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100"></textarea>
|
||||
</div>
|
||||
<button type="submit" class="inline-flex justify-center rounded-md bg-green-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-green-500">
|
||||
{{ __('Approve as Cashier') }}
|
||||
<button type="submit" class="inline-flex justify-center rounded-md bg-green-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-green-500 dark:hover:bg-green-400">
|
||||
出納核准
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
@@ -199,11 +263,11 @@
|
||||
<form method="POST" action="{{ route('admin.payment-verifications.approve-accountant', $payment) }}" class="border-l-4 border-green-400 pl-4">
|
||||
@csrf
|
||||
<div class="mb-3">
|
||||
<label for="accountant_notes" class="block text-sm font-medium text-gray-700 dark:text-gray-300">{{ __('Notes (Optional)') }}</label>
|
||||
<label for="accountant_notes" class="block text-sm font-medium text-gray-700 dark:text-gray-300">備註(選填)</label>
|
||||
<textarea name="notes" id="accountant_notes" rows="2" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100"></textarea>
|
||||
</div>
|
||||
<button type="submit" class="inline-flex justify-center rounded-md bg-green-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-green-500">
|
||||
{{ __('Approve as Accountant') }}
|
||||
<button type="submit" class="inline-flex justify-center rounded-md bg-green-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-green-500 dark:hover:bg-green-400">
|
||||
會計核准
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
@@ -212,24 +276,24 @@
|
||||
<form method="POST" action="{{ route('admin.payment-verifications.approve-chair', $payment) }}" class="border-l-4 border-green-400 pl-4">
|
||||
@csrf
|
||||
<div class="mb-3">
|
||||
<label for="chair_notes" class="block text-sm font-medium text-gray-700 dark:text-gray-300">{{ __('Notes (Optional)') }}</label>
|
||||
<label for="chair_notes" class="block text-sm font-medium text-gray-700 dark:text-gray-300">備註(選填)</label>
|
||||
<textarea name="notes" id="chair_notes" rows="2" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100"></textarea>
|
||||
</div>
|
||||
<button type="submit" class="inline-flex justify-center rounded-md bg-green-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-green-500">
|
||||
{{ __('Final Approval as Chair') }}
|
||||
<button type="submit" class="inline-flex justify-center rounded-md bg-green-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-green-500 dark:hover:bg-green-400">
|
||||
主席最終核准
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
|
||||
{{-- Reject Form --}}
|
||||
<form method="POST" action="{{ route('admin.payment-verifications.reject', $payment) }}" class="border-l-4 border-red-400 pl-4" onsubmit="return confirm('{{ __('Are you sure you want to reject this payment?') }}')">
|
||||
<form method="POST" action="{{ route('admin.payment-verifications.reject', $payment) }}" class="border-l-4 border-red-400 pl-4" onsubmit="return confirm('您確定要拒絕此付款嗎?')">
|
||||
@csrf
|
||||
<div class="mb-3">
|
||||
<label for="rejection_reason" class="block text-sm font-medium text-gray-700 dark:text-gray-300">{{ __('Rejection Reason') }} <span class="text-red-500">*</span></label>
|
||||
<label for="rejection_reason" class="block text-sm font-medium text-gray-700 dark:text-gray-300">拒絕原因 <span class="text-red-500">*</span></label>
|
||||
<textarea name="rejection_reason" id="rejection_reason" rows="3" required class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100"></textarea>
|
||||
</div>
|
||||
<button type="submit" class="inline-flex justify-center rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500">
|
||||
{{ __('Reject Payment') }}
|
||||
<button type="submit" class="inline-flex justify-center rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 dark:hover:bg-red-400">
|
||||
拒絕付款
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -238,10 +302,28 @@
|
||||
|
||||
{{-- Back Button --}}
|
||||
<div>
|
||||
<a href="{{ route('admin.payment-verifications.index') }}" class="inline-flex items-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 dark:bg-gray-700 dark:text-gray-100 dark:ring-gray-600">
|
||||
← {{ __('Back to List') }}
|
||||
<a href="{{ route('admin.payment-verifications.index') }}" class="inline-flex items-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 dark:bg-gray-700 dark:text-gray-100 dark:ring-gray-600 dark:hover:bg-gray-600">
|
||||
← 返回列表
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
// Toggle disability rejection reason field
|
||||
document.querySelectorAll('input[name="disability_action"]').forEach(function(radio) {
|
||||
radio.addEventListener('change', function() {
|
||||
const container = document.getElementById('disability_rejection_reason_container');
|
||||
if (this.value === 'reject') {
|
||||
container.classList.remove('hidden');
|
||||
document.getElementById('disability_rejection_reason').required = true;
|
||||
} else {
|
||||
container.classList.add('hidden');
|
||||
document.getElementById('disability_rejection_reason').required = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
</x-app-layout>
|
||||
Reference in New Issue
Block a user