@php($isShow = ($mode ?? 'create') === 'show') @php($hasAllocations = !empty($allocations))
{{-- セクションヘッダー(ボタン類) --}} @if(!$isShow && $hasAllocations)
@endif @if(!$hasAllocations) {{-- 得意先未選択時のメッセージ --}}
入金得意先を選択すると、振分候補が表示されます
@else {{-- 振分テーブル --}} {{-- No --}} {{-- コード --}} {{-- 得意先名(残りスペース使用) --}} {{-- 請求残高(億単位対応) --}} {{-- 振分金額 --}} @foreach($allocations as $index => $row) @php($rowKey = 'modal-alloc-' . $index . '-' . ($row['customer_id'] ?? '0')) @php($totalRemaining = $row['total_remaining'] ?? 0) {{-- No --}} {{-- 得意先コード --}} {{-- 得意先名 --}} {{-- 売掛残高 --}} {{-- 振分金額 --}} @endforeach
No コード 得意先名 請求残高 振分金額
{{ $index + 1 }} {{ $row['customer_code'] ?? '' }} {{ $row['customer_name'] ?? '' }} @if($totalRemaining > 0) {{ num_format($totalRemaining) }} @else - @endif @if($isShow) @else @endif
振分合計 {{ num_format($allocationTotal) }}
差額 (入金合計 - 振分合計) @if($isBalanced) 0 @else {{ num_format($difference) }} @endif
@endif