Monthly Report

{{ date('F') }} Rebates
${{ number_format($rowa['Total'], 2) }}
{{ date('F', strtotime('-1 month')) }} Rebates
${{ number_format($rowaP['Total'], 2) }}
YTD Rebates
${{ number_format($ytd_rebate['Total'], 2) }}
Lifetime Rebates
${{ number_format($lifetime_rebate['Total'], 2) }}
Total Gallons
${{ number_format($totalGallons, 2) }}
Total In-Network Gallons
${{ number_format($In_Network_Gallons->TotalGallons, 2) }}
Total Out-Network Gallons
${{ number_format($Out_Network_Gallons->TotalGallons, 2) }}
Average Savings
${{ !empty($In_Network_Gallons->TotalGallons) ? number_format($In_Network_Gallons->TotalRebate / $In_Network_Gallons->TotalGallons, 2) : '0.00' }}
In-Network Gallons
Transactions {{ number_format($In_Network_Gallons->Total) }}
Gallons {{ number_format($In_Network_Gallons->TotalGallons, 2) }}
Charges ${{ number_format($In_Network_Gallons->TotalCharges, 2) }}
Avg Retail ${{ number_format($In_Network_Gallons->AvgPrice, 2) }}
Total Rebates ${{ number_format($In_Network_Gallons->TotalRebate, 2) }}
Avg Savings ${{ !empty($In_Network_Gallons->TotalGallons) ? number_format($In_Network_Gallons->TotalRebate / $In_Network_Gallons->TotalGallons, 3) : '0.000' }}
Out-Network Gallons
Transactions {{ $Out_Network_Gallons->Total }}
Gallons {{ number_format($Out_Network_Gallons->TotalGallons, 2) }}
Charges ${{ number_format($Out_Network_Gallons->TotalCharges, 2) }}
Avg Retail ${{ number_format($Out_Network_GallonsNew->AvgPrice, 2) }}
Total Rebates ${{ number_format($Out_Network_Gallons->TotalRebate, 2) }}
Avg Savings ${{ !empty($Out_Network_Gallons->TotalGallons) ? number_format($Out_Network_Gallons->TotalRebate / $Out_Network_Gallons->TotalGallons, 3) : '0.000' }}
In-Network Pilot Gallons
Transactions {{ $Pilot_Gallons->Total }}
Gallons {{ number_format($Pilot_Gallons->TotalGallons, 2) }}
Charges ${{ number_format($Pilot_Gallons->TotalCharges, 2) }}
Avg Retail ${{ number_format($Pilot_Gallons->AvgPrice, 2) }}
Total Rebates ${{ number_format($Pilot_Gallons->TotalRebate, 2) }}
Avg Savings ${{ !empty($Pilot_Gallons->TotalGallons) ? number_format($Pilot_Gallons->TotalRebate / $Pilot_Gallons->TotalGallons, 3) : '0.000' }}
TA Gallons
Transactions {{ number_format($TA_Gallons->Total) }}
Gallons {{ number_format($TA_Gallons->TotalGallons, 2) }}
Charges ${{ number_format($TA_Gallons->TotalCharges, 2) }}
Avg Retail ${{ number_format($TA_Gallons->AvgPrice, 2) }}
Total Rebates ${{ number_format($TA_Gallons->TotalRebate, 2) }}
Avg Savings ${{ !empty($TA_Gallons->TotalGallons) ? number_format($TA_Gallons->TotalRebate / $TA_Gallons->TotalGallons, 3) : '0.000' }}
Out-Network Loves Gallons
Transactions {{ number_format($Loves_Gallons->Total) }}
Gallons {{ number_format($Loves_Gallons->TotalGallons, 2) }}
Charges ${{ number_format($Loves_Gallons->TotalCharges, 2) }}
Avg Retail ${{ number_format($Loves_Gallons->AvgPrice, 2) }}
Total Rebates ${{ number_format($Loves_Gallons->TotalRebate, 2) }}
Avg Savings ${{ !empty($Loves_Gallons->TotalGallons) ? number_format($Loves_Gallons->TotalRebate / $Loves_Gallons->TotalGallons, 3) : '0.000' }}
Out-Network Pilot One9 & Express Gallons
Transactions {{ number_format($One9_and_Express_Gallons->Total) }}
Gallons {{ number_format($One9_and_Express_Gallons->TotalGallons, 2) }}
Charges ${{ number_format($One9_and_Express_Gallons->TotalCharges, 2) }}
Avg Retail ${{ number_format($One9_and_Express_Gallons->AvgPrice, 2) }}
Total Rebates ${{ number_format($One9_and_Express_Gallons->TotalRebate, 2) }}
Avg Savings ${{ !empty($One9_and_Express_Gallons->TotalGallons) ? number_format($One9_and_Express_Gallons->TotalRebate / $One9_and_Express_Gallons->TotalGallons, 3) : '0.000' }}

Gallon

{{-- Left side: Chart --}} {{-- Right side: Table --}}
Gallons Chart
@foreach($gallonsDataTable as $index => $totalGallonsHead) @if($index != 'Total') @endif @endforeach @foreach($gallonsDataTable as $index => $totalGallonsHead) @if($index == 'Total') @endif @endforeach
Category Gallons
{{ $index }} @if(!empty($totalGallonsHead)) {{ number_format($totalGallonsHead,2) }} @else {{ $totalGallonsHead }} @endif
{{ $index }} {{ $totalGallonsHead }}

Pilot/FJ Gallons by State {{ date('m/d/Y',strtotime($start))}} - {{ date('m/d/Y',strtotime($end))}}

@if($Pilot_FJ_Gallons_by_StateTable && count($Pilot_FJ_Gallons_by_StateTable) > 0) @foreach($Pilot_FJ_Gallons_by_StateTable as $pfgbst) @endforeach @else @endif
State Total TotalGallons TotalCharges AvgPrice TotalRebate
{{ $pfgbst->State }} {{ $pfgbst->Total }} {{ number_format($pfgbst->TotalGallons, 2) }} ${{ number_format($pfgbst->TotalCharges, 2) }} {{ number_format($pfgbst->AvgPrice, 2) }} ${{ number_format($pfgbst->TotalRebate, 2) }}
No data available
Total {{ $Pilot_FJ_Gallons_by_StateTable->sum('Total') }} {{ number_format($Pilot_FJ_Gallons_by_StateTable->sum('TotalGallons'), 2) }} ${{ number_format($Pilot_FJ_Gallons_by_StateTable->sum('TotalCharges'), 2) }} @if($Pilot_FJ_Gallons_by_StateTable->sum('TotalGallons') > 0) {{ number_format($Pilot_FJ_Gallons_by_StateTable->sum('TotalCharges') / $Pilot_FJ_Gallons_by_StateTable->sum('TotalGallons'), 2) }} @else 0.00 @endif ${{ number_format($Pilot_FJ_Gallons_by_StateTable->sum('TotalRebate'), 2) }}

TA/Petro Gallons by State {{ date('m/d/Y',strtotime($start))}} - {{ date('m/d/Y',strtotime($end))}}

@if($TA_petro_Gallons_by_StateTable && count($TA_petro_Gallons_by_StateTable) > 0) @foreach($TA_petro_Gallons_by_StateTable as $pfgbst) @endforeach @else @endif
State Total TotalGallons TotalCharges AvgPrice TotalRebate
{{ $pfgbst->State }} {{ $pfgbst->Total }} {{ number_format($pfgbst->TotalGallons, 2) }} ${{ number_format($pfgbst->TotalCharges, 2) }} {{ number_format($pfgbst->AvgPrice, 2) }} ${{ number_format($pfgbst->TotalRebate, 2) }}
No data available
Total {{ $TA_petro_Gallons_by_StateTable->sum('Total') }} {{ number_format($TA_petro_Gallons_by_StateTable->sum('TotalGallons'), 2) }} ${{ number_format($TA_petro_Gallons_by_StateTable->sum('TotalCharges'), 2) }} @if($TA_petro_Gallons_by_StateTable->sum('TotalGallons') > 0) {{ number_format($TA_petro_Gallons_by_StateTable->sum('TotalCharges') / $TA_petro_Gallons_by_StateTable->sum('TotalGallons'), 2) }} @else 0.00 @endif ${{ number_format($TA_petro_Gallons_by_StateTable->sum('TotalRebate'), 2) }}

Loves Gallons by State {{ date('m/d/Y',strtotime($start))}} - {{ date('m/d/Y',strtotime($end))}}

@if($loves_Gallons_by_StateTable && count($loves_Gallons_by_StateTable) > 0) @foreach($loves_Gallons_by_StateTable as $pfgbst) @endforeach @else @endif
State Total TotalGallons TotalCharges AvgPrice TotalRebate
{{ $pfgbst->State }} {{ $pfgbst->Total }} {{ number_format($pfgbst->TotalGallons, 2) }} ${{ number_format($pfgbst->TotalCharges, 2) }} {{ number_format($pfgbst->AvgPrice, 2) }} ${{ number_format($pfgbst->TotalRebate, 2) }}
No data available
Total {{ $loves_Gallons_by_StateTable->sum('Total') }} {{ number_format($loves_Gallons_by_StateTable->sum('TotalGallons'), 2) }} ${{ number_format($loves_Gallons_by_StateTable->sum('TotalCharges'), 2) }} @if($loves_Gallons_by_StateTable->sum('TotalGallons') > 0) {{ number_format($loves_Gallons_by_StateTable->sum('AvgPrice') / count($loves_Gallons_by_StateTable), 2) }} @else 0.00 @endif ${{ number_format($loves_Gallons_by_StateTable->sum('TotalRebate'), 2) }}

Out of Network Gallons by State {{ date('m/d/Y',strtotime($start))}} - {{ date('m/d/Y',strtotime($end))}}

@php $totalQty = 0; $totalQty1 = 0; $totalAmount = 0; $count = count($out_of_network_gallon_finalQuery); $avgRate = $count > 0 ? ($out_of_network_gallon_finalQuery->sum('QTY')*$out_of_network_gallon_finalQuery->sum('RATE')) / $out_of_network_gallon_finalQuery->sum('QTY') : 0; $totalQty = $out_of_network_gallon_finalQuery->sum('QTY'); $totalWeightedRate = $out_of_network_gallon_finalQuery->sum(function ($row) { return $row->QTY * $row->RATE; }); $avgRate = $totalQty > 0 ? $totalWeightedRate / $totalQty : 0; @endphp @if($out_of_network_gallon_finalQuery && !$out_of_network_gallon_finalQuery->isEmpty()) @foreach($out_of_network_gallon_finalQuery as $pfgbst) @php $totalQty1 += $pfgbst->QTY; $totalAmount += (($pfgbst->QTY*$pfgbst->RATE)); @endphp @endforeach @else @endif
DATE UNIT CARD # LOCATION ITEM RETAIL QTY AMOUNT
{{ \Carbon\Carbon::parse($pfgbst->TRANS_DATE)->format('m/d/Y') }} {{ $pfgbst->UNIT }} {{ $pfgbst->CARD_NUM }} {{ $pfgbst->LOCATION }} {{ $pfgbst->PRODUCT_CODE }} {{ number_format($pfgbst->RATE, 2) }} {{ number_format($pfgbst->QTY, 2) }} ${{ number_format(($pfgbst->QTY*$pfgbst->RATE), 2) }}
No data available
Total {{ number_format($avgRate, 2) }} {{ number_format($totalQty1, 2) }} ${{ number_format($totalAmount, 2) }}

Out Of Network - Pilot One9 and Express Gallons Details {{ date('m/d/Y',strtotime($start))}} - {{ date('m/d/Y',strtotime($end))}}

@if($out_of_network_pilot_one9_exp_gallon_finalQuery && !$out_of_network_pilot_one9_exp_gallon_finalQuery->isEmpty()) @foreach($out_of_network_pilot_one9_exp_gallon_finalQuery as $row) @endforeach @else @endif
Card Date Invoice Unit Driver Location City State Fee Code Quantity Retail Amount
{{ $row->{'Card Number'} }} {{ \Carbon\Carbon::parse($row->{'Transaction Date'})->format('m/d/Y') }} {{ $row->{'Invoice'} }} {{ $row->{'Unit'} }} {{ $row->{'Driver Name'} }} {{ $row->{'Location Name'} }} {{ $row->{'Location City'} }} {{ $row->{'Location State/Province'} }} {{ $row->{'Transaction Fee'} }} {{ $row->{'Product Code'} }} {{ $row->{'Quantity'} }} {{ $row->{'Retail_PPU'} }} {{ $row->{'Amount'} }}
No data available

Monthly Gallons

@foreach($YearlyGallonDatatableData as $row) @endforeach
Month Total Gallons In-Network Out-of-Network Rebate Avg Rate
{{ date('F', strtotime(date('Y') . '-' . $row->month_num . '-01')) }} {{ number_format($row->total_gallons, 2) }} {{ number_format($row->in_network, 2) }} {{ number_format($row->out_of_net, 2) }} {{ number_format($row->rebate, 2) }} {{ number_format($row->avg_rate, 3) }}
Total {{ number_format($YearlyGallontotalGallons, 2) }} {{ number_format($YearlyGallontotalInNetwork, 2) }} {{ number_format($YearlyGallontotalOutNetwork, 2) }} {{ number_format($YearlyGallontotalRebate, 2) }}

Gallons By State {{ date('m/d/Y',strtotime($start))}} - {{ date('m/d/Y',strtotime($end))}}

{{-- Left side: Chart --}} {{-- Right side: Table --}}
Gallons By State Map
@forelse($gallonsByStateMapTable as $row) @empty @endforelse
STATE GALLONS RANGE AVG RATE
{{ $row->state }} {{ number_format($row->gallons, 2) }} {{ \Carbon\Carbon::parse($start)->format('m/d/Y') }} - {{ \Carbon\Carbon::parse($end)->format('m/d/Y') }} {{ number_format($row->AvgPrice, 2) }}
No data available
Total {{ number_format($gallonsByStateMapTabletotalGallons, 2) }}

Gallons By Store {{ date('m/d/Y',strtotime($start))}} - {{ date('m/d/Y',strtotime($end))}}

{{-- Left side: Chart --}} {{-- Right side: Table --}}
Gallons By State Map
@forelse($gallonsByStoreMapTable as $row) @empty @endforelse
COUNT LOCATION QTY AVG RATE AVG REBATE
{{ $row->totalCount }} {{ $row->LOCATION }} {{ number_format($row->totalGallons, 2) }} {{ number_format($row->avgRate, 2) }} {{ number_format($row->avgRebate, 2) }}
No data available
Total {{ number_format($gallonsByStoreMapTabletotalGallons, 2) }} {{ number_format($gallonsByStoreMapTabletotalAvgRate, 2) }} {{ number_format($gallonsByStoreMapTabletotalAvgRebate, 2) }}

Gallons By Out Of Network Store {{ date('m/d/Y',strtotime($start))}} - {{ date('m/d/Y',strtotime($end))}}

{{-- Left side: Chart --}} {{-- Right side: Table --}}
Gallons By State Map
@forelse($gallonsByStoreMapOutOfNetworkTable as $row) @empty @endforelse
COUNT LOCATION QTY AVG RATE AVG REBATE
{{ $row->totalCount }} {{ $row->LOCATION }} {{ number_format($row->totalGallons, 2) }} {{ number_format($row->avgRate, 2) }} {{ number_format($row->avgRebate, 2) }}
No data available
Total {{ number_format($gallonsByStoreMapOutOfNetworktotalGallons, 2) }} {{ number_format($gallonsByStoreMapOutOfNetworktotalAvgRate, 2) }} {{ number_format($gallonsByStoreMapOutOfNetworktotalAvgRebate, 2) }}
{{-- Left side: Chart --}} {{-- Right side: Table --}}

Gallons by Day {{ date('m/d/Y',strtotime($start))}} - {{ date('m/d/Y',strtotime($end))}}

Gallons By State Map

Gallons per Chain {{ date('m/d/Y',strtotime($start))}} - {{ date('m/d/Y',strtotime($end))}}

Gallons By State Map
{{-- Left side: Chart --}} {{-- Right side: Table --}}

In-Network Gallons {{ date('m/d/Y',strtotime($start))}} - {{ date('m/d/Y',strtotime($end))}}

Gallons By State Map

Out-Network Gallons {{ date('m/d/Y',strtotime($start))}} - {{ date('m/d/Y',strtotime($end))}}

Gallons By State Map
{{-- Left side: Chart --}} {{-- Right side: Table if you need to add total gallon chart need to remove d-none from the main blade file --}} {{-- comment over for total gallon --}}

In-Network Gallons By Month ({{ $startByMonth->format('F Y') }} - {{ $endByMonth->format('F Y') }})

Gallons By State Map

Total Gallons By Month ({{ $startByMonth->format('F Y') }} - {{ $endByMonth->format('F Y') }})

Gallons By State Map

Out-Network Gallons By Month ({{ $startByMonth->format('F Y') }} - {{ $endByMonth->format('F Y') }})

Gallons By State Map
{{-- @dd('test'); --}}