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 Modern Start--*/
|
||||
.justify-content-between
|
||||
{
|
||||
justify-content: space-between !important;
|
||||
}
|
||||
|
||||
.align-items-center
|
||||
{
|
||||
align-items: center !important;
|
||||
|
@ -1,9 +1,17 @@
|
||||
@php
|
||||
$is_print = request()->routeIs('reports.print');
|
||||
@endphp
|
||||
|
||||
@include($class->views['summary.content.header'])
|
||||
|
||||
@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.chart'])
|
||||
|
||||
@if (! $is_print)
|
||||
@include($class->views['summary.chart'])
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
|
@ -1,10 +1,20 @@
|
||||
<div>
|
||||
<div class="flex items-center justify-between text-xl text-black-400 border-b pb-2">
|
||||
<h2>{{ $table_name }}</h2>
|
||||
<span>{{ $class->has_money ? money($grand_total, default_currency(), true) : $grand_total }}</span>
|
||||
<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>
|
||||
<span>{{ $class->has_money ? money($grand_total, default_currency(), true) : $grand_total }}</span>
|
||||
</div>
|
||||
@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)
|
||||
@include($class->views['summary.table.row'], ['tree_level' => 0])
|
||||
@endforeach
|
||||
|
@ -6,15 +6,25 @@
|
||||
|
||||
@if ($row_total = array_sum($rows))
|
||||
@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
|
||||
<li>
|
||||
@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))
|
||||
<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
|
||||
<div class="flex items-center">
|
||||
<div style="display:flex; align-items: center;">
|
||||
@endif
|
||||
<span>{{ $class->row_names[$table_key][$id] }}</span>
|
||||
</div>
|
||||
@ -43,17 +53,24 @@
|
||||
|
||||
@if ($row_total = array_sum($parent_row_values))
|
||||
@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
|
||||
<li>
|
||||
@endif
|
||||
<div class="flex justify-between border-0 m-0 p-0">
|
||||
<div class="flex items-center" style="padding-left: {{ $tree_level * 20 }}px;">
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<div style="display:flex; align-items: center; padding-left: {{ $tree_level * 20 }}px;">
|
||||
<span>{{ $class->row_names[$table_key][$id] }}</span>
|
||||
@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)">
|
||||
<span class="material-icons transform rotate-90 transition-all text-lg leading-none">navigate_next</span>
|
||||
</button>
|
||||
@if (!$is_print)
|
||||
@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)">
|
||||
<span class="material-icons transform rotate-90 transition-all text-lg leading-none">navigate_next</span>
|
||||
</button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
<span>{{ $class->has_money ? money($row_total, setting('default.currency'), true) : $row_total }}</span>
|
||||
@ -64,9 +81,14 @@
|
||||
<!-- no categories part -->
|
||||
@php $rows = $class->row_values[$table_key][$id]; @endphp
|
||||
@if (($row_total = array_sum($rows)) && array_sum($parent_row_values) != array_sum($rows))
|
||||
<li class="collapse-sub" data-collapse="child-{{ $id }}">
|
||||
<div class="flex justify-between border-0 m-0 p-0">
|
||||
<div class="flex items-center" style="padding-left: {{ ($tree_level + 1) * 20 }}px;">
|
||||
<li
|
||||
@class([
|
||||
'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>
|
||||
</div>
|
||||
<span>{{ $class->has_money ? money($row_total, setting('default.currency'), true) : $row_total }}</span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user