Expediente — Arete {{ $sheet['animal']['ear_tag'] }}

@if(!empty($empresa)){{ $empresa }} · @endif Generado: {{ $generated_at }}

Estatus: {{ ucfirst($sheet['animal']['status'] ?? '') }} · {{ $sheet['metrics']['location_label'] ?? '' }}

Último peso
{{ $sheet['metrics']['last_weight_kg'] ?? '—' }} kg
Último GDP
{{ $sheet['metrics']['last_daily_weight_gain'] ?? '—' }} kg/d
Meta GDP efectiva
{{ $sheet['metrics']['effective_min_gdp_kg_per_day'] ?? '—' }} kg/d
Ganancia de peso
{{ $sheet['metrics']['lifetime_weight_gain_kg'] ?? '—' }} kg

Datos generales

Raza{{ $sheet['animal']['breed'] ?? '—' }}
Género{{ ($sheet['animal']['gender'] ?? '') === 'female' ? 'Hembra' : 'Macho' }}
Nacimiento{{ $sheet['animal']['birth_date'] ?? '—' }}
Edad{{ $sheet['metrics']['age_months'] ?? '—' }} meses
Madre{{ $sheet['animal']['mother']['ear_tag'] ?? '—' }}
Notas{{ $sheet['animal']['notes'] ?? '—' }}
@php $p = $sheet['metrics']['profitability'] ?? null; @endphp @if($p)

Dinero invertido y resultado

@if(!empty($p['weight_gain_kg'])) @endif
Alimento (engorda asignado)${{ number_format($p['feed_cost'], 2) }}
Salud${{ number_format($p['health_cost'], 2) }}
Total invertido${{ number_format($p['money_invested'] ?? $p['total_cost'], 2) }}
Ingresos (venta)${{ number_format($p['income'], 2) }}
Utilidad neta ${{ number_format($p['net_profit'], 2) }}
Kg ganados{{ number_format($p['weight_gain_kg'], 2) }}
Costo / kg ganado${{ $p['cost_per_kg_gained'] !== null ? number_format($p['cost_per_kg_gained'], 2) : '—' }}
Utilidad / kg ganado${{ $p['profit_per_kg_gained'] !== null ? number_format($p['profit_per_kg_gained'], 2) : '—' }}
@endif @if(!empty($sheet['weight_records'])) @php $weights = collect($sheet['weight_records'])->sortBy('weighed_at')->values()->all(); $gdpTarget = $sheet['metrics']['development_chart']['target_min_gdp_kg_per_day'] ?? $sheet['metrics']['effective_min_gdp_kg_per_day'] ?? null; @endphp

Desarrollo (pesajes)

@foreach($weights as $row) @endforeach
Fecha Peso kg Ganancia kg GDP kg/día
{{ $row['weighed_at'] }} {{ number_format($row['weight_kg'], 2) }} {{ $row['weight_gain_kg'] !== null ? number_format($row['weight_gain_kg'], 2) : '—' }} @if($row['daily_weight_gain'] !== null && $gdpTarget !== null && $row['daily_weight_gain'] < $gdpTarget) {{ number_format($row['daily_weight_gain'], 2) }} @else {{ $row['daily_weight_gain'] !== null ? number_format($row['daily_weight_gain'], 2) : '—' }} @endif
@endif @if(!empty($sheet['fattening_stints']))

Engorda

@foreach($sheet['fattening_stints'] as $s) @endforeach
LoteEntradaSalidaDíasPeso inicioPeso fin
{{ $s['lot_name'] }}{{ !empty($s['is_active']) ? ' (actual)' : '' }} {{ $s['entry_date'] }} {{ $s['exit_date'] ?? '—' }} {{ $s['days_in_confinement'] }} {{ $s['entry_weight_kg'] }} {{ $s['exit_weight_kg'] ?? '—' }}
@endif @if(!empty($sheet['health_events']))

Salud

@foreach(array_slice($sheet['health_events'], 0, 15) as $h) @endforeach
FechaTipoConceptoCosto
{{ $h['event_date'] }} {{ $h['event_type'] }} {{ $h['title'] }} {{ $h['cost'] !== null ? '$'.number_format($h['cost'], 2) : '—' }}
@endif @if(!empty($sheet['location_movements']))

Movimientos (últimos 10)

@foreach(array_slice($sheet['location_movements'], 0, 10) as $m) @endforeach
FechaMotivoDesdeHacia
{{ $m['moved_at'] }} {{ $m['reason_label'] ?? $m['reason'] }} {{ $m['from_label'] ?? '—' }} {{ $m['to_label'] ?? '—' }}
@endif