@extends('layouts.admin') @section('content')
@include('partials.drivewayPartial')
{{ trans('global.show') }} {{ trans('cruds.drivewaySheet.title') }}
@php $sum = []; $mechanical = []; $fuelsale = 0; @endphp @foreach($fuels as $key => $fuel) @endforeach @foreach($drivesheet as $key => $data) @php $fuelsale = $fuelsale + $data->stock_value; @endphp @foreach($fuels as $id => $fuel) @endforeach @endforeach @if(count($drivesheet) > 0) @foreach($fuels as $id => $fuel) @php $sale[$id] = count($fuelstock) > 0 && !empty($fuelstock->where('fuel_type',$id)->first()) ? $fuelstock->where('fuel_type',$id)->first()->sale : 0; @endphp @endforeach @foreach($fuels as $id => $fuel) @php $sum[$id] = $drivesheet->where('fuel_id',$id)->sum('stock'); @endphp @endforeach @foreach($fuels as $id => $fuel) @php $selling_price = $fuelprices->where('fuel_id',$id)->first(); $price = $selling_price ? $selling_price->selling_price : '0'; $mechanical[$id] = $sum[$id] * (float) $price; @endphp @endforeach @foreach($fuels as $id => $fuel) @php $diff[$id] = $sum[$id] - $sale[$id]; @endphp @endforeach @endif
{{ trans('cruds.pump.fields.pump') }} {{ trans('cruds.drivewaySheet.fields.opening') }} {{ trans('cruds.drivewaySheet.fields.closing') }}{{ $fuel }}{{ trans('global.total') }} {{ trans('cruds.report.fuelSale') }}
{{$data->pump->pump}} {{number_format($data->opening_balance,2)}} {{number_format($data->closing_balance,2)}} @if($data->fuel_id == $id) {{number_format($data->stock,2)}} @endif {{number_format($data->stock_value,2)}}
{{ trans('cruds.report.computerSale') }}{{number_format($sale[$id],2)}}{{number_format(array_sum($sale),2)}} {{number_format($fuelsale,2)}}
{{ trans('cruds.report.mechanicalSale') }} {{ trans('cruds.report.inLtr') }}{{number_format($sum[$id],2)}}{{number_format(array_sum($sum),2)}}
{{ trans('cruds.report.mechanicalValue') }}{{number_format($mechanical[$id],2)}}{{number_format(array_sum($mechanical),2)}}
{{ trans('cruds.report.difference') }} {{ trans('cruds.report.inLtr') }}{{number_format($diff[$id],2)}}{{number_format(array_sum($sum) - array_sum($sale),2)}}
{{ trans('cruds.fuelStock.title_singular') }} {{ trans('cruds.fuelStock.fields.control') }}
@php $opening_stock = 0; $purchase = 0; $cal_stock = 0; $less_sale = 0; $closing_dips = 0; $closing_stock = 0; @endphp @foreach($fuelstock as $key => $data) @php $l_sale = $drivesheet->where('fuel_id',$data->fuel_type)->sum('stock'); $clos_stock = $data->stock - $l_sale; $opening_stock += $data->opening_stock; $purchase += $data->purchase; $cal_stock += $data->stock; $less_sale += $l_sale; $closing_dips += $data->closing_dips; $closing_stock += $clos_stock; @endphp @endforeach @if(count($drivesheet) > 0 && count($fuelstock) > 0) @endif
Fuel {{ trans('cruds.fuelStock.fields.opening_stock') }} {{ trans('cruds.fuelStock.fields.purchase') }} {{ trans('cruds.fuelStock.fields.calculated_stock') }} {{ trans('cruds.report.lessSale') }} {{ trans('cruds.fuelStock.fields.closing_stock') }} {{ trans('cruds.fuelStock.fields.closing_dips') }} {{ trans('cruds.report.difference') }}
{{$data->fuel->fuel_name}} {{number_format($data->opening_stock,2)}} {{number_format($data->purchase,2)}} {{number_format($data->stock,2)}} {{number_format($l_sale,2)}} {{number_format($clos_stock,2)}} {{number_format($data->closing_dips,2)}} {{number_format($data->closing_dips - $clos_stock,2)}}
Total {{number_format($opening_stock,2)}} {{number_format($purchase,2)}} {{number_format($cal_stock,2)}} {{number_format($less_sale,2)}} {{number_format($closing_stock,2)}} {{number_format($closing_dips,2)}} {{number_format($closing_dips - $closing_stock,2)}}
@endsection