166 lines
10 KiB
PHP
166 lines
10 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<h2 class="text-xl font-semibold leading-tight text-gray-800">
|
|
銀行調節表
|
|
</h2>
|
|
</x-slot>
|
|
|
|
<div class="py-12">
|
|
<div class="mx-auto max-w-7xl sm:px-6 lg:px-8 space-y-4">
|
|
@if (session('status'))
|
|
<div class="rounded-md bg-green-50 p-4">
|
|
<p class="text-sm font-medium text-green-800">{{ session('status') }}</p>
|
|
</div>
|
|
@endif
|
|
|
|
@if (session('error'))
|
|
<div class="rounded-md bg-red-50 p-4">
|
|
<p class="text-sm font-medium text-red-800">{{ session('error') }}</p>
|
|
</div>
|
|
@endif
|
|
|
|
<!-- Action Button -->
|
|
@can('prepare_bank_reconciliation')
|
|
<div class="flex justify-end">
|
|
<a href="{{ route('admin.bank-reconciliations.create') }}" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
|
|
<svg class="-ml-1 mr-2 h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4" />
|
|
</svg>
|
|
製作調節表
|
|
</a>
|
|
</div>
|
|
@endcan
|
|
|
|
<!-- Filters -->
|
|
<div class="bg-white shadow sm:rounded-lg">
|
|
<div class="px-4 py-5 sm:p-6">
|
|
<form method="GET" action="{{ route('admin.bank-reconciliations.index') }}" class="grid grid-cols-1 gap-4 sm:grid-cols-3">
|
|
<div>
|
|
<label for="reconciliation_status" class="block text-sm font-medium text-gray-700">狀態</label>
|
|
<select name="reconciliation_status" id="reconciliation_status" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm">
|
|
<option value="">全部</option>
|
|
<option value="pending" {{ request('reconciliation_status') == 'pending' ? 'selected' : '' }}>待覆核</option>
|
|
<option value="completed" {{ request('reconciliation_status') == 'completed' ? 'selected' : '' }}>已完成</option>
|
|
<option value="discrepancy" {{ request('reconciliation_status') == 'discrepancy' ? 'selected' : '' }}>有差異</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="month" class="block text-sm font-medium text-gray-700">調節月份</label>
|
|
<input type="month" name="month" id="month" value="{{ request('month') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm">
|
|
</div>
|
|
|
|
<div class="flex items-end">
|
|
<button type="submit" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
|
|
篩選
|
|
</button>
|
|
<a href="{{ route('admin.bank-reconciliations.index') }}" class="ml-2 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
|
|
清除
|
|
</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Reconciliations Table -->
|
|
<div class="bg-white shadow sm:rounded-lg">
|
|
<div class="px-4 py-5 sm:p-6">
|
|
<div class="overflow-x-auto">
|
|
<table class="min-w-full divide-y divide-gray-200">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500">
|
|
調節月份
|
|
</th>
|
|
<th scope="col" class="px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500">
|
|
銀行餘額
|
|
</th>
|
|
<th scope="col" class="px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500">
|
|
帳面餘額
|
|
</th>
|
|
<th scope="col" class="px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500">
|
|
差異金額
|
|
</th>
|
|
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500">
|
|
狀態
|
|
</th>
|
|
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500">
|
|
製表人
|
|
</th>
|
|
<th scope="col" class="px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500">
|
|
<span class="sr-only">操作</span>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-200 bg-white">
|
|
@forelse ($reconciliations as $reconciliation)
|
|
<tr>
|
|
<td class="whitespace-nowrap px-4 py-4 text-sm font-medium text-gray-900">
|
|
{{ $reconciliation->reconciliation_month->format('Y年m月') }}
|
|
</td>
|
|
<td class="whitespace-nowrap px-4 py-4 text-sm text-right text-gray-500">
|
|
NT$ {{ number_format($reconciliation->bank_statement_balance, 2) }}
|
|
</td>
|
|
<td class="whitespace-nowrap px-4 py-4 text-sm text-right text-gray-500">
|
|
NT$ {{ number_format($reconciliation->system_book_balance, 2) }}
|
|
</td>
|
|
<td class="whitespace-nowrap px-4 py-4 text-sm text-right {{ $reconciliation->discrepancy_amount > 0 ? 'text-red-600 font-semibold' : 'text-gray-500' }}">
|
|
NT$ {{ number_format($reconciliation->discrepancy_amount, 2) }}
|
|
</td>
|
|
<td class="whitespace-nowrap px-4 py-4 text-sm">
|
|
<span class="inline-flex rounded-full px-2 text-xs font-semibold leading-5
|
|
@if($reconciliation->reconciliation_status === 'completed') bg-green-100 text-green-800
|
|
@elseif($reconciliation->reconciliation_status === 'discrepancy') bg-red-100 text-red-800
|
|
@else bg-yellow-100 text-yellow-800
|
|
@endif">
|
|
{{ $reconciliation->getStatusText() }}
|
|
</span>
|
|
</td>
|
|
<td class="whitespace-nowrap px-4 py-4 text-sm text-gray-500">
|
|
{{ $reconciliation->preparedByCashier->name ?? 'N/A' }}
|
|
</td>
|
|
<td class="whitespace-nowrap px-4 py-4 text-right text-sm font-medium">
|
|
<a href="{{ route('admin.bank-reconciliations.show', $reconciliation) }}" class="text-indigo-600 hover:text-indigo-900">
|
|
查看
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="7" class="px-4 py-8 text-center text-sm text-gray-500">
|
|
沒有銀行調節表記錄
|
|
</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="mt-4">
|
|
{{ $reconciliations->links() }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Help Info -->
|
|
<div class="bg-blue-50 border border-blue-200 rounded-lg p-4">
|
|
<div class="flex">
|
|
<div class="flex-shrink-0">
|
|
<svg class="h-5 w-5 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
</svg>
|
|
</div>
|
|
<div class="ml-3">
|
|
<h3 class="text-sm font-medium text-blue-800">關於銀行調節表</h3>
|
|
<div class="mt-2 text-sm text-blue-700">
|
|
<p>銀行調節表用於核對銀行對帳單與內部現金簿的差異。建議每月定期製作,以確保帳務正確。</p>
|
|
<p class="mt-1">調節流程:出納製作 → 會計覆核 → 主管核准</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|