@component('components.filters', ['title' => __('report.filters')])
{!! Form::open(['url' => action([\App\Http\Controllers\ReportController::class, 'getExpenseReport']), 'method' => 'get' ]) !!}
{!! Form::close() !!}
@endcomponent
{!! Form::label('location_id', __('purchase.business_location') . ':') !!}
{!! Form::select('location_id', $business_locations, null, ['class' => 'form-control select2', 'style' => 'width:100%']); !!}
{!! Form::label('category_id', __('category.category').':') !!}
{!! Form::select('category', $categories, null, ['placeholder' =>
__('report.all'), 'class' => 'form-control select2', 'style' => 'width:100%', 'id' => 'category_id']); !!}
{!! Form::label('trending_product_date_range', __('report.date_range') . ':') !!}
{!! Form::text('date_range', null , ['placeholder' => __('lang_v1.select_a_date_range'), 'class' => 'form-control', 'id' => 'trending_product_date_range', 'readonly']); !!}
@component('components.widget', ['class' => 'box-primary'])
{!! $chart->container() !!}
@endcomponent
@component('components.widget', ['class' => 'box-primary'])
@php
$total_expense = 0;
@endphp
@foreach($expenses as $expense)
@php
$total_expense += $expense['total_expense'];
@endphp
@endforeach
@endcomponent
@lang( 'expense.expense_categories' ) | @lang( 'report.total_expense' ) |
---|---|
{{$expense['category'] ?? __('report.others')}} | {{$expense['total_expense']}} |
@lang('sale.total') | {{$total_expense}} |