@extends('admin.layouts.form') @section('custom_page_style') @endsection @section('content')
Particular | @foreach($expense_date_list as $week){{ \Carbon\Carbon::now()->setISODate(substr($week, 0, 4), substr($week, 4))->startOfWeek()->format('d M') }} - {{ \Carbon\Carbon::now()->setISODate(substr($week, 0, 4), substr($week, 4))->endOfWeek()->format('d M') }} | @endforeach
---|---|
Total Cost | @foreach($expense_date_list as $week){!! $expenses->filter(function($exp) use($week) { return \Carbon\Carbon::parse($exp->expense_date)->format('oW') == $week; })->sum('amount') !!} | @endforeach
Staff Cost | @foreach($expense_date_list as $week){!! $expenses->whereIn('expense_head_id', $staff_cost_id)->filter(function($exp) use($week) { return \Carbon\Carbon::parse($exp->expense_date)->format('oW') == $week; })->sum('amount') !!} | @endforeach
Food Cost | @foreach($expense_date_list as $week){!! $expenses->whereIn('expense_head_id', $food_cost_id)->filter(function($exp) use($week) { return \Carbon\Carbon::parse($exp->expense_date)->format('oW') == $week; })->sum('amount') !!} | @endforeach
{!! $head->head !!} | @foreach($expense_date_list as $week){!! $expenses->whereIn('expense_head_id', $head->id)->filter(function($exp) use($week) { return \Carbon\Carbon::parse($exp->expense_date)->format('oW') == $week; })->sum('amount') !!} | @endforeach
Operation Cost | @foreach($expense_date_list as $week){!! $expenses->whereIn('expense_head_id', $operation_cost_id)->filter(function($exp) use($week) { return \Carbon\Carbon::parse($exp->expense_date)->format('oW') == $week; })->sum('amount') !!} | @endforeach
- Office Cost | @foreach($expense_date_list as $week){!! $expenses->whereIn('expense_head_id', $office_cost_id)->filter(function($exp) use($week) { return \Carbon\Carbon::parse($exp->expense_date)->format('oW') == $week; })->sum('amount') !!} | @endforeach
{!! $head->head !!} | @foreach($expense_date_list as $week){!! $expenses->whereIn('expense_head_id', $head->id)->filter(function($exp) use($week) { return \Carbon\Carbon::parse($exp->expense_date)->format('oW') == $week; })->sum('amount') !!} | @endforeach
- Marketing Cost | @foreach($expense_date_list as $week){!! $expenses->whereIn('expense_head_id', $marketing_cost_id)->filter(function($exp) use($week) { return \Carbon\Carbon::parse($exp->expense_date)->format('oW') == $week; })->sum('amount') !!} | @endforeach
{!! $head->head !!} | @foreach($expense_date_list as $week){!! $expenses->whereIn('expense_head_id', $head->id)->filter(function($exp) use($week) { return \Carbon\Carbon::parse($exp->expense_date)->format('oW') == $week; })->sum('amount') !!} | @endforeach