@php $isEdit = !empty($budget); $canSave = $isEdit ? ($canEdit ?? false) : auth()->user()->hasPermission('budget', 'create'); $selectedScope = old('scope_type', $budget->type ?? \App\Models\Budget::TYPE_GENERAL); $periodMonths = $periodMonths ?? []; @endphp @extends('layouts.app') @section('title', $isEdit ? 'Edit Budget' : 'New Budget') @section('breadcrumb') @endsection @push('styles') @include('partials.report-datepicker-assets') @endpush @section('content') @if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
@foreach($errors->all() as $error)
{{ $error }}
@endforeach
@endif

{{ $isEdit ? 'Edit Budget' : 'New Budget' }}

Enter monthly amounts per income/expense account for the selected budget period.

Close
@csrf @if($isEdit) @method('PUT') @endif
@include('partials.report-date-range-fields', [ 'fromName' => 'period_from', 'toName' => 'period_to', 'fromLabel' => 'From', 'toLabel' => 'To', 'dateFrom' => $periodFrom ?? '', 'dateTo' => $periodTo ?? '', 'colClass' => 'col-md-4', 'readOnly' => !$canSave, ])
@foreach($scopeTypes as $value => $label)
@endforeach
@if($jobs->isEmpty())
No customer jobs found. Create jobs under Customers first.
@endif
@if($canSave)
Select a month amount, then copy it across the rest of the row.
@endif
Cancel @if($canSave) @endif
@if($isEdit && ($canEdit ?? false))
@csrf @method('DELETE')
@endif
@endsection @push('scripts') @include('partials.report-datepicker-init') @endpush