@extends('layouts.admin') @section('content') ​
{{ trans('cruds.drivewayReport.title_singular') }} {{ trans('global.list') }}
Reset
@php $sum = []; $mechanical = []; $drivesale = $drivesheet->sum('stock_value'); $depositdata = []; $amount_sale_deposit = $deposit->whereNotIn('sub_category_id',['50','51','52'])->sum('amount'); $amount_deposit = $deposit->sum('amount'); @endphp @foreach($fuels as $key => $fuel) @endforeach @foreach($drivesheet as $key => $data) @foreach($fuels as $id => $fuel) @endforeach @endforeach @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
{{ 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($drivesale,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)}}
{{ trans('cruds.report.saleReport') }}
@php $cashier_shop_sale = $cashiersale->where('financialcategory.code','sub23')->sum('amount'); $cashier_fuel_sale = $cashiersale->where('financialcategory.code','sub22')->sum('amount'); $fuel_total = $drivesale + ($fuelsale != null ? $fuelsale->sum('amount') : 0); $sale_total = $shopsale != null ? $shopsale->sum('amount') : 0; @endphp
{{ trans('cruds.report.computer_sale') }} {{ trans('cruds.report.total_sale') }} {{ trans('cruds.report.variance') }}
{{ trans('cruds.report.fuel_sale') }} {{ number_format($cashier_fuel_sale,2)}} {{ number_format($fuel_total,2) }} {{ number_format($fuel_total - $cashier_fuel_sale,2)}}
{{ trans('cruds.report.shop_sale') }} {{ number_format($cashier_shop_sale,2)}} {{ number_format($sale_total,2)}} {{ number_format($sale_total - $cashier_shop_sale,2)}}
{{ trans('cruds.report.total') }} {{ number_format($cashier_shop_sale + $cashier_fuel_sale,2)}} {{ number_format($fuel_total + $sale_total,2)}}
{{ trans('cruds.report.depositReport') }}
@foreach($category as $cat) @php $depositdata[$cat->id] = $deposit->where('financialCategory.header_id',$cat->id)->sum('amount'); @endphp @endforeach
{{ trans('cruds.report.category') }} {{ trans('cruds.report.amount') }}
{{ $cat->header_name }} {{ number_format($depositdata[$cat->id],2)}}
{{ trans('cruds.report.total') }} {{ number_format($amount_deposit,2)}}
{{ trans('cruds.report.totalReport') }}
@php $shell_total = !empty($shell) ? $shell->total_amount : '0'; $driveway_acc_total = !empty($driveway_account) ? $driveway_account->total_amount : '0'; $total_sale = $sale_total + $fuel_total; $pd_pay = $deposit->where('sub_category_id','52')->sum('amount'); $cash_sale = $total_sale - $speed->sum('total_amount') - $shell_total - $driveway_acc_total + $pd_pay; $total_variance = $amount_sale_deposit - $cash_sale; @endphp @if($fuelsale != null) @foreach($fuelsale as $item) @endforeach @endif @if($shopsale != null) @foreach($shopsale as $item) @endforeach @endif @if($speed != null) @foreach($speed as $item) @endforeach @endif
{{ trans('cruds.report.maintitle') }} {{ trans('cruds.report.amount') }}
{{ trans('cruds.report.fuelSale') }} {{ $drivesale}}
{{ ucfirst($item->financialCategory->title)}} {{ $item->amount}}
{{ trans('cruds.report.fuelTotal') }} {{ $fuel_total}}
{{ ucfirst($item->financialCategory->title)}} {{ $item->amount}}
{{ trans('cruds.report.total_sale') }} {{ $total_sale}}
{{ ucfirst($item->type)}} {{ $item->total_amount}}
{{ trans('cruds.report.sheelCard') }} {{ $shell_total}}
{{ trans('cruds.report.accountSale') }} {{ $driveway_acc_total}}
{{ trans('cruds.report.cashSale') }} {{ $cash_sale}}
{{ trans('cruds.report.amountDeposit') }} {{ $amount_deposit}}
{{ trans('cruds.report.variance') }} {{ $total_variance}}
@foreach($category as $cat) @endforeach
@endsection @section('scripts') @parent @endsection