diff --git a/resources/views/bookings/edit.blade.php b/resources/views/bookings/edit.blade.php new file mode 100644 index 0000000..a981f5d --- /dev/null +++ b/resources/views/bookings/edit.blade.php @@ -0,0 +1,4 @@ +@extends('layout.forms.bookings.edit') + +@section('title', 'Buchung bearbeiten') + diff --git a/resources/views/bookings/index.blade.php b/resources/views/bookings/index.blade.php index 3beb002..6b55cdf 100644 --- a/resources/views/bookings/index.blade.php +++ b/resources/views/bookings/index.blade.php @@ -25,7 +25,8 @@ Projekt @for ($month = 1; $month <= 12; $month++) - @if (isset($bookings[$month])) + @if (date('Y') > $year + or (date('Y') == $year and date('m') >= $month)) @@ -37,6 +38,8 @@ + @endif + @if (isset($bookings[$month])) @foreach($bookings[$month] as $booking) @@ -99,6 +102,9 @@ @endforeach @endif @endforeach + @endif + @if (date('Y') > $year + or (date('Y') == $year and date('m') >= $month)) diff --git a/resources/views/layout/forms/bookings/edit.blade.php b/resources/views/layout/forms/bookings/edit.blade.php new file mode 100644 index 0000000..592500c --- /dev/null +++ b/resources/views/layout/forms/bookings/edit.blade.php @@ -0,0 +1,111 @@ +@extends('layout.master') + +@section('subnav') + Zurück +@endsection + +@section('content') +

@yield('title')

+
+ {{ method_field('patch') }} + {{ csrf_field() }} +

Allgemeine Buchungsinformationen

+ + + + + + + + + + + + + + + + + +
{{ Form::label('date', 'Datum') }}{{ Form::date('date', $booking->date) }}
{{ Form::label('booking_reference', 'Buchungstext') }}{{ Form::text('booking_reference', $booking->reference) }}
{{ Form::label('person_or_company', 'Person / Firma') }}{{ Form::text('person_or_company', $booking->person_or_company) }}
{{ Form::label('note', 'Anmerkung') }}{{ Form::textarea('note', $booking->note) }}
+

Teilbuchungen

+ + + + + + + + @foreach ($booking->subBookings as $subBooking) + + + + + + + @endforeach + + + + + + +
BetragKontoPersonenkontoProjekt
{{ Form::text('amount', $subBooking->amount) }} + {{ + Form::select( + 'account_type_id', + $accountTypeArray, + $subBooking->account_type_id, + ['placeholder' => 'Hier auswählen ...'] + ) + }} + + {{ + Form::select( + 'person_target_id', + $openTargetsArray, + $subBooking->person_target_id, + ['placeholder' => 'Hier auswählen ...'] + ) + }} + + {{ + Form::select( + 'project_id', + $projectsArray, + $subBooking->project_id, + ['placeholder' => 'Hier auswählen ...'] + ) + }} +
{{ Form::text('amount') }} + {{ + Form::select( + 'account_type_id', + $accountTypeArray, + 'placeholder', + ['placeholder' => 'Hier auswählen ...'] + ) + }} + + {{ + Form::select( + 'person_target_id', + $openTargetsArray, + 'placeholder', + ['placeholder' => 'Hier auswählen ...'] + ) + }} + + {{ + Form::select( + 'project_id', + $projectsArray, + 'placeholder', + ['placeholder' => 'Hier auswählen ...'] + ) + }} +
+ + +
+@endsection