@extends('admin.layouts.form') @section('custom_page_style') @endsection @section('content')
Particular | @foreach($expense_date_list as $month){{ \Carbon\Carbon::parse($month . '-01')->format('F Y') }} | @endforeach
---|---|
Total Cost | @foreach($expense_date_list as $month){!! $expenses->filter(function($exp) use($month) { return \Carbon\Carbon::parse($exp->expense_date)->format('Y-m') == $month; })->sum('amount') !!} | @endforeach
Staff Cost | @foreach($expense_date_list as $month){!! $expenses->whereIn('expense_head_id', $staff_cost_id)->filter(function($exp) use($month) { return \Carbon\Carbon::parse($exp->expense_date)->format('Y-m') == $month; })->sum('amount') !!} | @endforeach
Food Cost | @foreach($expense_date_list as $month){!! $expenses->whereIn('expense_head_id', $food_cost_id)->filter(function($exp) use($month) { return \Carbon\Carbon::parse($exp->expense_date)->format('Y-m') == $month; })->sum('amount') !!} | @endforeach
{!! $head->head !!} | @foreach($expense_date_list as $month){!! $expenses->whereIn('expense_head_id', $head->id)->filter(function($exp) use($month) { return \Carbon\Carbon::parse($exp->expense_date)->format('Y-m') == $month; })->sum('amount') !!} | @endforeach
Operation Cost | @foreach($expense_date_list as $month){!! $expenses->whereIn('expense_head_id', $operation_cost_id)->filter(function($exp) use($month) { return \Carbon\Carbon::parse($exp->expense_date)->format('Y-m') == $month; })->sum('amount') !!} | @endforeach
- Office Cost | @foreach($expense_date_list as $month){!! $expenses->whereIn('expense_head_id', $office_cost_id)->filter(function($exp) use($month) { return \Carbon\Carbon::parse($exp->expense_date)->format('Y-m') == $month; })->sum('amount') !!} | @endforeach
{!! $head->head !!} | @foreach($expense_date_list as $month){!! $expenses->whereIn('expense_head_id', $head->id)->filter(function($exp) use($month) { return \Carbon\Carbon::parse($exp->expense_date)->format('Y-m') == $month; })->sum('amount') !!} | @endforeach
- Marketing Cost | @foreach($expense_date_list as $month){!! $expenses->whereIn('expense_head_id', $marketing_cost_id)->filter(function($exp) use($month) { return \Carbon\Carbon::parse($exp->expense_date)->format('Y-m') == $month; })->sum('amount') !!} | @endforeach
{!! $head->head !!} | @foreach($expense_date_list as $month){!! $expenses->whereIn('expense_head_id', $head->id)->filter(function($exp) use($month) { return \Carbon\Carbon::parse($exp->expense_date)->format('Y-m') == $month; })->sum('amount') !!} | @endforeach