{{-- IFTA return export (IftaReturnController): the quarter laid out like the IFTA return + supporting schedules. $receiptPages is set only when receipts are added to this same document (no pdfunite on the server). --}} @php $h = $d['header']; $dt = fn ($v) => \App\Http\Controllers\Api\Reports\IftaReturnController::date($v); $n = fn ($v, $dec = 0) => $v === null || $v === '' ? '—' : number_format((float) $v, $dec); $money = fn ($v) => $v === null ? '—' : ((float) $v < 0 ? '−$'.number_format(abs((float) $v), 2) : '$'.number_format((float) $v, 2)); $t = $d['totals']; @endphp
IFTA {{ $d['quarter'] }} · {{ $h['company'] }} · supporting report from {{ config('app.name') }} trip sheets — not an official IFTA return

IFTA Quarterly Return — {{ $d['quarter'] }}

{{ $dt($h['from']) }} – {{ $dt($h['to']) }} · return due {{ $dt($h['due']) }} · generated {{ \Illuminate\Support\Carbon::parse($h['generated'])->format('m/d/Y g:i A') }}
@if($h['address'])@endif
Licensee{{ $h['company'] }}
Address{{ $h['address'] }}
IFTA account no.@if($h['ifta_account']){{ $h['ifta_account'] }}@elseNot set — add it in Company Profile@endif
Base jurisdiction{{ $h['base_state'] ?: '—' }}
USDOT / MC{{ $h['usdot'] ?: '—' }} / {{ $h['mc'] ?: '—' }}
Fuel type{{ $h['fuel_type'] }}
Trips counted{{ $h['statuses'] }} trips of IFTA-qualified trucks{{ $h['filters'] ? ' · '.$h['filters'] : '' }}
Total miles{{ $n($h['miles']) }} Total gallons{{ $n($h['gallons']) }} Fleet MPG{{ $h['mpg'] !== null ? number_format($h['mpg'], 2) : '—' }}

Vehicles{{ $h['vehicles'] }} Trips{{ $h['trips'] }} Net tax due (− = credit){{ $money($t['total_due']) }}

Schedule — tax by jurisdiction

@forelse($d['rows'] as $x) @empty @endforelse
Jur.NameTotal milesTaxable milesTaxable gallonsTax-paid gallons Net taxable gallonsTax rateTax (due / − credit)Surcharge rateSurchargeTotal due
{{ $x['code'] }}{{ $x['name'] }}{{ $n($x['total_miles']) }}{{ $n($x['taxable_miles']) }} {{ $n($x['taxable_gallons']) }}{{ $n($x['tax_paid_gallons']) }}{{ $n($x['net_taxable_gallons']) }} @if($x['rate'] !== null){{ number_format($x['rate'], 4) }}@elseno rate@endif {{ $money($x['tax']) }}{{ $x['surcharge_rate'] !== null ? number_format($x['surcharge_rate'], 4) : '—' }} {{ $x['surcharge'] !== null ? $money($x['surcharge']) : '—' }}{{ $money($x['total_due']) }}
No miles in IFTA jurisdictions for this quarter.
TOTAL{{ $n($t['total_miles']) }}{{ $n($t['taxable_miles']) }}{{ $n($t['taxable_gallons']) }} {{ $n($t['tax_paid_gallons']) }}{{ $n($t['net_taxable_gallons']) }}{{ $money($t['tax']) }} {{ $money($t['surcharge']) }}{{ $money($t['total_due']) }}
@if($d['other'])
Non-IFTA jurisdictions (in total miles only): @foreach($d['other'] as $x){{ $x['code'] }} {{ $n($x['miles']) }} mi{{ $loop->last ? '' : ' · ' }}@endforeach
@endif
@if($d['missing_rates'])
No tax rate entered for {{ implode(', ', $d['missing_rates']) }} — their tax is not counted (Super Admin → IFTA Tax Rates).
@endif @foreach($d['notices'] as $note)
{{ $note['text'] }}
@endforeach
Taxable gallons = taxable miles ÷ fleet MPG (whole gallons). Interest is not included — it applies only when a return is filed or paid late. Check the figures against the official IFTA tax matrix before filing.

Supporting schedule — miles by vehicle and jurisdiction

@forelse($d['vehicles'] as $x) @empty @endforelse
TruckVINPlateIFTA decalFleet no.Odometer fromOdometer toTrips MilesGallonsMPGMiles / gallons by jurisdiction
{{ $x['truck_no'] }}{{ $x['vin'] ?: '—' }}{{ $x['plate'] ?: '—' }}{{ $x['decal'] ?: '—' }}{{ $x['fleet_no'] ?: '—' }} {{ $n($x['odometer_from']) }}{{ $n($x['odometer_to']) }}{{ $x['trips'] }} {{ $n($x['miles']) }}{{ $n($x['gallons']) }}{{ $x['mpg'] !== null ? number_format($x['mpg'], 2) : '—' }} @foreach($x['states'] as $s){{ $s['code'] }} {{ $n($s['miles']) }} mi / {{ $n($s['gallons']) }} gal{{ $loop->last ? '' : ' · ' }}@endforeach
No trips.

Supporting schedule — fuel purchases

@forelse($d['fuel'] as $x) @empty @endforelse
DateTripTruckSeller (fuel stop)City, stateFuelInvoice no.Odometer GallonsCost$/galReceipt
{{ $dt($x['date']) }}{{ $x['trip_no'] }}{{ $x['truck_no'] }}{{ $x['seller'] }}{{ trim(($x['city'] ?? '').', '.($x['state'] ?? ''), ', ') }} {{ ucfirst((string) $x['fuel_type']) }}{{ $x['ifta'] ? '' : ' (not IFTA)' }}{{ $x['invoice'] ?: '—' }}{{ $n($x['odometer']) }} {{ $n($x['gallons'], 1) }}{{ $money($x['cost']) }}{{ $x['price'] !== null ? number_format($x['price'], 3) : '—' }} @if($x['receipt_files'])#{{ implode(', #', array_map(fn ($f) => (int) substr($f, 0, 3), $x['receipt_files'])) }}@elsenone@endif
No fuel stops were recorded on these trips (gallons were typed per state on the trip sheets).

Supporting schedule — trips (odometer and route of travel)

@forelse($d['trips'] as $x) @empty @endforelse
TripTruckDriverDatesFrom → ToOdometer startOdometer end MilesEmptyGallonsMiles by stateRoute of travel
{{ $x['trip_no'] }}{{ $x['truck_no'] }}{{ $x['driver'] ?: '—' }}{{ $dt($x['start']) }}{{ $x['end'] && $x['end'] !== $x['start'] ? ' – '.$dt($x['end']) : '' }} {{ $x['from'] ?: '—' }} → {{ $x['to'] ?: '—' }}{{ $n($x['odometer_start']) }}{{ $n($x['odometer_end']) }} {{ $n($x['miles']) }}{{ $n($x['empty_miles']) }}{{ $n($x['gallons'], 1) }}{{ $x['states'] }}{{ $x['route'] ?: '—' }}
No trips.
@isset($receiptPages) @foreach($receiptPages as $r)
@include('exports.partials.ifta_receipt', ['r' => $r, 'total' => count($receiptPages), 'mode' => 'note'])
@endforeach @endisset