@extends('layouts.admin') @section('content')
@php $sheetdate = $date != null ? date('d/m/Y',strtotime($date)) : null; $day = $sheetdate != null ? date('d',strtotime($sheetdate)) : null; @endphp @include('partials.drivewayPartial')
{{ trans('global.add') }} {{ trans('cruds.drivewaySheet.title_singular') }}
@csrf
@if($errors->has('date'))
{{ $errors->first('date') }}
@endif {{ trans('cruds.drivewaySheet.fields.date_helper') }}
@foreach($fuels as $key => $fuel) @endforeach @foreach($pumps as $key => $pump) @php $pump_fuel = $pump->pivot->fuel_id; $prev_day = $drivesheet->where('pump_id',$pump->id)->where('fuel_id',$pump_fuel)->first(); $opening = !empty($prev_day) ? $prev_day->closing_balance : null; @endphp @foreach($fuels as $id => $fuel) @endforeach @endforeach @foreach($fuels as $id => $fuel) @endforeach
{{ trans('cruds.pump.fields.pump') }} {{ trans('cruds.drivewaySheet.fields.opening') }} {{ trans('cruds.drivewaySheet.fields.closing') }}{{ $fuel }}
@if($errors->first('pump_name'))
{{ $errors->first('pump_name') }}
@endif {{ trans('cruds.drivewaySheet.fields.pump_helper') }}
@if($errors->first('opening_balance'))
{{ $errors->first('opening_balance') }}
@endif {{ trans('cruds.drivewaySheet.fields.opening_balance') }}
@if($errors->first('closing_balance'))
{{ $errors->first('closing_balance') }}
@endif {{ trans('cruds.drivewaySheet.fields.closing_balance') }}
@if($errors->first('fuel_id'))
{{ $errors->first('fuel_id') }}
@endif
{{ trans('cruds.fuelStock.fields.computer_sale') }}
@if($errors->first('computer_sale'))
{{ $errors->first('computer_sale') }}
@endif {{ trans('cruds.fuelStock.fields.sale_helper') }}
{{ trans('global.add') }} {{ trans('cruds.fuelStock.title_singular') }}
@foreach($fuels as $key => $fuel) @php $fuel_prev_day = $fuelsheet->where('fuel_type',$key)->first(); $fuel_opening = !empty($fuel_prev_day) ? $fuel_prev_day->closing_dips : null; @endphp @endforeach
{{ trans('global.title') }} {{ trans('cruds.fuelStock.fields.opening_stock') }} {{ trans('cruds.fuelStock.fields.purchase') }} {{ trans('cruds.fuelStock.fields.calculated_stock') }} {{ trans('cruds.fuelStock.fields.closing_dips') }}
@if($errors->first('opening_stock'))
{{ $errors->first('opening_stock') }}
@endif {{ trans('cruds.fuelStock.fields.opening_stock_helper') }}
@if($errors->first('purchase'))
{{ $errors->first('purchase') }}
@endif {{ trans('cruds.fuelStock.fields.purchase_helper') }}
@if($errors->first('calculated_stock'))
{{ $errors->first('calculated_stock') }}
@endif {{ trans('cruds.fuelStock.fields.calculated_stock_helper') }}
@if($errors->first('closing_dips'))
{{ $errors->first('closing_dips') }}
@endif {{ trans('cruds.fuelStock.fields.closing_dips_helper') }}
@endsection @section('scripts') @endsection