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

@ -1,48 +0,0 @@
<div class="box-body">
{!! $chart->render() !!}
<hr>
<div class="table table-responsive table-report">
<table class="table table-bordered table-striped table-hover" id="tbl-report-expenses">
<thead>
<tr>
<th>{{ trans_choice('general.categories', 1) }}</th>
@foreach($dates as $date)
<th class="text-right">{{ $date }}</th>
@endforeach
</tr>
</thead>
<tbody>
@if ($expenses)
@foreach($expenses as $category_id => $category)
<tr>
<td>{{ $categories[$category_id] }}</td>
@foreach($category as $item)
<td class="text-right">@money($item['amount'], setting('general.default_currency'), true)</td>
@endforeach
</tr>
@endforeach
@else
<tr>
<td colspan="13">
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
</td>
</tr>
@endif
</tbody>
<tfoot>
<tr>
<th>{{ trans_choice('general.totals', 1) }}</th>
@foreach($totals as $total)
<th class="text-right">@money($total['amount'], $total['currency_code'], true)</th>
@endforeach
</tr>
</tfoot>
</table>
</div>
</div>
@push('js')
{!! Charts::assets() !!}
@endpush

View File

@ -1,46 +0,0 @@
@extends('layouts.admin')
@section('title', trans('reports.summary.expense'))
@section('new_button')
<span class="new-button"><a href="{{ url($print_url) }}" target="_blank" class="btn btn-success btn-sm"><span class="fa fa-print"></span> &nbsp;{{ trans('general.print') }}</a></span>
@endsection
@section('content')
<!-- Default box -->
<div class="box box-success">
<div class="box-header with-border">
{!! Form::open(['url' => 'reports/expense-summary', 'role' => 'form', 'method' => 'GET']) !!}
<div id="items" class="pull-left box-filter">
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('accounts[]', $accounts, request('accounts'), ['id' => 'filter-accounts', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
{!! Form::select('vendors[]', $vendors, request('vendors'), ['id' => 'filter-vendors', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
{!! Form::select('categories[]', $categories, request('categories'), ['id' => 'filter-categories', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
{!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
</div>
{!! Form::close() !!}
</div>
@include('reports.expense_summary.body')
</div>
<!-- /.box -->
@endsection
@push('scripts')
<script type="text/javascript">
$(document).ready(function(){
$("#filter-accounts").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
});
$("#filter-vendors").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
});
$("#filter-categories").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
});
});
</script>
@endpush

View File

@ -1,7 +0,0 @@
@extends('layouts.print')
@section('title', trans('reports.summary.expense'))
@section('content')
@include('reports.expense_summary.body')
@endsection

View File

@ -1,66 +0,0 @@
<div class="box-body">
{!! $chart->render() !!}
<hr>
<div class="table table-responsive table-report">
<table class="table table-bordered table-striped table-hover" id="tbl-payments">
<thead>
<tr>
<th>{{ trans_choice('general.categories', 1) }}</th>
@foreach($dates as $date)
<th class="text-right">{{ $date }}</th>
@endforeach
</tr>
</thead>
<tbody>
@if ($compares)
@foreach($compares as $type => $categories)
@foreach($categories as $category_id => $category)
<tr>
@if($type == 'income')
<td>{{ $income_categories[$category_id] }}</td>
@else
<td>{{ $expense_categories[$category_id] }}</td>
@endif
@foreach($category as $item)
@if($type == 'income')
<td class="text-right">@money($item['amount'], setting('general.default_currency'), true)</td>
@else
<td class="text-right">@money(-$item['amount'], setting('general.default_currency'), true)</td>
@endif
@endforeach
</tr>
@endforeach
@endforeach
@else
<tr>
<td colspan="13">
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
</td>
</tr>
@endif
</tbody>
<tfoot>
<tr>
<th>{{ trans_choice('general.totals', 1) }}</th>
@foreach($totals as $total)
<th class="text-right">
@if($total['amount'] == 0)
<span>@money($total['amount'], $total['currency_code'], true)</span>
@elseif($total['amount'] > 0)
<span class="text-green">@money($total['amount'], $total['currency_code'], true)</span>
@else
<span class="text-red">@money($total['amount'], $total['currency_code'], true)</span>
@endif
</th>
@endforeach
</tr>
</tfoot>
</table>
</div>
</div>
@push('js')
{!! Charts::assets() !!}
@endpush

View File

@ -1,51 +0,0 @@
@extends('layouts.admin')
@section('title', trans('reports.summary.income_expense'))
@section('new_button')
<span class="new-button"><a href="{{ url($print_url) }}" target="_blank" class="btn btn-success btn-sm"><span class="fa fa-print"></span> &nbsp;{{ trans('general.print') }}</a></span>
@endsection
@section('content')
<!-- Default box -->
<div class="box box-success">
<div class="box-header with-border">
{!! Form::open(['url' => 'reports/income-expense-summary', 'role' => 'form', 'method' => 'GET']) !!}
<div id="items" class="pull-left box-filter">
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('accounts[]', $accounts, request('accounts'), ['id' => 'filter-accounts', 'class' => 'form-control input-filter', 'multiple' => 'multiple']) !!}
{!! Form::select('customers[]', $customers, request('customers'), ['id' => 'filter-customers', 'class' => 'form-control input-filter', 'multiple' => 'multiple']) !!}
{!! Form::select('vendors[]', $vendors, request('vendors'), ['id' => 'filter-vendors', 'class' => 'form-control input-filter', 'multiple' => 'multiple']) !!}
{!! Form::select('categories[]', $categories, request('categories'), ['id' => 'filter-categories', 'class' => 'form-control input-filter', 'multiple' => 'multiple']) !!}
{!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
</div>
{!! Form::close() !!}
</div>
@include('reports.income_expense_summary.body')
</div>
<!-- /.box -->
@endsection
@push('scripts')
<script type="text/javascript">
$(document).ready(function(){
$("#filter-accounts").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
});
$("#filter-customers").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.customers', 1)]) }}"
});
$("#filter-vendors").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
});
$("#filter-categories").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
});
});
</script>
@endpush

View File

@ -1,7 +0,0 @@
@extends('layouts.print')
@section('title', trans('reports.summary.income_expense'))
@section('content')
@include('reports.income_expense_summary.body')
@endsection

View File

@ -1,48 +0,0 @@
<div class="box-body">
{!! $chart->render() !!}
<hr>
<div class="table table-responsive table-report">
<table class="table table-bordered table-striped table-hover" id="tbl-report-incomes">
<thead>
<tr>
<th>{{ trans_choice('general.categories', 1) }}</th>
@foreach($dates as $date)
<th class="text-right">{{ $date }}</th>
@endforeach
</tr>
</thead>
<tbody>
@if ($incomes)
@foreach($incomes as $category_id => $category)
<tr>
<td>{{ $categories[$category_id] }}</td>
@foreach($category as $item)
<td class="text-right">@money($item['amount'], setting('general.default_currency'), true)</td>
@endforeach
</tr>
@endforeach
@else
<tr>
<td colspan="13">
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
</td>
</tr>
@endif
</tbody>
<tfoot>
<tr>
<th>{{ trans_choice('general.totals', 1) }}</th>
@foreach($totals as $total)
<th class="text-right">@money($total['amount'], $total['currency_code'], true)</th>
@endforeach
</tr>
</tfoot>
</table>
</div>
</div>
@push('js')
{!! Charts::assets() !!}
@endpush

View File

@ -1,46 +0,0 @@
@extends('layouts.admin')
@section('title', trans('reports.summary.income'))
@section('new_button')
<span class="new-button"><a href="{{ url($print_url) }}" target="_blank" class="btn btn-success btn-sm"><span class="fa fa-print"></span> &nbsp;{{ trans('general.print') }}</a></span>
@endsection
@section('content')
<!-- Default box -->
<div class="box box-success">
<div class="box-header with-border">
{!! Form::open(['url' => 'reports/income-summary', 'role' => 'form', 'method' => 'GET']) !!}
<div id="items" class="pull-left box-filter">
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('accounts[]', $accounts, request('accounts'), ['id' => 'filter-accounts', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
{!! Form::select('customers[]', $customers, request('customers'), ['id' => 'filter-customers', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
{!! Form::select('categories[]', $categories, request('categories'), ['id' => 'filter-categories', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
{!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
</div>
{!! Form::close() !!}
</div>
@include('reports.income_summary.body')
</div>
<!-- /.box -->
@endsection
@push('scripts')
<script type="text/javascript">
$(document).ready(function(){
$("#filter-accounts").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
});
$("#filter-customers").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.customers', 1)]) }}"
});
$("#filter-categories").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
});
});
</script>
@endpush

View File

@ -1,7 +0,0 @@
@extends('layouts.print')
@section('title', trans('reports.summary.income'))
@section('content')
@include('reports.income_summary.body')
@endsection

View File

@ -1,77 +0,0 @@
<div class="box-body">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th class="col-sm-2">&nbsp;</th>
@foreach($dates as $date)
<th class="col-sm-2 text-right">{{ trans('reports.quarter.' . $date) }}</th>
@endforeach
<th class="col-sm-2 text-right">{{ trans_choice('general.totals', 1) }}</th>
</tr>
</thead>
</table>
<table class="table table-hover" style="margin-top: 40px">
<thead>
<tr>
<th class="col-sm-2" colspan="6">{{ trans_choice('general.incomes', 1) }}</th>
</tr>
</thead>
<tbody>
@foreach($compares['income'] as $category_id => $category)
<tr>
<td class="col-sm-2">{{ $income_categories[$category_id] }}</td>
@foreach($category as $i => $item)
@php $gross['income'][$i] += $item['amount']; @endphp
<td class="col-sm-2 text-right">@money($item['amount'], setting('general.default_currency'), true)</td>
@endforeach
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th class="col-sm-2">{{ trans('reports.gross_profit') }}</th>
@foreach($gross['income'] as $item)
<th class="col-sm-2 text-right">@money($item, setting('general.default_currency'), true)</th>
@endforeach
</tr>
</tfoot>
</table>
<table class="table table-hover" style="margin-top: 40px">
<thead>
<tr>
<th class="col-sm-2" colspan="6">{{ trans_choice('general.expenses', 2) }}</th>
</tr>
</thead>
<tbody>
@foreach($compares['expense'] as $category_id => $category)
<tr>
<td class="col-sm-2">{{ $expense_categories[$category_id] }}</td>
@foreach($category as $i => $item)
@php $gross['expense'][$i] += $item['amount']; @endphp
<td class="col-sm-2 text-right">@money($item['amount'], setting('general.default_currency'), true)</td>
@endforeach
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th class="col-sm-2">{{ trans('reports.total_expenses') }}</th>
@foreach($gross['expense'] as $item)
<th class="col-sm-2 text-right">@money($item, setting('general.default_currency'), true)</th>
@endforeach
</tr>
</tfoot>
</table>
<table class="table" style="margin-top: 40px">
<tbody>
<tr>
<th class="col-sm-2" colspan="6">{{ trans('reports.net_profit') }}</th>
@foreach($totals as $total)
<th class="col-sm-2 text-right"><span>@money($total['amount'], $total['currency_code'], true)</span></th>
@endforeach
</tr>
</tbody>
</table>
</div>
</div>

View File

@ -0,0 +1,13 @@
<div class="table-responsive mt-4 overflow-auto">
<table class="table align-items-center">
<thead class="border-top-style">
<tr>
<th style="width: 179px;">{{ trans('reports.net_profit') }}</th>
@foreach($class->net_profit as $profit)
<th class="text-right">@money($profit, setting('default.currency'), true)</th>
@endforeach
<th class="text-right">@money(array_sum($class->net_profit), setting('default.currency'), true)</th>
</tr>
</thead>
</table>
</div>

View File

@ -0,0 +1,13 @@
<div class="table-responsive mt-4 overflow-auto">
<table class="table align-items-center">
<thead class="border-top-style">
<tr>
<th style="width: 152px;"></th>
@foreach($class->dates as $date)
<th class="text-right">{{ $date }}</th>
@endforeach
<th class="text-right">{{ trans_choice('general.totals', 1) }}</th>
</tr>
</thead>
</table>
</div>

View File

@ -1,25 +0,0 @@
@extends('layouts.admin')
@section('title', trans('reports.profit_loss'))
@section('new_button')
<span class="new-button"><a href="{{ url('reports/profit-loss') }}?print=1&status={{ request('status') }}&year={{ request('year', $this_year) }}" target="_blank" class="btn btn-success btn-sm"><span class="fa fa-print"></span> &nbsp;{{ trans('general.print') }}</a></span>
@endsection
@section('content')
<!-- Default box -->
<div class="box box-success">
<div class="box-header with-border">
{!! Form::open(['url' => 'reports/profit-loss', 'role' => 'form', 'method' => 'GET']) !!}
<div id="items" class="pull-left" style="margin-left: 5px">
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
</div>
{!! Form::close() !!}
</div>
@include('reports.profit_loss.body')
</div>
<!-- /.box -->
@endsection

View File

@ -1,15 +0,0 @@
@extends('layouts.print')
@section('title', trans('reports.profit_loss'))
@section('content')
<div class="box-header">
<h2>{{ trans('reports.profit_loss') }}</h2>
<div class="text-muted">
{{ setting('general.company_name') }}
<br/>
{{ Date::parse(request('year') . '-1-1')->format($date_format) }} - {{ Date::parse(request('year') . '-12-31')->format($date_format) }}
</div>
</div>
@include('reports.profit_loss.body')
@endsection

View File

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

View File

@ -0,0 +1,5 @@
<thead class="border-top-style">
<tr>
<th colspan="{{ count($class->dates) + 2 }}">{{ $table }}</th>
</tr>
</thead>

View File

@ -1,57 +0,0 @@
<div class="box-body">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th style="width: 120px;">&nbsp;</th>
@foreach($dates as $date)
<th class="text-right">{{ $date }}</th>
@endforeach
</tr>
</thead>
</table>
@if ($taxes)
@foreach($taxes as $tax_name)
<table class="table table-hover" style="margin-top: 40px">
<thead>
<tr>
<th style="width: 120px;" colspan="13">{{ $tax_name }}</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width: 120px;">{{ trans_choice('general.incomes', 2) }}</td>
@foreach($incomes[$tax_name] as $tax_date)
<td class="text-right">@money($tax_date['amount'], setting('general.default_currency'), true)</td>
@endforeach
</tr>
<tr>
<td style="width: 120px;">{{ trans_choice('general.expenses', 2) }}</td>
@foreach($expenses[$tax_name] as $tax_date)
<td class="text-right">@money($tax_date['amount'], setting('general.default_currency'), true)</td>
@endforeach
</tr>
</tbody>
<tfoot>
<tr>
<th style="width: 120px;">{{ trans('reports.net') }}</th>
@foreach($totals[$tax_name] as $tax_date)
<th class="text-right">@money($tax_date['amount'], setting('general.default_currency'), true)</th>
@endforeach
</tr>
</tfoot>
</table>
@endforeach
@else
<table class="table table-bordered table-striped table-hover" style="margin-top: 40px">
<tbody>
<tr>
<td colspan="13">
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
</td>
</tr>
</tbody>
</table>
@endif
</div>
</div>

View File

@ -0,0 +1,13 @@
<div class="table-responsive mt-4">
<table class="table align-items-center">
<thead class="border-top-style">
<tr>
<th>&nbsp;</th>
@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>
</table>
</div>

View File

@ -1,25 +0,0 @@
@extends('layouts.admin')
@section('title', trans('reports.summary.tax'))
@section('new_button')
<span class="new-button"><a href="{{ url('reports/tax-summary') }}?print=1&status={{ request('status') }}&year={{ request('year', $this_year) }}" target="_blank" class="btn btn-success btn-sm"><span class="fa fa-print"></span> &nbsp;{{ trans('general.print') }}</a></span>
@endsection
@section('content')
<!-- Default box -->
<div class="box box-success">
<div class="box-header with-border">
{!! Form::open(['url' => 'reports/tax-summary', 'role' => 'form', 'method' => 'GET']) !!}
<div id="items" class="pull-left" style="margin-left: 5px">
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('status', $statuses, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
</div>
{!! Form::close() !!}
</div>
@include('reports.tax_summary.body')
</div>
<!-- /.box -->
@endsection

View File

@ -1,15 +0,0 @@
@extends('layouts.print')
@section('title', trans('reports.summary.tax'))
@section('content')
<div class="box-header">
<h2>{{ trans('reports.summary.tax') }}</h2>
<div class="text-muted">
{{ setting('general.company_name') }}
<br/>
{{ Date::parse(request('year') . '-1-1')->format($date_format) }} - {{ Date::parse(request('year') . '-12-31')->format($date_format) }}
</div>
</div>
@include('reports.tax_summary.body')
@endsection

View File

@ -0,0 +1,11 @@
<tfoot>
<tr>
<th>{{ trans('reports.net') }}</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,5 @@
<thead class="border-top-style">
<tr>
<th colspan="{{ count($class->dates) + 2 }}">{{ $table }}</th>
</tr>
</thead>