Merge pull request #2470 from brkcvn/master
Report view edited for summary print
This commit is contained in:
commit
f4f2eddaeb
5
public/css/print.css
vendored
5
public/css/print.css
vendored
@ -546,6 +546,11 @@ html[dir='rtl'] .text-alignment-right {
|
|||||||
/*--Print Template Classic Finish--*/
|
/*--Print Template Classic Finish--*/
|
||||||
|
|
||||||
/*--Print Template Modern Start--*/
|
/*--Print Template Modern Start--*/
|
||||||
|
.justify-content-between
|
||||||
|
{
|
||||||
|
justify-content: space-between !important;
|
||||||
|
}
|
||||||
|
|
||||||
.align-items-center
|
.align-items-center
|
||||||
{
|
{
|
||||||
align-items: center !important;
|
align-items: center !important;
|
||||||
|
@ -1,9 +1,17 @@
|
|||||||
|
@php
|
||||||
|
$is_print = request()->routeIs('reports.print');
|
||||||
|
@endphp
|
||||||
|
|
||||||
@include($class->views['summary.content.header'])
|
@include($class->views['summary.content.header'])
|
||||||
|
|
||||||
@foreach($class->tables as $table_key => $table_name)
|
@foreach($class->tables as $table_key => $table_name)
|
||||||
<div class="flex flex-col lg:flex-row mt-12">
|
<div
|
||||||
|
class="flex flex-col lg:flex-row mt-12">
|
||||||
@include($class->views['summary.table'])
|
@include($class->views['summary.table'])
|
||||||
|
|
||||||
|
@if (! $is_print)
|
||||||
@include($class->views['summary.chart'])
|
@include($class->views['summary.chart'])
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
@ -1,10 +1,20 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="flex items-center justify-between text-xl text-black-400 border-b pb-2">
|
<div
|
||||||
|
@class([
|
||||||
|
'd-flex align-items-center justify-content-between rp-border-bottom-1 text' => $is_print,
|
||||||
|
'flex items-center justify-between text-xl text-black-400 border-b pb-2' => !$is_print
|
||||||
|
])
|
||||||
|
>
|
||||||
<h2>{{ $table_name }}</h2>
|
<h2>{{ $table_name }}</h2>
|
||||||
<span>{{ $class->has_money ? money($grand_total, default_currency(), true) : $grand_total }}</span>
|
<span>{{ $class->has_money ? money($grand_total, default_currency(), true) : $grand_total }}</span>
|
||||||
</div>
|
</div>
|
||||||
@if (!empty($class->row_values[$table_key]))
|
@if (!empty($class->row_values[$table_key]))
|
||||||
<ul class="space-y-2 my-3">
|
<ul
|
||||||
|
@class([
|
||||||
|
'print-template text-normal' => $is_print,
|
||||||
|
'space-y-2 my-3' => !$is_print
|
||||||
|
])
|
||||||
|
>
|
||||||
@foreach($class->row_tree_nodes[$table_key] as $id => $node)
|
@foreach($class->row_tree_nodes[$table_key] as $id => $node)
|
||||||
@include($class->views['summary.table.row'], ['tree_level' => 0])
|
@include($class->views['summary.table.row'], ['tree_level' => 0])
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@ -6,15 +6,25 @@
|
|||||||
|
|
||||||
@if ($row_total = array_sum($rows))
|
@if ($row_total = array_sum($rows))
|
||||||
@if (isset($parent_id))
|
@if (isset($parent_id))
|
||||||
<li class="collapse-sub" data-collapse="child-{{ $parent_id }}">
|
<li
|
||||||
|
@class([
|
||||||
|
'mt-1' => $is_print,
|
||||||
|
'collapse-sub' => !$is_print
|
||||||
|
])
|
||||||
|
data-collapse="child-{{ $parent_id }}">
|
||||||
@else
|
@else
|
||||||
<li>
|
<li>
|
||||||
@endif
|
@endif
|
||||||
<div class="flex justify-between border-0 m-0 p-0">
|
<div
|
||||||
|
@class([
|
||||||
|
'd-flex align-items-center justify-content-between' => $is_print,
|
||||||
|
'flex justify-between border-0 m-0 p-0' => !$is_print
|
||||||
|
])
|
||||||
|
>
|
||||||
@if (isset($parent_id))
|
@if (isset($parent_id))
|
||||||
<div class="flex items-center" style="padding-left: {{ $tree_level * 20 }}px;">
|
<div style="display:flex; align-items: center; padding-left: {{ $tree_level * 20 }}px;">
|
||||||
@else
|
@else
|
||||||
<div class="flex items-center">
|
<div style="display:flex; align-items: center;">
|
||||||
@endif
|
@endif
|
||||||
<span>{{ $class->row_names[$table_key][$id] }}</span>
|
<span>{{ $class->row_names[$table_key][$id] }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -43,18 +53,25 @@
|
|||||||
|
|
||||||
@if ($row_total = array_sum($parent_row_values))
|
@if ($row_total = array_sum($parent_row_values))
|
||||||
@if (isset($parent_id))
|
@if (isset($parent_id))
|
||||||
<li class="collapse-sub" data-collapse="child-{{ $parent_id }}">
|
<li
|
||||||
|
@class([
|
||||||
|
'mt-1' => $is_print,
|
||||||
|
'collapse-sub' => !$is_print
|
||||||
|
])
|
||||||
|
data-collapse="child-{{ $parent_id }}">
|
||||||
@else
|
@else
|
||||||
<li>
|
<li>
|
||||||
@endif
|
@endif
|
||||||
<div class="flex justify-between border-0 m-0 p-0">
|
<div style="display: flex; justify-content: space-between;">
|
||||||
<div class="flex items-center" style="padding-left: {{ $tree_level * 20 }}px;">
|
<div style="display:flex; align-items: center; padding-left: {{ $tree_level * 20 }}px;">
|
||||||
<span>{{ $class->row_names[$table_key][$id] }}</span>
|
<span>{{ $class->row_names[$table_key][$id] }}</span>
|
||||||
|
@if (!$is_print)
|
||||||
@if (array_sum($parent_row_values) != array_sum($class->row_values[$table_key][$id]))
|
@if (array_sum($parent_row_values) != array_sum($class->row_values[$table_key][$id]))
|
||||||
<button type="button" class="align-text-top flex" node="child-{{ $id }}" onClick="toggleSub('child-{{ $id }}', event)">
|
<button type="button" class="align-text-top flex" node="child-{{ $id }}" onClick="toggleSub('child-{{ $id }}', event)">
|
||||||
<span class="material-icons transform rotate-90 transition-all text-lg leading-none">navigate_next</span>
|
<span class="material-icons transform rotate-90 transition-all text-lg leading-none">navigate_next</span>
|
||||||
</button>
|
</button>
|
||||||
@endif
|
@endif
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<span>{{ $class->has_money ? money($row_total, setting('default.currency'), true) : $row_total }}</span>
|
<span>{{ $class->has_money ? money($row_total, setting('default.currency'), true) : $row_total }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -64,9 +81,14 @@
|
|||||||
<!-- no categories part -->
|
<!-- no categories part -->
|
||||||
@php $rows = $class->row_values[$table_key][$id]; @endphp
|
@php $rows = $class->row_values[$table_key][$id]; @endphp
|
||||||
@if (($row_total = array_sum($rows)) && array_sum($parent_row_values) != array_sum($rows))
|
@if (($row_total = array_sum($rows)) && array_sum($parent_row_values) != array_sum($rows))
|
||||||
<li class="collapse-sub" data-collapse="child-{{ $id }}">
|
<li
|
||||||
<div class="flex justify-between border-0 m-0 p-0">
|
@class([
|
||||||
<div class="flex items-center" style="padding-left: {{ ($tree_level + 1) * 20 }}px;">
|
'mt-1' => $is_print,
|
||||||
|
'collapse-sub' => !$is_print
|
||||||
|
])
|
||||||
|
data-collapse="child-{{ $id }}">
|
||||||
|
<div style="display: flex; justify-content: space-between;">
|
||||||
|
<div style="display:flex; align-items: center; padding-left: {{ ($tree_level + 1) * 20 }}px;">
|
||||||
<span>{{ $class->row_names[$table_key][$id] }}</span>
|
<span>{{ $class->row_names[$table_key][$id] }}</span>
|
||||||
</div>
|
</div>
|
||||||
<span>{{ $class->has_money ? money($row_total, setting('default.currency'), true) : $row_total }}</span>
|
<span>{{ $class->has_money ? money($row_total, setting('default.currency'), true) : $row_total }}</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user