Fixed report print, pdf and export styling..
This commit is contained in:
parent
9abd5f4ab4
commit
2d212119fc
|
|
@ -256,12 +256,12 @@ abstract class Report
|
|||
|
||||
public function print()
|
||||
{
|
||||
return view($this->views['print'])->with('class', $this);
|
||||
return view($this->views['print'], ['print' => true])->with('class', $this);
|
||||
}
|
||||
|
||||
public function pdf()
|
||||
{
|
||||
$view = view($this->views['print'])->with('class', $this)->render();
|
||||
$view = view($this->views['print'], ['print' => true])->with('class', $this)->render();
|
||||
|
||||
$html = mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8');
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class Reports implements FromView, ShouldAutoSize, WithTitle
|
|||
|
||||
public function view(): View
|
||||
{
|
||||
return view($this->view, ['class' => $this->class]);
|
||||
return view($this->view, ['class' => $this->class, 'print' => true]);
|
||||
}
|
||||
|
||||
public function title(): string
|
||||
|
|
|
|||
|
|
@ -49,12 +49,13 @@
|
|||
|
||||
<div class="flex items-center">
|
||||
{{ $class->row_names[$table_key][$id] }}
|
||||
@if (array_sum($parent_row_values) != array_sum($class->row_values[$table_key][$id]))
|
||||
@if (! $print && 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 mt-.05">expand_less</span>
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</td>
|
||||
@foreach($parent_row_values as $row)
|
||||
<td class="{{ $class->column_value_width }} py-2 ltr:text-right rtl:text-left text-alignment-right text-black-400 text-xs">{{ $class->has_money ? money($row) : $row }}</td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue