reports view alignment updated
This commit is contained in:
parent
e6577b00f1
commit
7136f597d8
@ -16,6 +16,11 @@ class ProfitLoss extends Report
|
|||||||
|
|
||||||
public $icon = 'fa fa-heart';
|
public $icon = 'fa fa-heart';
|
||||||
|
|
||||||
|
public $indents = [
|
||||||
|
'table_header' => '0px',
|
||||||
|
'table_rows' => '48px',
|
||||||
|
];
|
||||||
|
|
||||||
public function setViews()
|
public function setViews()
|
||||||
{
|
{
|
||||||
parent::setViews();
|
parent::setViews();
|
||||||
|
@ -21,10 +21,16 @@ class TaxSummary extends Report
|
|||||||
|
|
||||||
public $icon = 'fa fa-percent';
|
public $icon = 'fa fa-percent';
|
||||||
|
|
||||||
|
public $indents = [
|
||||||
|
'table_header' => '0px',
|
||||||
|
'table_rows' => '48px',
|
||||||
|
];
|
||||||
|
|
||||||
public function setViews()
|
public function setViews()
|
||||||
{
|
{
|
||||||
parent::setViews();
|
parent::setViews();
|
||||||
$this->views['content.header'] = 'reports.tax_summary.content.header';
|
$this->views['content.header'] = 'reports.tax_summary.content.header';
|
||||||
|
$this->views['content.footer'] = 'reports.tax_summary.content.footer';
|
||||||
$this->views['table.header'] = 'reports.tax_summary.table.header';
|
$this->views['table.header'] = 'reports.tax_summary.table.header';
|
||||||
$this->views['table.footer'] = 'reports.tax_summary.table.footer';
|
$this->views['table.footer'] = 'reports.tax_summary.table.footer';
|
||||||
}
|
}
|
||||||
@ -62,6 +68,17 @@ class TaxSummary extends Report
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: move to views
|
||||||
|
foreach ($this->footer_totals as $table => $dates) {
|
||||||
|
foreach ($dates as $date => $total) {
|
||||||
|
if (!isset($this->net_profit[$date])) {
|
||||||
|
$this->net_profit[$date] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->net_profit[$date] += $total;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setTotals($items, $date_field, $check_type = false, $table = 'default')
|
public function setTotals($items, $date_field, $check_type = false, $table = 'default')
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
@section('new_button')
|
@section('new_button')
|
||||||
<span>
|
<span>
|
||||||
<a href="{{ url($class->getUrl('print')) }}" target="_blank" class="btn btn-white header-button-top btn-sm">
|
<a href="{{ url($class->getUrl('print')) }}" target="_blank" class="btn btn-white btn-sm header-button-top">
|
||||||
<span class="fa fa-print"></span> {{ trans('general.print') }}
|
<span class="fa fa-print"></span> {{ trans('general.print') }}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<a href="{{ url($class->getUrl('export')) }}" class="btn btn-white header-button-top btn-sm">
|
<a href="{{ url($class->getUrl('export')) }}" class="btn btn-white btn-sm header-button-top">
|
||||||
<span class="fa fa-upload"></span> {{ trans('general.export') }}
|
<span class="fa fa-upload"></span> {{ trans('general.export') }}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="table-responsive overflow-auto mt-4">
|
<div class="table-responsive overflow-auto">
|
||||||
<table class="table align-items-center rp-border-collapse">
|
<table class="table table-hover align-items-center rp-border-collapse">
|
||||||
@include($class->views['table.header'])
|
@include($class->views['table.header'])
|
||||||
<tbody>
|
<tbody>
|
||||||
@if (!empty($class->row_values[$table]))
|
@if (!empty($class->row_values[$table]))
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<tfoot>
|
<tfoot>
|
||||||
<tr class="rp-border-top-1">
|
<tr class="rp-border-top-1">
|
||||||
<th class="report-column text-left">{{ trans_choice('general.totals', 1) }}</th>
|
<th class="report-column text-left text-uppercase">{{ trans_choice('general.totals', 1) }}</th>
|
||||||
@php $grand_total = 0; @endphp
|
@php $grand_total = 0; @endphp
|
||||||
@foreach($class->footer_totals[$table] as $total)
|
@foreach($class->footer_totals[$table] as $total)
|
||||||
@php $grand_total += $total; @endphp
|
@php $grand_total += $total; @endphp
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<div class="table-responsive overflow-auto mt-5">
|
<div class="table-responsive overflow-auto my-4">
|
||||||
<table class="table align-items-center rp-border-collapse">
|
<table class="table table-hover align-items-center rp-border-collapse">
|
||||||
<tfoot class="border-top-style">
|
<tfoot class="border-top-style">
|
||||||
<tr class="rp-border-top-1">
|
<tr class="rp-border-top-1">
|
||||||
<th class="report-column">{{ trans('reports.net_profit') }}</th>
|
<th class="report-column text-uppercase">{{ 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">@money($profit, setting('default.currency'), true)</th>
|
<th class="report-column text-right px-0">@money($profit, setting('default.currency'), true)</th>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<div class="table-responsive overflow-auto">
|
<div class="table-responsive overflow-auto mt-4">
|
||||||
<table class="table align-items-center rp-border-collapse">
|
<table class="table table-hover align-items-center rp-border-collapse">
|
||||||
<thead class="border-top-style">
|
<thead class="border-top-style">
|
||||||
<tr class="rp-border-bottom-1">
|
<tr class="rp-border-bottom-1">
|
||||||
<th class="report-column text-right"></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">{{ $date }}</th>
|
<th class="report-column text-right px-0">{{ $date }}</th>
|
||||||
@endforeach
|
@endforeach
|
||||||
<th class="report-column text-right">
|
<th class="report-column text-right text-uppercase">
|
||||||
{{ trans_choice('general.totals', 1) }}
|
{{ trans_choice('general.totals', 1) }}
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<tfoot>
|
<tfoot>
|
||||||
<tr class="rp-border-top-1">
|
<tr class="rp-border-top-1">
|
||||||
<th class="report-column text-left">{{ trans_choice('general.totals', 1) }}</th>
|
<th class="report-column text-left text-uppercase">{{ trans_choice('general.totals', 1) }}</th>
|
||||||
@php $grand_total = 0; @endphp
|
@php $grand_total = 0; @endphp
|
||||||
@foreach($class->footer_totals[$table] as $date => $total)
|
@foreach($class->footer_totals[$table] as $date => $total)
|
||||||
@php $grand_total += $total; @endphp
|
@php $grand_total += $total; @endphp
|
||||||
|
15
resources/views/reports/tax_summary/content/footer.blade.php
Normal file
15
resources/views/reports/tax_summary/content/footer.blade.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<div class="table-responsive overflow-auto my-4">
|
||||||
|
<table class="table table-hover align-items-center rp-border-collapse">
|
||||||
|
<tfoot class="border-top-style">
|
||||||
|
<tr class="rp-border-top-1">
|
||||||
|
<th class="report-column text-uppercase">{{ trans('reports.net_profit') }}</th>
|
||||||
|
@foreach($class->net_profit as $profit)
|
||||||
|
<th class="report-column text-right px-0">@money($profit, setting('default.currency'), true)</th>
|
||||||
|
@endforeach
|
||||||
|
<th class="report-column text-right">
|
||||||
|
@money(array_sum($class->net_profit), setting('default.currency'), true)
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
@ -1,5 +1,5 @@
|
|||||||
<div class="table-responsive overflow-auto">
|
<div class="table-responsive overflow-auto mt-4">
|
||||||
<table class="table align-items-center rp-border-collapse">
|
<table class="table table-hover 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>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<thead class="border-top-style">
|
<thead class="border-top-style mt-4">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="rp-float-left" colspan="{{ count($class->dates) + 2 }}">
|
<th class="rp-float-left" colspan="{{ count($class->dates) + 2 }}">
|
||||||
<h4>{{ $table }}</h4>
|
<h4>{{ $table }}</h4>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user