@php $formatMoney = $formatMoney ?? static fn ($value, string $currency = 'MXN') => $value !== null && $value !== '' ? '$'.number_format((float) $value, 2).' '.$currency : 'No definido'; $formatPercent = static fn ($value) => $value !== null && $value !== '' ? number_format((float) $value, 2).'%' : 'No definido'; $formatBool = $formatBool ?? static fn ($value) => $value === null ? 'No definido' : ($value ? 'Si' : 'No'); $frequencyLabels = [ 'monthly' => 'Mensual', 'biweekly' => 'Quincenal', 'weekly' => 'Semanal', 'annual' => 'Anual', ]; $downPaymentStrategyLabels = [ 'max' => 'Mayor valor', 'fixed' => 'Monto fijo', 'percentage' => 'Porcentaje', 'percent' => 'Porcentaje', ]; $interestTypeLabels = [ 'annual' => 'Anual', 'monthly' => 'Mensual', 'flat' => 'Fijo', 'simple_total' => 'Total simple', ]; @endphp
payments

Precio & Reglas

@forelse ($loteTypes as $loteType) @php $currency = $loteType['currency'] ?? 'MXN'; $plans = collect($loteType['paymentPlans'] ?? []); @endphp

{{ $loteType['name'] }}

{{ ($loteType['isActive'] ?? true) ? 'Activo' : 'Inactivo' }}
@if (!empty($loteType['pricingNote']))

{{ $loteType['pricingNote'] }}

@endif

Moneda

{{ $currency }}

Precio base m²

{{ $formatMoney($loteType['basePricePerSqm'] ?? null, $currency) }}

Contado m²

{{ $formatMoney($loteType['cashPricePerSqm'] ?? null, $currency) }}

Financiado m²

{{ $formatMoney($loteType['financedPricePerSqm'] ?? null, $currency) }}

@forelse ($plans as $paymentPlan) @php $planCurrency = $paymentPlan['currency'] ?: $currency; @endphp

{{ $paymentPlan['name'] }}

{{ $paymentPlan['financingMonths'] }} meses · {{ $frequencyLabels[$paymentPlan['installmentFrequency'] ?? 'monthly'] ?? ($paymentPlan['installmentFrequency'] ?? 'Mensual') }}

Precio m²

{{ $formatMoney($paymentPlan['pricePerSqm'] ?? null, $planCurrency) }}

Enganche mínimo
{{ $formatMoney($paymentPlan['minDownPaymentAmount'] ?? null, $planCurrency) }} · {{ $formatPercent($paymentPlan['minDownPaymentPercent'] ?? null) }}
Enganche sugerido
{{ $formatMoney($paymentPlan['suggestedDownPaymentAmount'] ?? null, $planCurrency) }} · {{ $formatPercent($paymentPlan['suggestedDownPaymentPercent'] ?? null) }}
Estrategia
{{ $downPaymentStrategyLabels[$paymentPlan['downPaymentStrategy'] ?? 'max'] ?? ($paymentPlan['downPaymentStrategy'] ?? 'No definido') }}
Mensualidades
{{ $paymentPlan['minimumInstallments'] ?? '-' }} / {{ $paymentPlan['defaultInstallments'] ?? '-' }} / {{ $paymentPlan['maximumInstallments'] ?? '-' }}
Interés
{{ $formatBool($paymentPlan['interestFree'] ?? null) === 'Si' ? 'Sin intereses' : $formatPercent($paymentPlan['interestRate'] ?? null).' '.($interestTypeLabels[$paymentPlan['interestType'] ?? 'annual'] ?? '') }}
Descuento máx.
{{ $formatPercent($paymentPlan['maxDiscountPercent'] ?? null) }}
Anualidad
{{ $formatMoney($paymentPlan['annuityAmount'] ?? null, $planCurrency) }}
Penalización
{{ $formatMoney($paymentPlan['earlyPaymentPenalty'] ?? null, $planCurrency) }}
Vigencia
{{ $paymentPlan['effectiveFrom'] ?: 'Sin inicio' }} - {{ $paymentPlan['effectiveTo'] ?: 'Sin fin' }}
@empty
Sin planes configurados para este tipo de lote.
@endforelse
@empty
Sin tipos de lote configurados.
@endforelse