@php $last_varience_ltr = 0; $last_pec = 0; @endphp @foreach ($date as $dd) {{-- Opening stock --}} {{-- Purchase --}} {{-- Sales Pump Reading --}} {{-- PEC --}} {{-- Calculated Stock --}} {{-- Physical Dips --}} {{-- Water level tank --}} {{-- Variance in ltr --}} {{-- Variance in % --}} {{-- Cumulative Variance in ltr --}} {{-- Cumulative Sales --}} {{-- Cumulative Variance in % --}} {{-- PEC vs PUMP Variance --}} @php $last_varience_ltr += $varience_ltr; $last_pec += $pec; @endphp @endforeach
{{ trans('cruds.fuelStock.fields.date') }} {{ trans('cruds.fuelStock.fields.opening_stock') }} {{ trans('cruds.fuelStock.fields.purchase') }} {{ trans('cruds.report.manual_sale') }} {{ trans('cruds.fuelStock.fields.computer_sale') }} {{ trans('cruds.fuelStock.fields.calculated_stock') }} {{ trans('cruds.report.dips') }} {{ trans('cruds.fuelStock.fields.water_level') }} {{ trans('cruds.fuelStock.fields.varience') }} {{ trans('cruds.report.varienceper') }} {{ trans('cruds.fuelStock.fields.cumulativeVarience') }} {{ trans('cruds.fuelStock.fields.cumulativeSale') }} {{ trans('cruds.fuelStock.fields.cumulativeSaleLtr') }} {{ trans('cruds.report.pecvspump') }}
{{$dd}} @php $opening_stock = $fuel_stock->where('date',$dd)->first()->opening_stock; @endphp @if ($opening_stock != 0) {{number_format($opening_stock)}} @endif @php $purchase = $fuel_stock->where('date',$dd)->first()->purchase; @endphp @if ($purchase != 0) {{number_format($purchase)}} @endif @php $pump_reading = $drivewaysheet->where('date',$dd)->sum('stock'); @endphp @if ($pump_reading != 0) {{number_format($pump_reading,2)}} @endif @php $pec = $fuel_stock->where('date',$dd)->first()->sale; @endphp @if ($pec != 0) {{number_format($pec,2)}} @endif @php $calculated_stock = $opening_stock + $purchase - $pec; @endphp @if ($calculated_stock != 0) {{number_format($calculated_stock)}} @endif @php $physical_dips = $fuel_stock->where('date',$dd)->first()->closing_dips; @endphp @if ($physical_dips != 0) {{number_format($physical_dips,2)}} @endif @php $water_level = $fuel_stock->where('date',$dd)->first()->water_level; @endphp @if ($water_level != 0) {{number_format($water_level,2)}} @endif @php $varience_ltr = $physical_dips - $calculated_stock; @endphp @if ($varience_ltr != 0) {{number_format($varience_ltr)}} @endif @php $varience_per = ($varience_ltr * 100)/$pec; @endphp @if ($varience_per != 0) {{number_format($varience_per,2)}} @endif @php $cum_varience_ltr = $last_varience_ltr + $varience_ltr; @endphp @if ($cum_varience_ltr != 0) {{number_format($cum_varience_ltr)}} @endif @php $cum_pec_sale = $last_pec + $pec; @endphp @if ($cum_pec_sale != 0) {{number_format($cum_pec_sale)}} @endif @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 @php $pec_vs_pump_reading = $pec - $pump_reading @endphp @if ($pec_vs_pump_reading != 0) {{number_format($pec_vs_pump_reading,2)}} @endif