@extends('layouts.admin') @section('title', 'Outgoing & expenses') @section('content') @php $query = request()->only(['period', 'from', 'to']); $canEdit = (bool) auth()->user()?->hasPermission('accounting.edit'); $maxCategory = max([1, ...array_values($totals['expenses_by_category'])]); @endphp @include('admin.accounts.partials.period')
Order costs{{ $accounts->money($totals['order_costs_cents']) }}Production, shipping, packaging, fees
Expenses{{ $accounts->money($totals['expenses_cents']) }}Running the business
Total outgoing{{ $accounts->money($totals['outgoing_cents']) }}{{ $period['label'] }}
@if($canEdit)
any() || request('add')) open @endif> Add expense
@include('admin.accounts.partials.entry-form', ['type' => 'expense'])
@endif
@foreach(['all' => 'Everything', 'expenses' => 'Expenses', 'order_costs' => 'Order costs'] as $key => $label) {{ $label }} @endforeach @if($category !== '') {{ $category }} Clear @endif
@include('admin.accounts.partials.rows', ['sign' => '-', 'empty' => 'Nothing spent in this period yet.'])
@endsection