@php $byCounter = collect($summary['by_counter']); $undetermined = collect($summary['undetermined']); // 金額は整数で届く(変換で整数にしている)。端数のある金額だけ小数を出す(num_format の既定は小数を切り捨てるため) $money = fn ($amount) => num_format($amount, is_float($amount) ? 2 : 0); @endphp {{-- header --}} @php($breadcrumbs = ['会計用入金データ出力'=>null])
{{-- 一覧(x-list.data)はデータが空だと actions スロットを描画しないので、出力ボタンは見出しの右上に置く。 出力する行が無い月は押せない(URL を直接開いたときは画面へ戻ってメッセージを出す) --}}
{{-- 説明 --}}
対象月の入金を、会計システムに取り込む仕訳データ(Excel)にします。入金内訳1行が仕訳1伝票になります。 入金振替・相殺・合計0円の伝票は出力しません。相手科目を決められない行は、相手科目を空欄にして出力します。
{{-- 対象月 --}}
{{-- 集計 --}} {{ $summary['ym'] }} の集計
{{-- 出力する仕訳 --}}
出力する仕訳
出力する行数 {{ num_format($summary['line_count']) }} 行
売掛金の減少額 {{ $money($summary['receivable_decrease']) }} 円
対象の入金伝票 {{ num_format($summary['voucher_count']) }} 件
相手科目を決められない行 {{ num_format($undetermined->count()) }} 行
{{-- 出力しない内訳(REQ 2.4〜2.6) --}}
出力しない内訳
@foreach($summary['excluded'] as $reason => $excluded) @endforeach
{{ $excluded['label'] }} @isset($excluded['vouchers']) {{ num_format($excluded['vouchers']) }} 伝票({{ num_format($excluded['rows']) }} 行) @else {{ num_format($excluded['rows']) }} 行 @endisset
{{-- 相手科目ごと(銀行口座ごとの入金額を通帳と照らし合わせる) --}}
相手科目ごとの行数・金額
isNotEmpty()) x-init="def()" @endif > @foreach($byCounter as $row) @if($row['key'] === null) @else @endif @endforeach
科目 補助 科目名 補助科目名 行数 金額(借方−貸方)
{{ $row['account'] }} {{ $row['sub'] }}{{ $row['name'] }}{{ $row['name'] }}{{ $row['sub_name'] }} {{ num_format($row['count']) }} {{ $money($row['amount']) }}
合計 {{ num_format($summary['line_count']) }} {{ $money($summary['receivable_decrease']) }}
{{-- 相手科目を決められない行(入金を直す画面を新しいタブで開く。開く権限が無い利用者にはボタンを出さない) --}}
相手科目を決められない行
@if($undetermined->isEmpty())
相手科目を決められない行はありません
@else
@foreach($undetermined as $row) @endforeach
入金日 伝票No 得意先 区分 金額 銀行名 摘要
{{ $row['payment_date'] }} {{ $row['slip_number'] }} {{ $row['customer'] }} {{ $row['type'] }} {{ $money($row['amount']) }} {{ $row['bank_name'] }} {{ $row['note'] }} @if($row['link']) @endif
@endif
{{-- script --}}