Implemented compact scopre report.

This commit is contained in:
Lukas Halbritter
2019-02-05 19:47:25 +01:00
parent 1fcec55f68
commit 02af424e7b
7 changed files with 152 additions and 2 deletions
@@ -0,0 +1,95 @@
@extends('layout.master')
@section('title', 'Abrechnung ' . $year)
@section('subnav')
<a class='btn btn-outline-secondary' href='/bookings/year-{{ $year }}'>
Zurück
</a>
@endsection
@section('content')
<h2>@yield('title')</h2>
<table class='table'>
<tr>
<td>
<b>Kontostand am 1. 1. {{ $year }}</b>
</td>
<td>
<b>{!! formatAmount($startBalance) !!}</b>
</td>
</tr>
<tr><td colspan='2'></td></tr>
@foreach($scopes as $scope)
<tr>
<td colspan='2'><b>{{ $scope->name }}</b></td>
</tr>
@foreach($scope->accountClasses as $accountClass)
<tr>
<td colspan='2' style='text-indent: 2em;'>
<u>{{ $accountClass->name }}</u>
</td>
</tr>
@foreach($accountClass->accountTypes as $accountType)
<tr>
<td style='text-indent: 4em;'>
{{$accountType->number}} - {{$accountType->name}}
</td>
<td>
{!! formatAmount($accountType->subBookings->sum('amount')) !!}
</td>
</tr>
@endforeach
<tr><td colspan='2'></td></tr>
@endforeach
<tr>
<td colspan='2' style='text-indent: 2em;'>
<u>GESAMT</u>
</td>
<tr>
@foreach($scope->accountClasses as $accountClass)
<tr>
<td style='text-indent: 4em;'>
{{ $accountClass->name }}
</td>
<td>
{!! formatAmount($accountClass->amount) !!}
</td>
</tr>
@endforeach
<tr>
<td style='text-indent: 4em;'>
Saldo {{ $scope->name }}
</td>
<td>{!! formatAmount($scope->balance) !!}</td>
</tr>
<tr><td colspan='2'></td></tr>
@endforeach
<tr>
<td colspan='2'>
<b>Übersicht</b>
</td>
<tr>
@foreach($scopes as $scope)
<tr>
<td style='text-indent: 4em;'>
Saldo {{ $scope->name }}
</td>
<td>{!! formatAmount($scope->balance) !!}</td>
</tr>
@endforeach
<tr>
<td style='text-indent: 4em;'>Gesamtsaldo</td>
<td>{!! formatAmount($scopes->sum('balance')) !!}</td>
</tr>
<tr><td colspan='2'></td></tr>
<tr>
<td>
<b>Kontostand am 31. 12. {{ $year }}</b>
</td>
<td>
<b>{!! formatAmount($endBalance) !!}</b>
</td>
</tr>
</table>
@endsection