@php $d = $breakdown['irs_data']; $components = $breakdown['components']; $method = $breakdown['method']; $suggested = $breakdown['suggested']; $confidence = $breakdown['confidence'] ?? null; $isCcew = in_array($method, ['ccew_institutional_grants_proxy', 'ccew_foreign_no_grants'], true); $currency = $isCcew ? '£' : '$'; $fmt = fn($v) => $v !== null ? $currency . number_format($v) : '—'; $pct = fn($v) => $v !== null ? $v . '%' : '—'; $source = strtoupper((string) ($charity->data_source ?? 'IRS')); $schedule = $source === 'CRA' ? 'Schedule 2' : 'Schedule F'; $form = $source === 'CRA' ? 'T3010' : 'Form 990'; $outside = $source === 'CRA' ? 'outside Canada' : 'outside the U.S.'; $methodCopy = match ($method) { 'schedule_f_expenditures' => 'Foreign expenditures ÷ total revenue. Numerator from ' . $schedule . ' Part I (direct spending ' . $outside . '). Highest-confidence path.', 'schedule_f_assistance' => 'Foreign assistance ÷ total revenue. Numerator from ' . $schedule . ' Parts II + III (grants to foreign orgs and individuals) — used when Part I is empty.', 'ccew_institutional_grants_proxy' => 'CCEW proxy: institutional grants ÷ total revenue. CCEW has no geographic spend breakdown, so this assumes all institutional grants flow to overseas partners. Accurate for relay charities; understates field-office charities.', 'ccew_foreign_no_grants' => "R1 measures throughput to foreign output, and CCEW doesn't publish it for this filing. The single expenditure_charitable_expenditure line merges UK programmes, overseas field offices, and admin with no geographic split. Institutional grants (the one geo-attributable line) are £0, so the standard CCEW proxy cannot run. Program-expense and fundraising-cost ratios are not used as substitutes — AAA §R1(a-b) rejects them as misleading. Per AAA §(d), opacity tends negative → neutral 25/100 (low confidence).", 'foreign_no_amount' => 'The ' . $form . ' filer ticked the ' . $schedule . ' foreign-activity box but reported $0 across Part I (foreign expenditures) and Parts II/III (grants to foreign orgs/individuals). Without a foreign-output dollar amount, R1 has no numerator. Program-expense and fundraising-cost ratios are not used as substitutes — AAA §R1(a-b) rejects them as misleading. Per AAA §(d), opacity tends negative → neutral 25/100 (low confidence).', 'no_foreign_activity' => 'Domestic-only filing: no ' . $schedule . ' filed, no foreign countries listed, no foreign-activity flag. AAA scope is international poverty alleviation, so R1 (foreign-output throughput) does not apply. The 25/100 is a placeholder; the composite renormalizes across R2–R4.', 'not_applicable' => 'R1 not applicable.', default => null, }; $yoy = $d['yoy_change_pct']; $yoySign = $yoy !== null && $yoy >= 0 ? '+' : ''; @endphp
Methodology @if($confidence) {{ strtoupper($confidence) }} confidence @endif
@if($methodCopy)

{{ $methodCopy }}

@endif
Component Breakdown
@foreach($components as $c) @endforeach
Component Max Earned Calculation
{{ $c['label'] }} {{ $c['max'] }} {{ $c['earned'] === null ? 'N/A' : $c['earned'] }} {{ $c['explanation'] }}
Source Financial Data @if(!$isCcew) @endif
Total Revenue (CY) {{ $fmt($d['total_revenue']) }} {{ $d['total_revenue_py'] ? 'PY ' . $fmt($d['total_revenue_py']) : '—' }} @if($yoy !== null) {{ $yoySign }}{{ $yoy }}% @endif
Program Expenses {{ $fmt($d['program_expenses']) }} {{ $pct($d['program_ratio_pct']) }} of expenses
Foreign Expenditures (Sch. F Part I) {{ $fmt($d['foreign_expenditures']) }} {{ $d['schedule_f_filed'] ? 'Primary outflow metric' : '—' }}
Foreign Assistance (Parts II + III) {{ $fmt($d['foreign_assistance_total']) }} Org {{ $fmt($d['foreign_org_assistance']) }} · Indiv {{ $fmt($d['foreign_individual_assistance']) }}
Foreign Outflow Used {{ $fmt($d['foreign_outflow_used']) }} {{ $d['has_foreign_evidence'] ? 'Foreign activity evidence present' : 'No foreign activity evidence' }}
Total Expenses {{ $fmt($d['total_expenses']) }}
Fundraising Expenses {{ $fmt($d['fundraising_expenses']) }} {{ $pct($d['fundraising_ratio_pct']) }} of expenses
Management & General {{ $fmt($d['mgmt_expenses']) }}
Grants Paid {{ $fmt($d['grants_paid']) }}
Salaries {{ $fmt($d['salaries']) }}
Algorithm-suggested score {{ $suggested === null ? 'N/A — R1 omitted' : $suggested }}