misc cleanup

This commit is contained in:
2019-01-16 01:15:27 -06:00
parent 75a1595571
commit b95fdf3288
5 changed files with 16 additions and 142 deletions

View File

@@ -1,68 +0,0 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class FinancesController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:Admin');
}
public function displayFinances() {
$months = 1;
$income = 0.00;
$expenses = 0.00;
$corpId = 98287666;
$finances = array();
$total = array();
$sHelper = new StructureTaxHelper();
$date = $sHelper->GetTimeFrameInMonths($months);
$revenue = [
'date' => $date['start']->toFormattedDateString(),
'industry' => StructureIndustryTaxJournal::select('amount')->whereBetween('date', [$date['start'], $date['end']])->sum('amount'),
'reprocessing' => $sHelper->GetRevenue($corpId, 'Refinery', $date['start'], $date['end']),
'offices' => OfficeFeesJournal::select('amount')->whereBetween('date', [$date['start'], $date['end']])->sum('amount'),
'market' => $sHelper->GetRevenue($corpId, 'Market', $date['start'], $date['end']),
'rentals' => 9500000000000,
'pi' => PlanetProductionTaxJournal::select('amount')->whereBetween('date', [$date['start'], $date['end']])->sum('amount'),
];
$expenditures = [
'fuel' => 9187200000,
'sov' => 8666870000,
'srp' => 1000000000,
];
$income = $revenue['industry'] + $revenue['reprocessing'] + $revenue['offices'] + $revenue['market'] + $revenue['rentals'] + $revenue['pi'];
$expenses = $expenditures['fuel'] + $expenditures['sov'] + $expenditures['srp'];
$total[] = [
'income' => $income,
'expenses' => $expenses,
];
$chart = app()->chartjs
->name('Income & Expenditure Chart')
->type('pie')
->size(['width' => 400, 'height' => 200])
->labels(['Income', 'Expenses'])
->datasets([
[
'backgroundColor' => ['#FF6384', '#36A2EB'],
'hoverBackgroundColor' => ['#FF6384', '#36A2EB'],
'data' => [$total['income'], $total['expenses']]
]
])
->options([]);
return view('finances.holding')->with('chart', $chart);
}
}

View File

@@ -8,47 +8,5 @@ use App\Library\Finances\JumpBridgeTax;
class JumpBridgeController extends Controller
{
/**
* Displays all statistics on one page
*/
public function displayAll() {
//Create a helper class variable
$jbHelper30 = new JumpBridgeTax(30);
$jbHelper60 = new JumpBridgeTax(60);
$jbHelper90 = new JumpBridgeTax(90);
$data = [
'30days' => number_format($jbHelper30->OverallTax(), 2, '.', ','),
'60days' => number_format($jbHelper60->OverallTax(), 2, '.', ','),
'90days' => number_format($jbHelper90->OverallTax(), 2, '.', ','),
];
return view('jumpbridges.all')->with('data', $data);
}
/**
* Displays overall jump bridge usage based corporation data
*/
public function displayCorpUsage() {
return view('jumpbridges.corp.select');
}
public function ajaxCorpUsage() {
//Get the statistics for overall usage by corps and send back to webpage via ajax
return response()->json(array('data' => $data), 200);
}
/**
* Displays jump bridge usage based on structure
*/
public function displayStructureUsage() {
return view('jumpbridges.structure.select');
}
public function ajaxStructureUsage() {
//Get the statistics for overall usage by structure and send back to the webpage via ajax
return response()->json(array('data' => $data), 200);
}
//
}

View File

@@ -1,11 +0,0 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class LogisticsController extends Controller
{
//
}