116 lines
4.2 KiB
PHP
116 lines
4.2 KiB
PHP
@extends('layout.print')
|
|
|
|
@section('title', 'Kassenbuch ' . $year)
|
|
|
|
@section('content')
|
|
@for ($month = 1; $month <= 12; $month++)
|
|
<table class='table table-striped table-sm table-borderless'
|
|
style='page-break-after: always'>
|
|
<thead>
|
|
<tr>
|
|
<th>Datum</th>
|
|
<th>Positionen</th>
|
|
<th>Person / Firma</th>
|
|
<th>Ausgang</th>
|
|
<th>Eingang</th>
|
|
<th>Konto</th>
|
|
</tr>
|
|
</thead>
|
|
@if ((
|
|
date('Y') > $year
|
|
or (date('Y') == $year
|
|
and date('m') >= $month)
|
|
) and (
|
|
$firstDate['Y'] < $year
|
|
or $firstDate['Y'] == $year
|
|
and $firstDate['m'] <= $month
|
|
))
|
|
<tr style='color:#ff0000'>
|
|
<th>{{ startOfMonth($year, $month) }}</th>
|
|
<th>Saldo</th>
|
|
<th></th>
|
|
<th></th>
|
|
<th>{!! formatAmount($sums[$month - 1]['balance']) !!}</th>
|
|
<th></th>
|
|
</tr>
|
|
@endif
|
|
@if (isset($bookings[$month]))
|
|
@foreach($bookings[$month] as $booking)
|
|
<tr>
|
|
<td>{{ formatDate($booking->date) }}</td>
|
|
<td>{{ $booking->reference }}</td>
|
|
<td>{{ $booking->person_or_company }}</td>
|
|
<td align='right'>
|
|
@if ($booking->signedAmount() < 0)
|
|
{!! formatAmount($booking->signedAmount()) !!}
|
|
@endif
|
|
</td>
|
|
<td align='right'>
|
|
@if ($booking->signedAmount() >= 0)
|
|
{!! formatAmount($booking->signedAmount()) !!}
|
|
@endif
|
|
</td>
|
|
<td>
|
|
@if ($booking->isSimple())
|
|
{{ $booking->accountType()->number }}
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@if (!$booking->isSimple())
|
|
@foreach ($booking->subBookings as $subBooking)
|
|
<tr style='font-style:italic'>
|
|
<td></td>
|
|
<td>{{ $subBooking->reference }}</td>
|
|
<td></td>
|
|
<td align='right'>
|
|
@if ($subBooking->signedAmount() < 0)
|
|
{!! formatAmount($subBooking->signedAmount()) !!}
|
|
@endif
|
|
</td>
|
|
<td align='right'>
|
|
@if ($subBooking->signedAmount() >= 0)
|
|
{!! formatAmount($subBooking->signedAmount()) !!}
|
|
@endif
|
|
</td>
|
|
<td>
|
|
{{ $subBooking->accountType->number }}
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
@endif
|
|
@endforeach
|
|
@endif
|
|
@if ((
|
|
date('Y') > $year
|
|
or (date('Y') == $year
|
|
and date('m') >= $month)
|
|
) and (
|
|
$firstDate['Y'] < $year
|
|
or $firstDate['Y'] == $year
|
|
and $firstDate['m'] <= $month
|
|
))
|
|
<tr style='color:#000080'>
|
|
<th>
|
|
{{ endOfMonth($year, $month) }}
|
|
</th>
|
|
<th>Monatsabschluss</th>
|
|
<th></th>
|
|
<th>{!! formatAmount($sums[$month]['expeditures']) !!}</th>
|
|
<th>{!! formatAmount($sums[$month]['incomes']) !!}</th>
|
|
<th></th>
|
|
</tr>
|
|
<tr style='color:#ff0000'>
|
|
<th>
|
|
{{ endOfMonth($year, $month) }}
|
|
</th>
|
|
<th>Saldo</th>
|
|
<th></th>
|
|
<th>{!! formatAmount($sums[$month]['balance']) !!}</th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
@endif
|
|
</table>
|
|
@endfor
|
|
@endsection
|