@php($m = fn (float $monto): string => \App\Danoral\Cobranzas\Cobros\ReciboCobro::formatoMonto($monto)) {{ $recibo->nombreArchivo() }}
RECIBO DE PAGO
Nro. {{ $recibo->numero() }}
Fecha: {{ $recibo->fecha() }}
@php($montos = fn (array $porMoneda): string => implode(' + ', array_map(fn (string $moneda, float $monto): string => $m($monto).' '.$moneda, array_keys($porMoneda), $porMoneda))) @if ($recibo->esMultiInmueble()) @php($edificio = $recibo->edificioUnico()) @if ($edificio)
EDIFICIO {{ $edificio['codE'] }} {{ $edificio['nameE'] }} @if ($edificio['rif']) (RIF {{ $edificio['rif'] }}) @endif
@endif @foreach ($recibo->edificios() as $grupo) @if (! $edificio) @endif @foreach ($grupo['inmuebles'] as $inmueble) @php($cuotasInmueble = $recibo->resumen['porInmueble'][$inmueble['idE']] ?? null) @endforeach @endforeach
INMUEBLE PROPIETARIO CUOTAS PAGADAS
{{ $grupo['codE'] }} {{ $grupo['nameE'] }} @if ($grupo['rif']) (RIF {{ $grupo['rif'] }})@endif
{{ $inmueble['codE'] }} @if ($inmueble['codCliente']) (cliente {{ $inmueble['codCliente'] }}) @endif {{ $inmueble['propietario'] }} @if ($inmueble['emails'])
{{ implode(' · ', $inmueble['emails']) }}@endif
@if ($cuotasInmueble){{ $cuotasInmueble['cuotas'] }}  ·  {{ $montos($cuotasInmueble['montoCuotas']) }}@endif
@else @if ($recibo->edifE) @endif @if ($recibo->aptoE) @php($emailsPropietario = $recibo->emailsDe($recibo->aptoE)) @if ($emailsPropietario) @endif @endif
EDIFICIO {{ $recibo->edifE->codE }} {{ $recibo->edifE->nameE }} @if ($recibo->edifE->RIF_nro) (RIF {{ $recibo->edifE->RIF_nro }}) @endif
INMUEBLE {{ trim($recibo->aptoE->codE) }} @if ($recibo->aptoE->codCliente) (cliente {{ $recibo->aptoE->codCliente }}) @endif
PROPIETARIO {{ $recibo->aptoE->nameE }}
EMAIL {{ implode(' · ', $emailsPropietario) }}
@endif
DETALLE DEL COBRO
@forelse ($recibo->detalles as $d) @if ($d['lineaCFP']) @endif @if ($d['periodo']) @endif @if ($d['resta'] ?? null) @endif @empty @endforelse @foreach ($recibo->totalesPago as $moneda => $total) @endforeach
@if ($d['lineaCFP']['abono'] ?? false)Saldo a favor aplicado  @endif{{ $m($d['lineaCFP']['monto']) }} {{ $d['lineaCFP']['moneda'] }} {{ $d['lineaCFP']['fecha'] }}
@if ($d['periodo']['inmueble'] ?? null){{ $d['periodo']['inmueble'] }} · @endif{{ $d['periodo']['texto'] }} {{ $d['periodo']['gris'] }} @if ($d['periodo']['parte'] ?? null){{ $d['periodo']['parte'] }}@endif
@if ($d['montoItem']){{ $m($d['montoItem']['monto']) }} {{ $d['montoItem']['moneda'] }}@endif @if ($d['montoDT']){{ $m($d['montoDT']['monto']) }} {{ $d['montoDT']['moneda'] }}@endif @if ($d['tasa']){{ $m($d['tasa']['valor']) }} {{ $d['tasa']['fecha'] }}@endif @if ($d['pagado']){{ $m($d['pagado']['monto']) }} {{ $d['pagado']['moneda'] }}@endif
Resta por pagar {{ $m($d['resta']['monto']) }} {{ $d['resta']['moneda'] }}
Sin conceptos registrados.
{{ $m($total) }} {{ $moneda }}
FORMAS DE PAGO
@foreach ($recibo->formasPago as $fp) @endforeach @foreach ($recibo->totalesPago as $moneda => $total) @endforeach
FECHA TIPO MONTO
{{ $fp['fecha'] }} {{ $fp['tipo'] }} @if ($fp['referencia'])
ref {{ $fp['referencia'] }}@endif
{{ $fp['moneda'] }} {{ $m($fp['monto']) }}
TOTAL PAGADO {{ $moneda }} {{ $m($total) }}
@php($r = $recibo->resumen) @if ($r['aplicadoCuotas']) @endif @if ($r['abonoAplicado'] ?? []) @endif @if ($r['abonoACuotas'] ?? []) @endif @if ($r['abono']) @endif @if ($recibo->totalesPago) @endif
RESUMEN
Cuotas pagadas {{ $r['cuotas'] }}@if ($r['montoCuotas'])  ·  {{ $montos($r['montoCuotas']) }}@endif
Aplicado a cuotas {{ $montos($r['aplicadoCuotas']) }}
Saldo a favor aplicado - {{ $montos($r['abonoAplicado']) }}
Abono aplicado a cuotas {{ $montos($r['abonoACuotas']) }}
Saldo a favor (abono)@if ($r['inmuebleAbono']) {{ $r['inmuebleAbono'] }}@endif {{ $montos($r['abono']) }}
TOTAL PAGADO {{ $montos($recibo->totalesPago) }}
Este recibo refleja los pagos registrados por Danoral para el cobro Nro. {{ $recibo->numero() }}.