Merge pull request #1138 from batuhawk/master

Report print updated
This commit is contained in:
Batuhan Baş 2020-01-18 18:46:23 +03:00 committed by GitHub
commit 7faa95efc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 39 additions and 31 deletions

20
public/css/print.css vendored
View File

@ -348,13 +348,25 @@ th, td {
*/ */
.rp-border-top-1 { .rp-border-top-1 {
border-top: 1px solid #3c3f72; border-top: 1px solid #e5e5e5;
} }
.rp-border-bottom-1 { .rp-border-bottom-1 {
border-bottom: 1px solid #3c3f72; border-bottom: 1px solid #e5e5e5;
} }
.rp-border-top-1 {
border-top: 1px solid #e5e5e5;
}
.rp-border-0 {
border: 0 !important;
}
.rp-border-collapse
{
border-collapse: collapse;
}
.rp-float-left { .rp-float-left {
float: left; float: left;
@ -371,7 +383,3 @@ th, td {
========================================================= =========================================================
*/ */

View File

@ -1,5 +1,5 @@
<div class="table-responsive overflow-auto mt-4"> <div class="table-responsive overflow-auto mt-4">
<table class="table align-items-center"> <table class="table align-items-center rp-border-collapse">
@include($class->views['table.header']) @include($class->views['table.header'])
<tbody> <tbody>
@if (!empty($class->rows[$table])) @if (!empty($class->rows[$table]))

View File

@ -1,5 +1,5 @@
<tfoot> <tfoot>
<tr> <tr class="rp-border-top-1">
<th class="report-column">{{ trans_choice('general.totals', 1) }}</th> <th class="report-column">{{ trans_choice('general.totals', 1) }}</th>
@php $total_total = 0; @endphp @php $total_total = 0; @endphp
@foreach($class->totals[$table] as $total) @foreach($class->totals[$table] as $total)

View File

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

View File

@ -1,12 +1,12 @@
<div class="table-responsive overflow-auto mt-5"> <div class="table-responsive overflow-auto mt-5">
<table class="table align-items-center"> <table class="table align-items-center rp-border-collapse">
<tfoot class="border-top-style"> <tfoot class="border-top-style">
<tr> <tr class="rp-border-top-1">
<th class="report-column rp-border-top-1">{{ trans('reports.net_profit') }}</th> <th class="report-column">{{ trans('reports.net_profit') }}</th>
@foreach($class->net_profit as $profit) @foreach($class->net_profit as $profit)
<th class="report-column text-right px-0 rp-border-top-1">@money($profit, setting('default.currency'), true)</th> <th class="report-column text-right px-0">@money($profit, setting('default.currency'), true)</th>
@endforeach @endforeach
<th class="report-column text-right rp-border-top-1"> <th class="report-column text-right">
@money(array_sum($class->net_profit), setting('default.currency'), true) @money(array_sum($class->net_profit), setting('default.currency'), true)
</th> </th>
</tr> </tr>

View File

@ -1,12 +1,12 @@
<div class="table-responsive overflow-auto"> <div class="table-responsive overflow-auto">
<table class="table align-items-center"> <table class="table align-items-center rp-border-collapse">
<thead class="border-top-style"> <thead class="border-top-style">
<tr> <tr class="rp-border-bottom-1">
<th class="report-column text-right rp-border-bottom-1"></th> <th class="report-column text-right"></th>
@foreach($class->dates as $date) @foreach($class->dates as $date)
<th class="report-column text-right px-0 rp-border-bottom-1">{{ $date }}</th> <th class="report-column text-right px-0">{{ $date }}</th>
@endforeach @endforeach
<th class="report-column text-right rp-border-bottom-1"> <th class="report-column text-right">
{{ trans_choice('general.totals', 1) }} {{ trans_choice('general.totals', 1) }}
</th> </th>
</tr> </tr>

View File

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

View File

@ -1,5 +1,5 @@
<div class="table-responsive overflow-auto"> <div class="table-responsive overflow-auto">
<table class="table align-items-center"> <table class="table align-items-center rp-border-collapse">
<thead class="border-top-style"> <thead class="border-top-style">
<tr> <tr>
<th class="report-column text-right rp-border-bottom-1"></th> <th class="report-column text-right rp-border-bottom-1"></th>

View File

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