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
Binary file not shown.
+63 -6
View File
@@ -28,8 +28,27 @@
<td>{{ formatDate($project->end_date) }}</td>
<td width="1">
<div class="btn-group" role="group" aria-label="Basic example">
<a href='/projects/{{ $project->id }}/edit' class="btn btn-success"><i class="fas fa-edit"></i></a>
<a href='/projects/{{ $project->id }}/delete' class="btn btn-danger"><i class="fas fa-trash"></i></a>
<a href='/projects/{{ $project->id }}/edit'
class="btn btn-success"
data-toggle="tooltip"
data-placement="bottom"
title="Bearbeiten">
<i class="fas fa-edit"></i>
</a>
<a href='/reports/projects/{{ $project->id }}'
class="btn btn-warning"
data-toggle="tooltip"
data-placement="bottom"
title="Bericht">
<i class="fas fa-chart-line"></i>
</a>
<a href='/projects/{{ $project->id }}/delete'
class="btn btn-danger"
data-toggle="tooltip"
data-placement="bottom"
title="Löschen">
<i class="fas fa-trash"></i>
</a>
</div>
</td>
</tr>
@@ -52,8 +71,27 @@
<td>{{ formatDate($project->end_date) }}</td>
<td width="1">
<div class="btn-group" role="group" aria-label="Basic example">
<a href='/projects/{{ $project->id }}/edit' class="btn btn-success"><i class="fas fa-edit"></i></a>
<a href='/projects/{{ $project->id }}/delete' class="btn btn-danger"><i class="fas fa-trash"></i></a>
<a href='/projects/{{ $project->id }}/edit'
class="btn btn-success"
data-toggle="tooltip"
data-placement="bottom"
title="Bearbeiten">
<i class="fas fa-edit"></i>
</a>
<a href='/reports/projects/{{ $project->id }}'
class="btn btn-warning"
data-toggle="tooltip"
data-placement="bottom"
title="Bericht">
<i class="fas fa-chart-line"></i>
</a>
<a href='/projects/{{ $project->id }}/delete'
class="btn btn-danger"
data-toggle="tooltip"
data-placement="bottom"
title="Löschen">
<i class="fas fa-trash"></i>
</a>
</div>
</td>
</tr>
@@ -76,8 +114,27 @@
<td>{{ formatDate($project->end_date) }}</td>
<td width="1">
<div class="btn-group" role="group" aria-label="Basic example">
<a href='/projects/{{ $project->id }}/edit' class="btn btn-success"><i class="fas fa-edit"></i></a>
<a href='/projects/{{ $project->id }}/delete' class="btn btn-danger"><i class="fas fa-trash"></i></a>
<a href='/projects/{{ $project->id }}/edit'
class="btn btn-success"
data-toggle="tooltip"
data-placement="bottom"
title="Bearbeiten">
<i class="fas fa-edit"></i>
</a>
<a href='/reports/projects/{{ $project->id }}'
class="btn btn-warning"
data-toggle="tooltip"
data-placement="bottom"
title="Bericht">
<i class="fas fa-chart-line"></i>
</a>
<a href='/projects/{{ $project->id }}/delete'
class="btn btn-danger"
data-toggle="tooltip"
data-placement="bottom"
title="Löschen">
<i class="fas fa-trash"></i>
</a>
</div>
</td>
</tr>
+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