{{-- Diseño moderno (v3): un estado de cuenta con sus movimientos. Mismos formularios (enlazar, confirmar, revisión, desenlazar) que reconciliation/show. --}} @extends('layout.main') @section('content') @include('reservation._alerts') @php $v3cred = $movements->where('type', 'credito'); $v3ok = $v3cred->where('status', \App\BankMovement::VALIDADA)->count(); $v3free = $v3cred->filter(function ($m) { return !$m->payment_type && $m->status != \App\BankMovement::DUPLICADA; })->count(); @endphp
← Transferencias

Estado de cuenta #{{ $statement->id }} · {{ $statement->file_name }}

{{ $statement->bank }}

{{ \Carbon\Carbon::parse($statement->period_from)->format('d/m/Y') }} – {{ \Carbon\Carbon::parse($statement->period_to)->format('d/m/Y') }} · cargado por {{ $statement->user->name ?? '' }} el {{ $statement->created_at->format('d/m/Y H:i') }}@if($statement->note) · {{ $statement->note }}@endif
{!! Form::open(['route' => ['reconciliation.rematch', $statement->id], 'method' => 'post', 'class' => 'mb-0']) !!} {!! Form::close() !!} {!! Form::open(['route' => ['reconciliation.destroy', $statement->id], 'method' => 'post', 'class' => 'mb-0', 'onsubmit' => "return confirm('¿Eliminar este estado de cuenta y sus movimientos? Las ventas y pagos no cambian.')"]) !!} {!! Form::close() !!}
Movimientos{{ $statement->movements_count }}
Créditos (entradas){{ $v3cred->count() }}${{ number_format($v3cred->sum('amount'), 2) }}
Validados{{ $v3ok }}
Sin enlazar{{ $v3free }}

Movimientos del banco

@foreach($movements as $m) @php $p = $m->payment_type ? ($byKey[$m->payment_type . ':' . $m->payment_id] ?? null) : null; @endphp type == 'debito') style="opacity:.6" @endif> @endforeach
MovimientoMontoEstadoPago del sistemaAcción
{{ \Carbon\Carbon::parse($m->movement_date)->format('d/m/Y') }}
{{ $m->description }}@if($m->reference) · Ref. {{ $m->reference }}@endif
{{ $m->type == 'debito' ? '-' : '' }}${{ number_format($m->amount, 2) }} @if($m->type == 'credito')@include('reconciliation.v3._status', ['status' => $m->status])@if($m->manual)
manual · {{ $m->reviewer->name ?? '' }}
@endif @elsedébito@endif @if($m->note)
{{ $m->note }}
@endif
@if($p){{ $p['label'] }} · {{ $p['customer'] }} · ${{ number_format($p['amount'], 2) }} · {{ \Carbon\Carbon::parse($p['date'])->format('d/m/Y') }}@elseif($m->payment_type){{ $m->payment_type }} #{{ $m->payment_id }}@else—@endif @if($m->type == 'credito' && $m->status != \App\BankMovement::DUPLICADA) @if(!$m->payment_type) {!! Form::open(['route' => ['reconciliation.link', $m->id], 'method' => 'post', 'class' => 'd-flex mb-1', 'style' => 'gap:6px']) !!} {!! Form::close() !!} @elseif($m->status != \App\BankMovement::VALIDADA) {!! Form::open(['route' => ['reconciliation.mark', $m->id], 'method' => 'post', 'class' => 'd-inline']) !!} {!! Form::close() !!} @endif
{!! Form::open(['route' => ['reconciliation.mark', $m->id], 'method' => 'post', 'class' => 'd-inline']) !!} {!! Form::close() !!} @if($m->payment_type || $m->manual) {!! Form::open(['route' => ['reconciliation.mark', $m->id], 'method' => 'post', 'class' => 'd-inline']) !!} {!! Form::close() !!} @endif
@endif

Transferencias del sistema en este período

@include('reconciliation.v3._transfers', ['transfers' => $transfers])
@endsection