profit & loss

This commit is contained in:
denisdulici
2018-04-11 19:40:21 +03:00
parent eeb715f169
commit a97772c3a0
10 changed files with 400 additions and 2 deletions

View File

@ -0,0 +1,67 @@
<div class="box-body">
<div class="table table-responsive">
<table class="table" id="tbl-payments">
<thead>
<tr>
<th class="col-md-2">&nbsp;</th>
@foreach($dates as $date)
<th class="col-md-2 text-right">{{ trans('reports.quarter.' . $date) }}</th>
@endforeach
<th class="col-md-2 text-right">{{ trans_choice('general.totals', 1) }}</th>
</tr>
</thead>
<tbody>
@if ($compares)
<table class="table">
<thead>
<th class="col-md-2" colspan="6">{{ trans_choice('general.incomes', 2) }}</th>
</thead>
<tbody>
@foreach($compares['income'] as $category_id => $category)
<tr>
<td>{{ $income_categories[$category_id] }}</td>
@foreach($category as $item)
<td class="col-md-2 text-right">@money($item['amount'], $item['currency_code'], true)</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
<table class="table">
<thead>
<th class="col-md-2" colspan="6">{{ trans_choice('general.expenses', 2) }}</th>
</thead>
<tbody>
@foreach($compares['expense'] as $category_id => $category)
<tr>
<td>{{ $expense_categories[$category_id] }}</td>
@foreach($category as $item)
<td class="col-md-2 text-right">@money($item['amount'], $item['currency_code'], true)</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
@else
<tr>
<td colspan="13">
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
</td>
</tr>
@endif
</tbody>
<table class="table">
<tbody>
<tr>
<th class="col-md-2" colspan="6">{{ trans('reports.net_profit') }}</th>
@foreach($totals as $total)
<th class="col-md-2 text-right"><span>@money($total['amount'], $total['currency_code'], true)</span></th>
@endforeach
</tr>
</tbody>
</table>
</table>
</div>
</div>

View File

@ -0,0 +1,28 @@
@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">
<div class="pull-left" style="margin-left: 23px">
<a href="{{ url('reports/profit-loss') }}?year={{ request('year', $this_year) }}"><span class="badge @if (request('status') == '') bg-green @else bg-default @endif">{{ trans('general.all') }}</span></a>
<a href="{{ url('reports/profit-loss') }}?status=paid&year={{ request('year', $this_year) }}"><span class="badge @if (request('status') == 'paid') bg-green @else bg-default @endif">{{ trans('invoices.paid') }}</span></a>
<a href="{{ url('reports/profit-loss') }}?status=upcoming&year={{ request('year', $this_year) }}"><span class="badge @if (request('status') == 'upcoming') bg-green @else bg-default @endif">{{ trans('general.upcoming') }}</span></a>
</div>
{!! Form::open(['url' => 'reports/profit-loss', 'role' => 'form', 'method' => 'GET']) !!}
<div class="pull-right">
{!! Form::select('year', $years, request('year', $this_year), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
</div>
{!! Form::close() !!}
</div>
@include('reports.profit_loss.body')
</div>
<!-- /.box -->
@endsection

View File

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