improved reports layout

This commit is contained in:
denisdulici 2020-01-14 14:47:05 +03:00
parent 2f98696caf
commit 567a2ddbd5
8 changed files with 24 additions and 24 deletions

View File

@ -1,11 +1,11 @@
<tfoot>
<tr>
<th class="long-texts report-column">{{ trans_choice('general.totals', 1) }}</th>
<th class="report-column">{{ trans_choice('general.totals', 1) }}</th>
@php $total_total = 0; @endphp
@foreach($class->totals[$table] as $total)
@php $total_total += $total; @endphp
<th class="long-texts report-column text-right">@money($total, setting('default.currency'), true)</th>
<th class="report-column text-right px-0">@money($total, setting('default.currency'), true)</th>
@endforeach
<th class="long-texts report-column text-right">@money($total_total, setting('default.currency'), true)</th>
<th class="report-column text-right">@money($total_total, setting('default.currency'), true)</th>
</tr>
</tfoot>

View File

@ -3,10 +3,10 @@
@if ($table == 'default')
<th>{{ $class->groups[$class->report->group] }}</th>
@else
<th class="text-right">{{ $table }}</th>
<th>{{ $table }}</th>
@endif
@foreach($class->dates as $date)
<th class="text-right">{{ $date }}</th>
<th class="text-right px-0">{{ $date }}</th>
@endforeach
<th class="text-right">{{ trans_choice('general.totals', 1) }}</th>
</tr>

View File

@ -1,9 +1,9 @@
@php $row_total = 0; @endphp
<tr>
<td class="long-texts report-column">{{ $class->getTableRowList()[$id] }}</td>
<td class="report-column">{{ $class->getTableRowList()[$id] }}</td>
@foreach($items as $item)
@php $row_total += $item; @endphp
<td class="long-texts report-column text-right">@money($item, setting('default.currency'), true)</td>
<td class="report-column text-right px-0">@money($item, setting('default.currency'), true)</td>
@endforeach
<td class="long-texts report-column text-right">@money($row_total, setting('default.currency'), true)</td>
<td class="report-column text-right">@money($row_total, setting('default.currency'), true)</td>
</tr>

View File

@ -2,11 +2,11 @@
<table class="table align-items-center">
<tfoot class="border-top-style">
<tr>
<th class="long-texts report-column">{{ trans('reports.net_profit') }}</th>
<th class="report-column">{{ trans('reports.net_profit') }}</th>
@foreach($class->net_profit as $profit)
<th class="long-texts report-column text-right">@money($profit, setting('default.currency'), true)</th>
<th class="report-column text-right px-0">@money($profit, setting('default.currency'), true)</th>
@endforeach
<th class="long-texts report-column text-right">
<th class="report-column text-right">
@money(array_sum($class->net_profit), setting('default.currency'), true)
</th>
</tr>

View File

@ -2,12 +2,12 @@
<table class="table align-items-center">
<thead class="border-top-style">
<tr>
<th class="long-texts report-column text-right"></th>
<th class="report-column text-right"></th>
@foreach($class->dates as $date)
<th class="long-texts report-column text-right">{{ $date }}</th>
<th class="report-column text-right px-0">{{ $date }}</th>
@endforeach
<th class="long-texts report-column text-right">
<h5>{{ trans_choice('general.totals', 1) }}</h5>
<th class="report-column text-right">
{{ trans_choice('general.totals', 1) }}
</th>
</tr>
</thead>

View File

@ -1,11 +1,11 @@
<tfoot>
<tr>
<th class="long-texts report-column">{{ trans_choice('general.totals', 1) }}</th>
<th class="report-column">{{ trans_choice('general.totals', 1) }}</th>
@php $total_total = 0; @endphp
@foreach($class->totals[$table] as $date => $total)
@php $total_total += $total; @endphp
<th class="long-texts report-column text-right">@money($total, setting('default.currency'), true)</th>
<th class="report-column text-right px-0">@money($total, setting('default.currency'), true)</th>
@endforeach
<th class="long-texts report-column text-right">@money($total_total, setting('default.currency'), true)</th>
<th class="report-column text-right">@money($total_total, setting('default.currency'), true)</th>
</tr>
</tfoot>

View File

@ -2,11 +2,11 @@
<table class="table align-items-center">
<thead class="border-top-style">
<tr>
<th class="long-texts report-column text-right"></th>
<th class="report-column text-right"></th>
@foreach($class->dates as $date)
<th class="long-texts report-column text-right">{{ $date }}</th>
<th class="report-column text-right px-0">{{ $date }}</th>
@endforeach
<th class="long-texts report-column text-right">
<th class="report-column text-right">
<h5>{{ trans_choice('general.totals', 1) }}</h5>
</th>
</tr>

View File

@ -1,11 +1,11 @@
<tfoot>
<tr>
<th class="long-texts report-column">{{ trans('reports.net') }}</th>
<th class="report-column">{{ trans('reports.net') }}</th>
@php $total_total = 0; @endphp
@foreach($class->totals[$table] as $total)
@php $total_total += $total; @endphp
<th class="long-texts report-column text-right">@money($total, setting('default.currency'), true)</th>
<th class="report-column text-right px-0">@money($total, setting('default.currency'), true)</th>
@endforeach
<th class="long-texts report-column text-right">@money($total_total, setting('default.currency'), true)</th>
<th class="report-column text-right">@money($total_total, setting('default.currency'), true)</th>
</tr>
</tfoot>