v2 first commit
This commit is contained in:
@@ -1,77 +0,0 @@
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-sm-2"> </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>
|
||||
13
resources/views/reports/profit_loss/content/footer.blade.php
Normal file
13
resources/views/reports/profit_loss/content/footer.blade.php
Normal 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>
|
||||
13
resources/views/reports/profit_loss/content/header.blade.php
Normal file
13
resources/views/reports/profit_loss/content/header.blade.php
Normal 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>
|
||||
@@ -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> {{ 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> ' . 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
|
||||
@@ -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
|
||||
11
resources/views/reports/profit_loss/table/footer.blade.php
Normal file
11
resources/views/reports/profit_loss/table/footer.blade.php
Normal 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>
|
||||
@@ -0,0 +1,5 @@
|
||||
<thead class="border-top-style">
|
||||
<tr>
|
||||
<th colspan="{{ count($class->dates) + 2 }}">{{ $table }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
Reference in New Issue
Block a user