@extends('layouts.admin') @section('title', '會計收支表') @push('breadcrumb') @endpush @push('styles') @endpush @php $hasOtherText = $transactions->pluck('other_text')->filter()->isNotEmpty(); @endphp @section('content') {{-- 批量下載 ZIP Modal --}} {{-- 年月篩選 --}}
@php $prev = \Carbon\Carbon::create($year, $month ?: 1, 1)->subMonth(); $next = \Carbon\Carbon::create($year, $month ?: 12, 1)->addMonth(); @endphp {{ $month === null ? '上一年' : '上月' }} {{ $month === null ? '下一年' : '下月' }}
{{-- 摘要 --}}
收入 HK$
${{ number_format($totalIncome, 2) }}
支出 HK$
${{ number_format($totalExpense - $totalCnyExpense, 2) }}
支出 - 人民幣
¥{{ number_format($totalCnyExpense, 2) }}
結餘(收入 − 支出HK$)
${{ number_format($totalIncome - ($totalExpense - $totalCnyExpense), 2) }}
{{-- 新增交易 --}}
新增交易
@csrf
@foreach($projects as $p) @endforeach
{{-- 年度概覽(全年模式) --}} @if(! $month)
{{ $year }} 年按月概覽
@foreach($monthlyTotals as $m => $data) @endforeach
月份 收入 HK$ 支出 HK$ 支出 - 人民幣 筆數
{{ $m }} 月 ${{ number_format($data['income'], 2) }} ${{ number_format($data['expense'], 2) }} ¥{{ number_format($data['expense_cny'], 2) }} {{ $data['count'] }} 查看
@endif {{-- 交易明細 --}}
香港信義人力資源有限公司
外勞收支表 · 銀行:012-898-2-0494387 · @if($month){{ $year }} 年 {{ $month }} 月@else{{ $year }} 年 全年@endif ({{ $transactions->count() }} 筆)
@if($hasOtherText) @endif @forelse($transactions as $t) @if($hasOtherText) @endif @empty @endforelse @if($transactions->isNotEmpty()) @if($hasOtherText) @endif @endif
日期 專案 收入 HK$ 支出 HK$ 支出 - 人民幣其它(自訂欄位)備注 文件 操作
{{ $t->transacted_on?->format('Y-m-d') }} {{ $t->project }} {{ $t->typeLabel() }} @if($t->type === 'income'){{ number_format($t->amount, 2) }}@endif @if($t->type === 'expense' && $t->currency !== 'CNY'){{ number_format($t->amount, 2) }}@endif @if($t->type === 'expense' && $t->currency === 'CNY')¥{{ number_format($t->amount, 2) }}@endif {{ $t->other_text }}{{ $t->note }} @if($t->documents->isNotEmpty()) {{ $t->documents->count() }} 份 @else 無 @endif @if(auth()->user()->isAdmin())
@csrf @method('DELETE')
@endif
@if($month) {{ $year }} 年 {{ $month }} 月尚無交易記錄。 @else {{ $year }} 年尚無交易記錄。 @endif
總計 ${{ number_format($totalIncome, 2) }} ${{ number_format($totalExpense - $totalCnyExpense, 2) }} ¥{{ number_format($totalCnyExpense, 2) }}
{{-- 編輯 Modal --}} @foreach($transactions as $t) @endforeach @endsection @push('scripts') @endpush