{{$dd}}
|
{{-- Opening stock --}}
@php
$opening_stock = $fuel_stock->where('date',$dd)->sum('opening_stock');
@endphp
@if ($opening_stock != 0)
{{number_format($opening_stock)}}
@endif
|
{{-- Purchase --}}
@php
$purchase = $fuel_stock->where('date',$dd)->sum('purchase');
@endphp
@if ($purchase != 0)
{{number_format($purchase)}}
@endif
|
{{-- Sales Pump Reading --}}
@php
$pump_reading = $drivewaysheet->where('date',$dd)->sum('stock');
@endphp
@if ($pump_reading != 0)
{{number_format($pump_reading,2)}}
@endif
|
{{-- PEC --}}
@php
$pec = $fuel_stock->where('date',$dd)->sum('sale');
@endphp
@if ($pec != 0)
{{number_format($pec,2)}}
@endif
|
{{-- Calculated Stock --}}
@php
$calculated_stock = $opening_stock + $purchase - $pec;
@endphp
@if ($calculated_stock != 0)
{{number_format($calculated_stock)}}
@endif
|
{{-- Physical Dips --}}
@php
$physical_dips = $fuel_stock->where('date',$dd)->sum('closing_dips');
@endphp
@if ($physical_dips != 0)
{{number_format($physical_dips,2)}}
@endif
|
{{-- Water level tank --}}
@php
$water_level = $fuel_stock->where('date',$dd)->sum('water_level');
@endphp
@if ($water_level != 0)
{{number_format($water_level,2)}}
@endif
|
{{-- Variance in ltr --}}
@php
$varience_ltr = $physical_dips - $calculated_stock;
@endphp
@if ($varience_ltr != 0)
{{number_format($varience_ltr)}}
@endif
|
{{-- Variance in % --}}
@php
$varience_per = ($varience_ltr * 100)/$pec;
@endphp
@if ($varience_per != 0)
{{number_format($varience_per,2)}}
@endif
|
{{-- Cumulative Variance in ltr --}}
@php
$cum_varience_ltr = $last_varience_ltr + $varience_ltr;
@endphp
@if ($cum_varience_ltr != 0)
{{number_format($cum_varience_ltr)}}
@endif
|
{{-- Cumulative Sales --}}
@php
$cum_pec_sale = $last_pec + $pec;
@endphp
@if ($cum_pec_sale != 0)
{{number_format($cum_pec_sale)}}
@endif
|
{{-- Cumulative Variance in % --}}
@php
$cum_sal_varience_per = ($cum_varience_ltr * 100) / $cum_pec_sale;
@endphp
@if ($cum_sal_varience_per != 0)
{{number_format($cum_sal_varience_per,2)}}
@endif
|
{{-- PEC vs PUMP Variance --}}
@php
$pec_vs_pump_reading = $pec - $pump_reading
@endphp
@if ($pec_vs_pump_reading != 0)
{{number_format($pec_vs_pump_reading,2)}}
@endif
|
@php
$last_varience_ltr += $varience_ltr;
$last_pec += $pec;
@endphp
@endforeach