@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
{{ trans('cruds.pump.fields.pump') }} |
{{ trans('cruds.drivewaySheet.fields.opening') }} |
{{ trans('cruds.drivewaySheet.fields.closing') }} |
@foreach($fuels as $key => $fuel)
{{ $fuel }} |
@endforeach
{{ trans('global.total') }} |
{{ trans('cruds.report.fuelSale') }} |
@foreach($drivesheet as $key => $data)
{{$data->pump->pump}} |
{{number_format($data->opening_balance,2)}} |
{{number_format($data->closing_balance,2)}} |
@foreach($fuels as $id => $fuel)
@if($data->fuel_id == $id)
{{number_format($data->stock,2)}}
@endif
|
@endforeach
|
{{number_format($data->stock_value,2)}} |
@endforeach
{{ trans('cruds.report.computerSale') }} |
@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
{{number_format($sale[$id],2)}} |
@endforeach
{{number_format(array_sum($sale),2)}} |
{{number_format($drivesale,2)}} |
{{ trans('cruds.report.mechanicalSale') }} {{ trans('cruds.report.inLtr') }} |
@foreach($fuels as $id => $fuel)
@php
$sum[$id] = $drivesheet->where('fuel_id',$id)->sum('stock');
@endphp
{{number_format($sum[$id],2)}} |
@endforeach
{{number_format(array_sum($sum),2)}} |
|
{{ trans('cruds.report.mechanicalValue') }} |
@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
{{number_format($mechanical[$id],2)}} |
@endforeach
{{number_format(array_sum($mechanical),2)}} |
|
{{ trans('cruds.report.difference') }} {{ trans('cruds.report.inLtr') }} |
@foreach($fuels as $id => $fuel)
@php
$diff[$id] = $sum[$id] - $sale[$id];
@endphp
{{number_format($diff[$id],2)}} |
@endforeach
{{number_format(array_sum($sum) - array_sum($sale),2)}} |
|
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') }} |
@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
{{$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)}} |
@endforeach
@if(count($drivesheet) > 0 && count($fuelstock) > 0)
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)}} |
@endif
@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.category') }} |
{{ trans('cruds.report.amount') }} |
@foreach($category as $cat)
@php
$depositdata[$cat->id] = $deposit->where('financialCategory.header_id',$cat->id)->sum('amount');
@endphp
{{ $cat->header_name }} |
{{ number_format($depositdata[$cat->id],2)}} |
@endforeach
{{ trans('cruds.report.total') }} |
{{ number_format($amount_deposit,2)}} |
{{ trans('cruds.report.maintitle') }} |
{{ trans('cruds.report.amount') }} |
@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
{{ trans('cruds.report.fuelSale') }} |
{{ $drivesale}} |
@if($fuelsale != null)
@foreach($fuelsale as $item)
{{ ucfirst($item->financialCategory->title)}} |
{{ $item->amount}} |
@endforeach
@endif
{{ trans('cruds.report.fuelTotal') }} |
{{ $fuel_total}} |
@if($shopsale != null)
@foreach($shopsale as $item)
{{ ucfirst($item->financialCategory->title)}} |
{{ $item->amount}} |
@endforeach
@endif
{{ trans('cruds.report.total_sale') }} |
{{ $total_sale}} |
@if($speed != null)
@foreach($speed as $item)
{{ ucfirst($item->type)}} |
{{ $item->total_amount}} |
@endforeach
@endif
{{ 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}} |
{{ trans('cruds.report.cashier') }} |
{{ trans('cruds.report.amount') }} |
@foreach($cashiersale->where('financialcategory.code','sub23') as $item)
{{ ucfirst($item->cashier->name)}} |
{{ $item->amount}} |
@endforeach
{{ trans('cruds.report.total') }} |
{{ $cashier_shop_sale}} |
{{ trans('cruds.report.cashier') }} |
{{ trans('cruds.report.amount') }} |
@foreach($cashiersale->where('financialcategory.code','sub22') as $item)
{{ ucfirst($item->cashier->name)}} |
{{ $item->amount}} |
@endforeach
{{ trans('cruds.report.total') }} |
{{ $cashier_fuel_sale}} |
{{ trans('cruds.report.category') }} |
{{ trans('cruds.report.amount') }} |
@if($shopsale != null)
@foreach($shopsale as $item)
{{ ucfirst($item->financialCategory->title)}} |
{{ $item->amount}} |
@endforeach
@endif
{{ trans('cruds.report.total') }} |
{{ $sale_total}} |
{{ trans('cruds.pump.fields.pump') }} |
{{ trans('cruds.drivewaySheet.fields.opening') }} |
{{ trans('cruds.drivewaySheet.fields.closing') }} |
@foreach($fuels as $key => $fuel)
{{ $fuel }} |
@endforeach
{{ trans('cruds.report.fuelSale') }} |
@foreach($drivesheet as $key => $data)
{{$data->pump->pump}} |
{{$data->opening_balance}} |
{{$data->closing_balance}} |
@foreach($fuels as $id => $fuel)
@if($data->fuel_id == $id)
{{$data->stock}}
@endif
|
@endforeach
{{$data->stock_value}} |
@endforeach
{{ trans('cruds.report.fuelSale') }} |
@foreach($fuels as $id => $fuel)
|
@endforeach
{{ $drivesale}} |
@if($fuelsale != null && count($fuelsale) > 0)
@foreach($fuelsale as $item)
{{ ucfirst($item->financialCategory->title)}} |
@foreach($fuels as $id => $fuel)
|
@endforeach
{{ $item->amount}} |
@endforeach
@endif
{{ trans('cruds.report.fuelTotal') }} |
@foreach($fuels as $id => $fuel)
|
@endforeach
{{ $fuel_total}} |
@foreach($category as $cat)
{{ trans('cruds.report.category') }} |
{{ trans('cruds.report.amount') }} |
@foreach($cat->subcategories as $item)
@php
$deposit_sub_total = $deposit->where('sub_category_id',$item->id)->sum('amount');
@endphp
{{ ucfirst($item->title)}} |
{{ number_format($deposit_sub_total,2)}} |
@endforeach
{{ trans('cruds.report.total') }} |
{{ number_format($depositdata[$cat->id],2)}} |
@endforeach