@extends('layouts.app') @section('css') {{-- select2 css --}} {{-- Datatable --}} @endsection @section('content') @php $mnths=[]; foreach ($months as $key => $value) { $value = sanitize_output($value); array_push($mnths, $value); } $mnths = implode(",",$mnths); @endphp
{{ __('Expense') }}
@php $purchaseTotal = !empty($purchaseList) ? array_sum($purchaseList) : 0; $generalTotal = 0; $symbol = ''; @endphp
@php $fromMonth = ''; $fromYear = ''; $toMonth = ''; $toYear = ''; $fromData = []; $from = isset($from) ? $from : ''; $to = isset($to) ? $to : ''; if (!empty($from)) { $fromMonth = getMonthNumber(date("M", strtotime($from))); $fromYear = date("Y", strtotime($from)); } if (!empty($to)) { $toMonth = getMonthNumber(date("M", strtotime($to))); $toYear = date("Y", strtotime($to)); } @endphp
{{ __('Purchase') }} {{ __('General') }}
{{ __('Total Purchases') }} {{ $purchaseTotal }}
@foreach ($categoryTotals as $key => $value) @endforeach
{{ $key }} {{ formatCurrencyAmount($value) }}
{{ __('Total General') }} {{ $generalTotal }}
{{ __('Total') }} {{ $purchaseTotal + $generalTotal }}
@foreach($expenseList as $category => $data) @endforeach
{{ __('Category') }}
{{ $category }}
{{ __('Sub Total') }}
{{ __('Purchase Expenses') }}
@foreach(collect($months)->chunk(2) as $collect) @endforeach
{{ __('Date') }} {{ __('Amount') }} {{ __('Date') }} {{ __('Amount') }}
{{ __('Total') }} {{ $purchaseTotal }}
@endsection @section('js') {{-- Select2 --}} @endsection