Merge branch 'master' of github.com:akaunting/akaunting
This commit is contained in:
commit
366b855d53
@ -8,22 +8,15 @@ use Illuminate\Support\Arr;
|
||||
abstract class FormRequest extends BaseFormRequest
|
||||
{
|
||||
/**
|
||||
* Set the company id to the request.
|
||||
* Prepare the data for validation.
|
||||
*
|
||||
* @return \Illuminate\Contracts\Validation\Validator
|
||||
* @return void
|
||||
*/
|
||||
protected function getValidatorInstance()
|
||||
protected function prepareForValidation()
|
||||
{
|
||||
// Get request data
|
||||
$data = $this->all();
|
||||
|
||||
// Add active company id
|
||||
$data['company_id'] = session('company_id');
|
||||
|
||||
// Reset the request data
|
||||
$this->getInputSource()->replace($data);
|
||||
|
||||
return parent::getValidatorInstance();
|
||||
$this->merge([
|
||||
'company_id' => session('company_id'),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -32,8 +32,6 @@ abstract class Report
|
||||
|
||||
public $filters = [];
|
||||
|
||||
public $category = 'income-expense';
|
||||
|
||||
public $icon = 'fa fa-chart-pie';
|
||||
|
||||
public $indents = [
|
||||
@ -80,14 +78,14 @@ abstract class Report
|
||||
|
||||
abstract public function getTotals();
|
||||
|
||||
public function getName()
|
||||
public function getDefaultName()
|
||||
{
|
||||
return Str::title(str_replace('_', ' ', Str::snake((new \ReflectionClass($this))->getShortName())));
|
||||
}
|
||||
|
||||
public function getCategory()
|
||||
{
|
||||
return $this->category;
|
||||
return trans('reports.income_expense');
|
||||
}
|
||||
|
||||
public function getIcon()
|
||||
|
@ -19,24 +19,23 @@ class Reports extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$classes = [];
|
||||
$reports = ['income-expense' => [], 'accounting' => []];
|
||||
$classes = $categories = [];
|
||||
|
||||
$items = Report::collect();
|
||||
$reports = Report::collect();
|
||||
|
||||
foreach ($items as $item) {
|
||||
$class = Utility::getClassInstance($item);
|
||||
foreach ($reports as $report) {
|
||||
$class = Utility::getClassInstance($report);
|
||||
|
||||
if (!$class->canRead()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$reports[$class->getCategory()][] = $item;
|
||||
$classes[$report->id] = $class;
|
||||
|
||||
$classes[$item->id] = $class;
|
||||
$categories[$class->getCategory()][] = $report;
|
||||
}
|
||||
|
||||
return view('common.reports.index', compact('reports', 'classes'));
|
||||
return view('common.reports.index', compact('categories', 'classes'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,8 +9,6 @@ use App\Utilities\Recurring;
|
||||
|
||||
class ExpenseSummary extends Report
|
||||
{
|
||||
public $category = 'income-expense';
|
||||
|
||||
public $icon = 'fa fa-shopping-cart';
|
||||
|
||||
public $chart = [
|
||||
@ -28,11 +26,16 @@ class ExpenseSummary extends Report
|
||||
],
|
||||
];
|
||||
|
||||
public function getName()
|
||||
public function getDefaultName()
|
||||
{
|
||||
return trans('reports.summary.expense');
|
||||
}
|
||||
|
||||
public function getCategory()
|
||||
{
|
||||
return trans('reports.income_expense');
|
||||
}
|
||||
|
||||
public function getTotals()
|
||||
{
|
||||
$payments = $this->applyFilters(Transaction::type('expense')->isNotTransfer(), ['date_field' => 'paid_at'])->get();
|
||||
|
@ -10,15 +10,18 @@ use App\Utilities\Recurring;
|
||||
|
||||
class IncomeExpenseSummary extends Report
|
||||
{
|
||||
public $category = 'income-expense';
|
||||
|
||||
public $icon = 'fa fa-chart-pie';
|
||||
|
||||
public function getName()
|
||||
public function getDefaultName()
|
||||
{
|
||||
return trans('reports.summary.income_expense');
|
||||
}
|
||||
|
||||
public function getCategory()
|
||||
{
|
||||
return trans('reports.income_expense');
|
||||
}
|
||||
|
||||
public function getTotals()
|
||||
{
|
||||
$income_transactions = $this->applyFilters(Transaction::type('income')->isNotTransfer(), ['date_field' => 'paid_at'])->get();
|
||||
|
@ -9,8 +9,6 @@ use App\Utilities\Recurring;
|
||||
|
||||
class IncomeSummary extends Report
|
||||
{
|
||||
public $category = 'income-expense';
|
||||
|
||||
public $icon = 'fa fa-money-bill';
|
||||
|
||||
public $chart = [
|
||||
@ -28,11 +26,16 @@ class IncomeSummary extends Report
|
||||
],
|
||||
];
|
||||
|
||||
public function getName()
|
||||
public function getDefaultName()
|
||||
{
|
||||
return trans('reports.summary.income');
|
||||
}
|
||||
|
||||
public function getCategory()
|
||||
{
|
||||
return trans('reports.income_expense');
|
||||
}
|
||||
|
||||
public function getTotals()
|
||||
{
|
||||
$transactions = $this->applyFilters(Transaction::type('income')->isNotTransfer(), ['date_field' => 'paid_at'])->get();
|
||||
|
@ -11,17 +11,20 @@ use App\Utilities\Recurring;
|
||||
|
||||
class ProfitLoss extends Report
|
||||
{
|
||||
public $category = 'accounting';
|
||||
|
||||
public $icon = 'fa fa-heart';
|
||||
|
||||
public $chart = false;
|
||||
|
||||
public function getName()
|
||||
public function getDefaultName()
|
||||
{
|
||||
return trans('reports.profit_loss');
|
||||
}
|
||||
|
||||
public function getCategory()
|
||||
{
|
||||
return trans('general.accounting');
|
||||
}
|
||||
|
||||
public function setViews()
|
||||
{
|
||||
parent::setViews();
|
||||
|
@ -15,17 +15,20 @@ class TaxSummary extends Report
|
||||
{
|
||||
use Currencies;
|
||||
|
||||
public $category = 'accounting';
|
||||
|
||||
public $icon = 'fa fa-percent';
|
||||
|
||||
public $chart = false;
|
||||
|
||||
public function getName()
|
||||
public function getDefaultName()
|
||||
{
|
||||
return trans('reports.summary.tax');
|
||||
}
|
||||
|
||||
public function getCategory()
|
||||
{
|
||||
return trans('general.accounting');
|
||||
}
|
||||
|
||||
public function setViews()
|
||||
{
|
||||
parent::setViews();
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Utilities;
|
||||
|
||||
use App\Models\Common\Report;
|
||||
use App\Models\Module\Module;
|
||||
|
||||
class Reports
|
||||
@ -10,7 +11,7 @@ class Reports
|
||||
{
|
||||
$classes = [];
|
||||
|
||||
$core_classes = [
|
||||
$list = [
|
||||
'App\Reports\IncomeSummary',
|
||||
'App\Reports\ExpenseSummary',
|
||||
'App\Reports\IncomeExpenseSummary',
|
||||
@ -18,35 +19,25 @@ class Reports
|
||||
'App\Reports\ProfitLoss',
|
||||
];
|
||||
|
||||
static::parseClasses($classes, $core_classes);
|
||||
|
||||
$modules = Module::enabled()->get();
|
||||
|
||||
foreach ($modules as $module) {
|
||||
Module::enabled()->each(function ($module) use (&$list) {
|
||||
$m = module($module->alias);
|
||||
|
||||
// Check if the module exists and has reports
|
||||
if (!$m || empty($m->get('reports'))) {
|
||||
continue;
|
||||
return;
|
||||
}
|
||||
|
||||
static::parseClasses($classes, $m->get('reports'));
|
||||
}
|
||||
$list = array_merge($list, (array) $m->get('reports'));
|
||||
});
|
||||
|
||||
return $classes;
|
||||
}
|
||||
|
||||
protected static function parseClasses(&$classes, $list)
|
||||
{
|
||||
foreach ($list as $class) {
|
||||
if (!class_exists($class)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$name = (new $class())->getName();
|
||||
|
||||
$classes[$class] = $name;
|
||||
$classes[$class] = (new $class())->getDefaultName();
|
||||
}
|
||||
|
||||
return $classes;
|
||||
}
|
||||
|
||||
public static function getGroups()
|
||||
@ -81,8 +72,18 @@ class Reports
|
||||
];
|
||||
}
|
||||
|
||||
public static function getClassInstance($report, $get_totals = true)
|
||||
public static function getClassInstance($model, $get_totals = true)
|
||||
{
|
||||
return (new $report->class($report, $get_totals));
|
||||
if (is_string($model)) {
|
||||
$model = Report::where('class', $model)->first();
|
||||
}
|
||||
|
||||
if ((!$model instanceof Report) || !class_exists($model->class)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$class = $model->class;
|
||||
|
||||
return new $class($model, $get_totals);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Utilities;
|
||||
|
||||
use App\Models\Common\Widget;
|
||||
use App\Models\Module\Module;
|
||||
|
||||
class Widgets
|
||||
@ -10,7 +11,7 @@ class Widgets
|
||||
{
|
||||
$classes = [];
|
||||
|
||||
$core_classes = [
|
||||
$list = [
|
||||
'App\Widgets\TotalIncome',
|
||||
'App\Widgets\TotalExpenses',
|
||||
'App\Widgets\TotalProfit',
|
||||
@ -22,46 +23,48 @@ class Widgets
|
||||
'App\Widgets\LatestExpenses',
|
||||
];
|
||||
|
||||
static::parseClasses($classes, $core_classes);
|
||||
|
||||
$modules = Module::enabled()->get();
|
||||
|
||||
foreach ($modules as $module) {
|
||||
Module::enabled()->each(function ($module) use (&$list) {
|
||||
$m = module($module->alias);
|
||||
|
||||
// Check if the module exists and has widgets
|
||||
if (!$m || empty($m->get('widgets'))) {
|
||||
continue;
|
||||
return;
|
||||
}
|
||||
|
||||
static::parseClasses($classes, $m->get('widgets'));
|
||||
}
|
||||
$list = array_merge($list, (array) $m->get('widgets'));
|
||||
});
|
||||
|
||||
return $classes;
|
||||
}
|
||||
|
||||
protected static function parseClasses(&$classes, $list)
|
||||
{
|
||||
foreach ($list as $class) {
|
||||
if (!class_exists($class)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$name = (new $class())->getDefaultName();
|
||||
|
||||
$classes[$class] = $name;
|
||||
$classes[$class] = (new $class())->getDefaultName();
|
||||
}
|
||||
|
||||
return $classes;
|
||||
}
|
||||
|
||||
public static function getInstance($model)
|
||||
public static function getClassInstance($model)
|
||||
{
|
||||
if (is_string($model)) {
|
||||
$model = Widget::where('class', $model)->first();
|
||||
}
|
||||
|
||||
if ((!$model instanceof Widget) || !class_exists($model->class)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$class = $model->class;
|
||||
|
||||
return new $class($model);
|
||||
}
|
||||
|
||||
public static function show($model)
|
||||
public static function show($model, ...$arguments)
|
||||
{
|
||||
return static::getInstance($model)->show();
|
||||
if (!$class = static::getClassInstance($model)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $class->show(...$arguments);
|
||||
}
|
||||
}
|
||||
|
@ -41,12 +41,16 @@ if (!function_exists('company_date')) {
|
||||
|
||||
if (!function_exists('show_widget')) {
|
||||
/**
|
||||
* Format the given date based on company settings.
|
||||
* Show a widget.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function show_widget($model)
|
||||
function show_widget()
|
||||
{
|
||||
return Widgets::show($model);
|
||||
$arguments = func_get_args();
|
||||
|
||||
$model = array_shift($arguments);
|
||||
|
||||
return Widgets::show($model, ...$arguments);
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ class CashFlow extends Widget
|
||||
])
|
||||
->fill(false);
|
||||
|
||||
return $this->view('widgets.cash_flow', [
|
||||
return $this->view('widgets.line_chart', [
|
||||
'chart' => $chart,
|
||||
]);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class ExpensesByCategory extends Widget
|
||||
|
||||
$chart = $this->getDonutChart(trans_choice('general.expenses', 2), 0, 160, 6);
|
||||
|
||||
return $this->view('widgets.expenses_by_category', [
|
||||
return $this->view('widgets.donut_chart', [
|
||||
'chart' => $chart,
|
||||
]);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class IncomeByCategory extends Widget
|
||||
|
||||
$chart = $this->getDonutChart(trans_choice('general.incomes', 1), 0, 160, 6);
|
||||
|
||||
return $this->view('widgets.income_by_category', [
|
||||
return $this->view('widgets.donut_chart', [
|
||||
'chart' => $chart,
|
||||
]);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ class CreateReportsTable extends Migration
|
||||
$table->string('period');
|
||||
$table->string('basis');
|
||||
$table->string('chart');
|
||||
$table->boolean('enabled');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
|
@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class DropEnabledColumnReportsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('reports', function (Blueprint $table) {
|
||||
$table->dropColumn('enabled');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('reports', function (Blueprint $table) {
|
||||
$table->boolean('enabled')->default(1);
|
||||
});
|
||||
}
|
||||
}
|
@ -36,8 +36,10 @@ class InstallCommand extends Command
|
||||
|
||||
$old_company_id = session('company_id');
|
||||
|
||||
// Set company id
|
||||
session(['company_id' => $company_id]);
|
||||
setting()->setExtraColumns(['company_id' => $company_id]);
|
||||
setting()->forgetAll();
|
||||
setting()->load(true);
|
||||
|
||||
$module = module($alias);
|
||||
|
||||
@ -47,7 +49,6 @@ class InstallCommand extends Command
|
||||
'enabled' => '1',
|
||||
]);
|
||||
|
||||
// Add history
|
||||
ModuleHistory::create([
|
||||
'company_id' => $company_id,
|
||||
'module_id' => $model->id,
|
||||
@ -56,21 +57,21 @@ class InstallCommand extends Command
|
||||
'description' => trans('modules.installed', ['module' => $alias]),
|
||||
]);
|
||||
|
||||
// Clear cache
|
||||
$this->call('cache:clear');
|
||||
|
||||
// Update database
|
||||
$this->call('migrate', ['--force' => true]);
|
||||
|
||||
// Trigger event
|
||||
event(new \App\Events\Module\Installed($alias, $company_id));
|
||||
|
||||
// Unset company id
|
||||
session()->forget('company_id');
|
||||
setting()->forgetAll();
|
||||
|
||||
// Set company id
|
||||
if (!empty($old_company_id)) {
|
||||
session(['company_id' => $old_company_id]);
|
||||
|
||||
setting()->setExtraColumns(['company_id' => $old_company_id]);
|
||||
setting()->load(true);
|
||||
}
|
||||
|
||||
$this->info('Module installed!');
|
||||
|
6
public/css/custom.css
vendored
6
public/css/custom.css
vendored
@ -39,13 +39,13 @@ button:focus
|
||||
/*--------Forgot Text Finish--------*/
|
||||
|
||||
|
||||
/*--------Dashboard Categories--------*/
|
||||
.dashboard-categories
|
||||
/*--------Chart Donut Height--------*/
|
||||
.chart-donut
|
||||
{
|
||||
position:relative !important;
|
||||
height:23vh !important;
|
||||
}
|
||||
/*--------Dashboard Categories Finish--------*/
|
||||
/*--------Chart Donut Height Finish--------*/
|
||||
|
||||
|
||||
/*--------Cursor Pointer--------*/
|
||||
|
@ -12,107 +12,58 @@
|
||||
|
||||
@section('content')
|
||||
<div class="row mb-4">
|
||||
@foreach($categories as $name => $reports)
|
||||
<div class="col-md-12">
|
||||
<h3>{{ $name }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<h3 id="stats">{{ trans('reports.income_expense') }}</h3>
|
||||
</div>
|
||||
|
||||
@foreach($reports['income-expense'] as $report)
|
||||
<div class="col-md-4">
|
||||
<div class="card card-stats">
|
||||
<span>
|
||||
<div class="dropdown card-action-button">
|
||||
<a class="btn btn-sm items-align-center py-2 mr-0 shadow-none--hover" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-v text-primary"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||
@permission('create-common-reports')
|
||||
<a class="dropdown-item" href="{{ route('reports.edit', $report->id) }}">{{ trans('general.edit') }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
@endpermission
|
||||
@permission('delete-common-reports')
|
||||
{!! Form::deleteLink($report, 'common/reports') !!}
|
||||
@endpermission
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<a href="{{ route('reports.show', $report->id) }}">
|
||||
<h5 class="card-title text-uppercase text-muted mb-0">{{ $report->name }}</h5>
|
||||
<span class="h2 font-weight-bold mb-0">{{ $classes[$report->id]->getTotal() }}</span>
|
||||
@foreach($reports as $report)
|
||||
<div class="col-md-4">
|
||||
<div class="card card-stats">
|
||||
<span>
|
||||
<div class="dropdown card-action-button">
|
||||
<a class="btn btn-sm items-align-center py-2 mr-0 shadow-none--hover" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-v text-primary"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||
@permission('create-common-reports')
|
||||
<a class="dropdown-item" href="{{ route('reports.edit', $report->id) }}">{{ trans('general.edit') }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
@endpermission
|
||||
@permission('delete-common-reports')
|
||||
{!! Form::deleteLink($report, 'common/reports') !!}
|
||||
@endpermission
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
</span>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<a href="{{ route('reports.show', $report->id) }}">
|
||||
<h5 class="card-title text-uppercase text-muted mb-0">{{ $report->name }}</h5>
|
||||
<span class="h2 font-weight-bold mb-0">{{ $classes[$report->id]->getTotal() }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<a href="{{ route('reports.show', $report->id) }}">
|
||||
<div class="icon icon-shape bg-orange text-white rounded-circle shadow">
|
||||
<i class="{{ $classes[$report->id]->getIcon() }}"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="mt-3 mb-0 text-sm">
|
||||
<a href="{{ route('reports.show', $report->id) }}">
|
||||
<div class="icon icon-shape bg-orange text-white rounded-circle shadow">
|
||||
<i class="{{ $classes[$report->id]->getIcon() }}"></i>
|
||||
</div>
|
||||
<span class="text-nowrap">{{ $report->description }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
<p class="mt-3 mb-0 text-sm">
|
||||
<a href="{{ route('reports.show', $report->id) }}">
|
||||
<span class="text-nowrap">{{ $report->description }}</span>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@endforeach
|
||||
|
||||
<div class="col-md-12">
|
||||
<h3 id="stats">{{ trans('general.accounting') }}</h3>
|
||||
</div>
|
||||
|
||||
@foreach($reports['accounting'] as $report)
|
||||
<div class="col-md-4">
|
||||
<div class="card card-stats">
|
||||
<span>
|
||||
<div class="dropdown card-action-button">
|
||||
<a class="btn btn-sm items-align-center py-2 mr-0 shadow-none--hover" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-v text-primary"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||
@permission('create-common-reports')
|
||||
<a class="dropdown-item" href="{{ route('reports.edit', $report->id) }}">{{ trans('general.edit') }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
@endpermission
|
||||
@permission('delete-common-reports')
|
||||
{!! Form::deleteLink($report, 'common/reports') !!}
|
||||
@endpermission
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<a href="{{ route('reports.show', $report->id) }}">
|
||||
<h5 class="card-title text-uppercase text-muted mb-0">{{ $report->name }}</h5>
|
||||
<span class="h2 font-weight-bold mb-0">{{ $classes[$report->id]->getTotal() }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<a href="{{ route('reports.show', $report->id) }}">
|
||||
<div class="icon icon-shape bg-orange text-white rounded-circle shadow">
|
||||
<i class="{{ $classes[$report->id]->getIcon() }}"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="mt-3 mb-0 text-sm">
|
||||
<a href="{{ route('reports.show', $report->id) }}">
|
||||
<span class="text-nowrap">{{ $report->description }}</span>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="card-header">
|
||||
{!! Form::open([
|
||||
'url' => 'common/reports/' . $class->report->id . '/display',
|
||||
'url' => 'common/reports/' . $class->report->id,
|
||||
'role' => 'form',
|
||||
'method' => 'GET',
|
||||
]) !!}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div id="widgets-account-balance" class="{{ $model->settings->width }}">
|
||||
<div id="widget-{{ $model->id }}" class="{{ $model->settings->width }}">
|
||||
<div class="card">
|
||||
@include('partials.widgets.standard_header', ['header_class' => 'border-bottom-0'])
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
<div id="widgets-income-by-category" class="{{ $model->settings->width }}">
|
||||
<div id="widget-{{ $model->id }}" class="{{ $model->settings->width }}">
|
||||
<div class="card">
|
||||
@include('partials.widgets.standard_header')
|
||||
|
||||
<div class="card-body" id="income-category-doughnut">
|
||||
<div class="dashboard-categories">
|
||||
<div class="card-body" id="widget-donut-{{ $model->id }}">
|
||||
<div class="chart-donut">
|
||||
{!! $chart->container() !!}
|
||||
</div>
|
||||
</div>
|
||||
@ -12,8 +12,8 @@
|
||||
|
||||
@push('charts')
|
||||
<script>
|
||||
var income_category_doughnut = new Vue({
|
||||
el: '#income-category-doughnut',
|
||||
var widget_donut_{{ $model->id }} = new Vue({
|
||||
el: '#widget-donut-{{ $model->id }}',
|
||||
});
|
||||
</script>
|
||||
@endpush
|
@ -1,23 +0,0 @@
|
||||
<div id="widgets-expenses-by-category" class="{{ $model->settings->width }}">
|
||||
<div class="card">
|
||||
@include('partials.widgets.standard_header')
|
||||
|
||||
<div class="card-body" id="expenses-category-doughnut">
|
||||
<div class="dashboard-categories">
|
||||
{!! $chart->container() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('charts')
|
||||
<script>
|
||||
var expenses_category_doughnut = new Vue({
|
||||
el: '#expenses-category-doughnut',
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@push('body_scripts')
|
||||
{!! $chart->script() !!}
|
||||
@endpush
|
@ -1,4 +1,4 @@
|
||||
<div id="widgets-latest-expenses" class="{{ $model->settings->width }}">
|
||||
<div id="widget-{{ $model->id }}" class="{{ $model->settings->width }}">
|
||||
<div class="card">
|
||||
@include('partials.widgets.standard_header', ['header_class' => 'border-bottom-0'])
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div id="widgets-latest-income" class="{{ $model->settings->width }}">
|
||||
<div id="widget-{{ $model->id }}" class="{{ $model->settings->width }}">
|
||||
<div class="card">
|
||||
@include('partials.widgets.standard_header', ['header_class' => 'border-bottom-0'])
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<div id="widgets-cash-flow" class="{{ $model->settings->width }}">
|
||||
<div id="widget-{{ $model->id }}" class="{{ $model->settings->width }}">
|
||||
<div class="card">
|
||||
@include('partials.widgets.standard_header')
|
||||
|
||||
<div class="card-body" id="cashflow">
|
||||
<div class="card-body" id="widget-line-{{ $model->id }}">
|
||||
<div class="chart">
|
||||
{!! $chart->container() !!}
|
||||
</div>
|
||||
@ -12,8 +12,8 @@
|
||||
|
||||
@push('charts')
|
||||
<script>
|
||||
var cash_flow = new Vue({
|
||||
el: '#cashflow',
|
||||
var widget_line_{{ $model->id }} = new Vue({
|
||||
el: '#widget-line-{{ $model->id }}',
|
||||
});
|
||||
</script>
|
||||
@endpush
|
@ -1,4 +1,4 @@
|
||||
<div id="widgets-total-expenses" class="{{ $model->settings->width }}">
|
||||
<div id="widget-{{ $model->id }}" class="{{ $model->settings->width }}">
|
||||
<div class="card bg-gradient-danger card-stats">
|
||||
@include('partials.widgets.stats_header', ['header_class' => 'border-bottom-0'])
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-auto">
|
||||
<div class="icon icon-shape bg-white text-danger rounded-circle shadow">
|
||||
<div class="icon icon-shape bg-white text-danger rounded-circle shadow">
|
||||
<i class="fa fa-shopping-cart"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div id="widgets-total-income" class="{{ $model->settings->width }}">
|
||||
<div id="widget-{{ $model->id }}" class="{{ $model->settings->width }}">
|
||||
<div class="card bg-gradient-info card-stats">
|
||||
@include('partials.widgets.stats_header', ['header_class' => 'border-bottom-0'])
|
||||
|
||||
@ -16,17 +16,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="mt-3 mb-0 text-sm cursor-default">
|
||||
<span class="text-white">{{ trans('widgets.receivables') }}</span>
|
||||
<el-tooltip
|
||||
content="{{ trans('widgets.open_invoices') }}: {{ $totals['open'] }} / {{ trans('widgets.overdue_invoices') }}: {{ $totals['overdue'] }}"
|
||||
effect="light"
|
||||
:open-delay="200"
|
||||
placement="top"
|
||||
popper-class="text-dark">
|
||||
<span class="text-white font-weight-bold float-right">{{ $totals['open'] }} / {{ $totals['overdue'] }}</span>
|
||||
</el-tooltip>
|
||||
</p>
|
||||
<p class="mt-3 mb-0 text-sm cursor-default">
|
||||
<span class="text-white">{{ trans('widgets.receivables') }}</span>
|
||||
<el-tooltip
|
||||
content="{{ trans('widgets.open_invoices') }}: {{ $totals['open'] }} / {{ trans('widgets.overdue_invoices') }}: {{ $totals['overdue'] }}"
|
||||
effect="light"
|
||||
:open-delay="200"
|
||||
placement="top"
|
||||
popper-class="text-dark">
|
||||
<span class="text-white font-weight-bold float-right">{{ $totals['open'] }} / {{ $totals['overdue'] }}</span>
|
||||
</el-tooltip>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div id="widgets-total-profit" class="{{ $model->settings->width }}">
|
||||
<div id="widget-{{ $model->id }}" class="{{ $model->settings->width }}">
|
||||
<div class="card bg-gradient-success card-stats">
|
||||
@include('partials.widgets.stats_header', ['header_class' => 'border-bottom-0'])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user