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,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>