@php($statusInfo = $this->getMatchingStatusInfo()) @php($isNoMatching = $this->isNoMatchingType()) @php($matchedTotal = $this->getMatchedTotal()) @php($difference = $this->getDifference())
{{-- ローディング表示 --}} @if($isLoading)
@else {{-- 選択されていない場合 --}} @if($selectedBreakdownIndex === null)

{{ $isAllocation ? '振分行' : '内訳行' }}の消込ボタンをクリックしてください

@else {{-- 消込不要区分の場合 --}} @if($isNoMatching)
{{ $statusInfo['icon'] }}

{{ $statusInfo['label'] }}

この入金区分は消込不要です

@else {{-- 金額サマリー --}}
{{ $isAllocation ? '振分金額' : '入金額' }}
{{ num_format($breakdownAmount) }}
消込合計
{{ num_format($matchedTotal) }}
差額
{{ num_format($difference) }}
{{-- ステータス表示 --}}
{{ $statusInfo['icon'] }} {{ $statusInfo['label'] }} @if($difference < 0) (過入金) @elseif($difference > 0) (未消込残) @endif
{{-- 過入金メッセージ --}} @if($difference < 0)
過入金です。差額 {{ num_format(abs($difference)) }}円 は前受金として処理してください。
@endif {{-- 操作ボタン --}} @php($canAutoMatch = $breakdownAmount > 0 && count($billingCandidates) > 0)
@if(count($matchings) > 0) @endif
{{-- 消込候補一覧 --}} @if(count($billingCandidates) > 0)

消込候補

@foreach($billingCandidates as $candidate) @php($billingId = $candidate['billing_id']) @php($remainingAmount = (float)($candidate['remaining_amount'] ?? 0)) @php($currentAmount = (float)($matchingAmounts[$billingId] ?? 0))
{{ $candidate['billing_number'] ?? '-' }}
{{ $candidate['billing_date'] ?? '-' }}
未消込残高
{{ num_format($remainingAmount) }}
@if(!empty($candidate['customer_name']))
{{ $candidate['customer_name'] }}
@endif
@if($currentAmount > $remainingAmount)
上限超過
@endif
@endforeach
@else

消込可能な請求がありません

@endif {{-- 既存消込情報(候補がない場合) --}} @if(count($matchings) > 0 && count($billingCandidates) === 0)

登録済み消込

@foreach($matchings as $matching)
請求ID: {{ $matching['billing_id'] ?? '-' }} {{ num_format($matching['matched_amount'] ?? 0) }}円
@endforeach
@endif @endif @endif @endif