{{-- 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 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') }}
| Licensee | {{ $h['company'] }} |
@if($h['address'])| Address | {{ $h['address'] }} | @endif
| 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
| Jur. | Name | Total miles | Taxable miles | Taxable gallons | Tax-paid gallons |
Net taxable gallons | Tax rate | Tax (due / − credit) | Surcharge rate | Surcharge | Total due |
@forelse($d['rows'] as $x)
| {{ $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']) }} |
@empty
| No miles in IFTA jurisdictions for this quarter. |
@endforelse
| 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
| Truck | VIN | Plate | IFTA decal | Fleet no. | Odometer from | Odometer to | Trips |
Miles | Gallons | MPG | Miles / gallons by jurisdiction |
@forelse($d['vehicles'] as $x)
| {{ $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 |
@empty
| No trips. |
@endforelse
Supporting schedule — fuel purchases
| Date | Trip | Truck | Seller (fuel stop) | City, state | Fuel | Invoice no. | Odometer |
Gallons | Cost | $/gal | Receipt |
@forelse($d['fuel'] as $x)
| {{ $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 |
@empty
| No fuel stops were recorded on these trips (gallons were typed per state on the trip sheets). |
@endforelse
Supporting schedule — trips (odometer and route of travel)
| Trip | Truck | Driver | Dates | From → To | Odometer start | Odometer end |
Miles | Empty | Gallons | Miles by state | Route of travel |
@forelse($d['trips'] as $x)
| {{ $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'] ?: '—' }} |
@empty
| No trips. |
@endforelse
@isset($receiptPages)
@foreach($receiptPages as $r)
@include('exports.partials.ifta_receipt', ['r' => $r, 'total' => count($receiptPages), 'mode' => 'note'])
@endforeach
@endisset