642b879dd4
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>
123 lines
7.4 KiB
PHP
123 lines
7.4 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<h2 class="text-xl font-semibold leading-tight text-gray-800 dark:text-gray-200">
|
|
新增報銷單
|
|
</h2>
|
|
</x-slot>
|
|
|
|
<div class="py-12">
|
|
<div class="mx-auto max-w-3xl sm:px-6 lg:px-8">
|
|
<div class="bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
|
<div class="px-4 py-5 sm:p-6">
|
|
<form method="POST" action="{{ route('admin.finance.store') }}" enctype="multipart/form-data" class="space-y-6" aria-label="報銷單提交表單">
|
|
@csrf
|
|
|
|
<div>
|
|
<label for="member_id" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
|
會員(選填)
|
|
</label>
|
|
<select
|
|
name="member_id"
|
|
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
|
>
|
|
<option value="">未連結會員</option>
|
|
@foreach ($members as $member)
|
|
<option value="{{ $member->id }}" @selected(old('member_id') == $member->id)>
|
|
{{ $member->full_name }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
@error('member_id')
|
|
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="title" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
|
標題
|
|
</label>
|
|
<input
|
|
type="text"
|
|
name="title"
|
|
id="title"
|
|
value="{{ old('title') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
|
required
|
|
>
|
|
@error('title')
|
|
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="amount" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
|
金額 <span class="text-red-500">*</span>
|
|
</label>
|
|
<div class="relative mt-1">
|
|
<div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
|
|
<span class="text-gray-500 dark:text-gray-400 sm:text-sm">NT$</span>
|
|
</div>
|
|
<input
|
|
type="number"
|
|
step="0.01"
|
|
name="amount"
|
|
id="amount"
|
|
value="{{ old('amount') }}"
|
|
class="block w-full rounded-md border-gray-300 dark:border-gray-700 pl-12 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
|
required
|
|
>
|
|
</div>
|
|
@error('amount')
|
|
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="description" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
|
描述
|
|
</label>
|
|
<textarea
|
|
name="description"
|
|
id="description"
|
|
rows="4"
|
|
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
|
>{{ old('description') }}</textarea>
|
|
@error('description')
|
|
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="attachment" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
|
附件(選填)
|
|
</label>
|
|
<input
|
|
type="file"
|
|
name="attachment"
|
|
id="attachment"
|
|
class="mt-1 block w-full text-sm text-gray-900 dark:text-gray-300 border border-gray-300 dark:border-gray-700 rounded-md cursor-pointer focus:outline-none focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:border-indigo-500 dark:bg-gray-900"
|
|
>
|
|
@error('attachment')
|
|
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
|
@enderror
|
|
<p class="mt-1 text-sm text-gray-500 dark:text-gray-400">
|
|
最大檔案大小:10MB
|
|
</p>
|
|
</div>
|
|
|
|
<div class="flex justify-end gap-3">
|
|
<a href="{{ route('admin.finance.index') }}" class="inline-flex items-center rounded-md border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-900 px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800">
|
|
取消
|
|
</a>
|
|
<button type="submit" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 dark:bg-indigo-500 px-4 py-2 text-sm font-medium text-white dark:text-white hover:bg-indigo-700 dark:hover:bg-indigo-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800">
|
|
提交文件
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|
|
|