Added routes for reports. Added project reports.

This commit is contained in:
Lukas Halbritter
2019-01-27 10:24:21 +01:00
parent c638e8727d
commit b5f6ad523e
5 changed files with 206 additions and 6 deletions
+58
View File
@@ -0,0 +1,58 @@
@extends('layout.master')
@section('title', 'Projektbericht ' . $project->name)
@section('subnav')
<a class='btn btn-outline-secondary' href='/projects'>Zurück</a>
@endsection
@section('content')
<h2>@yield('title')</h2>
<table class='table table-striped table-bordered'>
<tr>
<th>Datum</th>
<th>Buchungstext</th>
<th>Person / Firma</th>
<th>Ausgang (S)</th>
<th>Eingang (H)</th>
</tr>
@foreach($projectBookings as $subBooking)
<tr>
<td>{{ formatDate($subBooking->date()) }}</td>
<td>{{ $subBooking->reference }}</td>
<td>{{ $subBooking->personOrCompany() }}</td>
<td>
@if($subBooking->ioType()->factor < 0)
{!! formatAmount($subBooking->signedAmount()) !!}
@endif
</td>
<td>
@if($subBooking->ioType()->factor > 0)
{!! formatAmount($subBooking->signedAmount()) !!}
@endif
</td>
</tr>
@endforeach
<tr style='font-weight: bold'>
<td></td>
<td>Abschluss</td>
<td></td>
<td>
{!! formatAmount(- $expeditures) !!}
</td>
<td>
{!! formatAmount($incomes) !!}
</td>
</tr>
<tr style='font-weight: bold'>
<td></td>
<td>Saldo</td>
<td></td>
<td>
{!! formatAmount($incomes - $expeditures) !!}
</td>
<td>
</td>
</tr>
</table>
@endsection