135 lines
4.9 KiB
PHP
135 lines
4.9 KiB
PHP
@extends('layout.master')
|
|
|
|
@section('subnav')
|
|
<a href='{{ url()->previous() }}'>Zurück</a>
|
|
@endsection
|
|
|
|
@section('content')
|
|
<h1>@yield('title')</h1>
|
|
<form action="/bookings/{{ $booking->id }}" method='post'>
|
|
{{ method_field('patch') }}
|
|
{{ csrf_field() }}
|
|
<h2>Allgemeine Buchungsinformationen</h2>
|
|
<table>
|
|
<tr>
|
|
<td>{{ Form::label('booking[date]', 'Datum') }}</td>
|
|
<td>{{ Form::date('booking[date]', $booking->date) }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{{ Form::label('booking[reference]', 'Buchungstext') }}</td>
|
|
<td>{{ Form::text('booking[reference]', $booking->reference) }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{{ Form::label('booking[person_or_company]', 'Person / Firma') }}</td>
|
|
<td>{{ Form::text('booking[person_or_company]', $booking->person_or_company) }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{{ Form::label('booking[note]', 'Anmerkung') }}</td>
|
|
<td>{{ Form::textarea('booking[note]', $booking->note) }}</td>
|
|
</tr>
|
|
</table>
|
|
<h2>Teilbuchungen</h2>
|
|
<table>
|
|
<tr>
|
|
<th>Buchungstext</th>
|
|
<th>Betrag</th>
|
|
<th>Konto</th>
|
|
<th>Personenkonto</th>
|
|
<th>Projekt</th>
|
|
</tr>
|
|
@foreach ($booking->subBookings as $subBooking)
|
|
<tr>
|
|
<td>
|
|
{{
|
|
Form::text(
|
|
"sub_booking[$subBooking->id][reference]",
|
|
$subBooking->reference
|
|
)
|
|
}}
|
|
</td>
|
|
<td>
|
|
{{
|
|
Form::text(
|
|
"sub_booking[$subBooking->id][amount]",
|
|
$subBooking->amount
|
|
)
|
|
}}
|
|
</td>
|
|
<td>
|
|
{{
|
|
Form::select(
|
|
"sub_booking[$subBooking->id][account_type_id]",
|
|
$accountTypeArray,
|
|
$subBooking->account_type_id,
|
|
['placeholder' => 'Hier auswählen ...']
|
|
)
|
|
}}
|
|
</td>
|
|
<td>
|
|
{{
|
|
Form::select(
|
|
"sub_booking[$subBooking->id][person_target_id]",
|
|
$openTargetsArray,
|
|
$subBooking->person_target_id,
|
|
['placeholder' => 'Hier auswählen ...']
|
|
)
|
|
}}
|
|
</td>
|
|
<td>
|
|
{{
|
|
Form::select(
|
|
"sub_booking[$subBooking->id][project_id]",
|
|
$projectsArray,
|
|
$subBooking->project_id,
|
|
['placeholder' => 'Hier auswählen ...']
|
|
)
|
|
}}
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
<tr>
|
|
<td>{{ Form::text('sub_booking[0][reference]') }}</td>
|
|
<td>{{ Form::text('sub_booking[0][amount]') }}</td>
|
|
<td>
|
|
{{
|
|
Form::select(
|
|
'sub_booking[0][account_type_id]',
|
|
$accountTypeArray,
|
|
'placeholder',
|
|
['placeholder' => 'Hier auswählen ...']
|
|
)
|
|
}}
|
|
</td>
|
|
<td>
|
|
{{
|
|
Form::select(
|
|
'sub_booking[0][person_target_id]',
|
|
$openTargetsArray,
|
|
'placeholder',
|
|
['placeholder' => 'Hier auswählen ...']
|
|
)
|
|
}}
|
|
</td>
|
|
<td>
|
|
{{
|
|
Form::select(
|
|
'sub_booking[0][project_id]',
|
|
$projectsArray,
|
|
'placeholder',
|
|
['placeholder' => 'Hier auswählen ...']
|
|
)
|
|
}}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
|
|
<button type="submit" id="submit">Speichern</button>
|
|
</form>
|
|
@endsection
|