@extends('layouts.app') @section('title', __('report.expense_report')) @section('content')

{{ __('report.expense_report')}}

@component('components.filters', ['title' => __('report.filters')]) {!! Form::open(['url' => action([\App\Http\Controllers\ReportController::class, 'getExpenseReport']), 'method' => 'get' ]) !!}
{!! 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']); !!}
{!! Form::close() !!} @endcomponent
@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
@lang( 'expense.expense_categories' ) @lang( 'report.total_expense' )
{{$expense['category'] ?? __('report.others')}} {{$expense['total_expense']}}
@lang('sale.total') {{$total_expense}}
@endcomponent
@endsection @section('javascript') {!! $chart->script() !!} @endsection