v2 first commit

This commit is contained in:
denisdulici
2019-11-16 10:21:14 +03:00
parent 5b23e9c2c4
commit 6d50fa8442
3075 changed files with 3451681 additions and 65594 deletions

View File

@ -0,0 +1,17 @@
@php $chart = $class->getChart(); @endphp
<div class="card-body" id="report-chart">
{!! $chart->container() !!}
</div>
@push('charts')
<script>
var cash_flow = new Vue({
el: '#report-chart',
});
</script>
@endpush
@push('body_scripts')
{!! $chart->script() !!}
@endpush

View File

@ -0,0 +1,7 @@
@include($class->views['content.header'])
@foreach($class->tables as $table)
@include($class->views['table'])
@endforeach
@include($class->views['content.footer'])

View File

@ -0,0 +1,19 @@
<div class="card-header">
{!! Form::open([
'url' => 'common/reports/' . $class->report->id . '/display',
'role' => 'form',
'method' => 'GET',
'class' => 'mb-0',
]) !!}
<div id="items" class="float-left box-filter">
{!! Form::select('year', $class->filters['years'], request('year', $class->year), ['class' => 'form-control form-control-sm table-header-search ml--2']) !!}
@php unset($class->filters['years']) @endphp
@foreach($class->filters as $name => $values)
{!! Form::select($name . '[]', $values, request($name), ['id' => 'filter-' . $name, 'class' => 'form-control form-control-sm table-header-search']) !!}
@endforeach
{!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-secondary btn-sm card-buttons ml-1']) !!}
</div>
{!! Form::close() !!}
</div>

View File

@ -0,0 +1,10 @@
@section('title', $class->report->name)
@section('new_button')
<span class="new-button">
<a href="{{ url($class->getUrl('print')) }}" target="_blank" class="btn btn-white btn-sm"><span class="fa fa-print"></span> &nbsp;{{ trans('general.print') }}</a>
</span>
<span>
<a href="{{ url($class->getUrl('export')) }}" class="btn btn-white btn-sm"><span class="fa fa-upload"></span> &nbsp;{{ trans('general.export') }}</a>
</span>
@endsection

View File

@ -0,0 +1,11 @@
@extends('layouts.print')
@section('title', $class->report->name)
@section('content')
@if($class->report->chart)
@include($class->views['chart'])
@endif
@include($class->views['content'])
@endsection

View File

@ -0,0 +1,15 @@
@extends('layouts.admin')
@include($class->views['header'])
@section('content')
<div class="card">
@include($class->views['filter'])
@if($class->report->chart)
@include($class->views['chart'])
@endif
@include($class->views['content'])
</div>
@endsection

View File

@ -0,0 +1,19 @@
<div class="table-responsive mt-4 overflow-auto">
<table class="table align-items-center table-hover" id="tbl-report">
@include($class->views['table.header'])
<tbody>
@if (!empty($class->rows[$table]))
@foreach($class->rows[$table] as $id => $items)
@include($class->views['table.rows'])
@endforeach
@else
<tr>
<td colspan="{{ count($class->dates) + 2 }}">
<h5 class="text-center pl-0">{{ trans('general.no_records') }}</h5>
</td>
</tr>
@endif
</tbody>
@include($class->views['table.footer'])
</table>
</div>

View File

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

View File

@ -0,0 +1,13 @@
<thead class="thead-light">
<tr>
@if ($table == 'default')
<th>{{ $class->groups[$class->report->group] }}</th>
@else
<th class="text-right pl-0">{{ $table }}</th>
@endif
@foreach($class->dates as $date)
<th class="text-right pl-0">{{ $date }}</th>
@endforeach
<th class="text-right pl-0">{{ trans_choice('general.totals', 1) }}</th>
</tr>
</thead>

View File

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