taxes page

This commit is contained in:
2021-03-18 22:51:10 +09:00
parent 3be42738d7
commit e4115b64ff
3 changed files with 44 additions and 1 deletions

View File

@@ -163,6 +163,7 @@ class AdminDashboardController extends Controller
$corpId = 98287666;
$srpActual = array();
$srpLoss = array();
$miningTaxes = array();
/** Taxes Pane */
//Declare classes needed for displaying items on the page
@@ -215,6 +216,11 @@ class AdminDashboardController extends Controller
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetJumpGateGross($date['start'], $date['end']), 2, ".", ","),
];
$miningTaxes[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($thelper->GetMoonMiningTaxesGross($date['start'], $date['end']), 2, ".", ","),
];
}
return view('admin.dashboards.taxes')->with('pis', $pis)
@@ -224,7 +230,8 @@ class AdminDashboardController extends Controller
->with('jumpgates', $jumpgates)
->with('reprocessings', $reprocessings)
->with('srpActual', $srpActual)
->with('srpLoss', $srpLoss);
->with('srpLoss', $srpLoss)
->with('miningTaxes', $miningTaxes);
}
/**

View File

@@ -25,6 +25,19 @@ class TaxesHelper {
$this->end = $en;
}
public function GetMoonMiningTaxesGross($start, $end) {
$revenue = 0.00;
$revenue = Invoice::where([
'status' => 'Paid',
])->orWhere([
'status' => 'Paid Late',
])->whereBetween('date_issued', [$start, $end])
->sum('invoice_amount');
return $revenue;
}
public function GetAllianceMarketGross($start, $end) {
$revenue = 0.00;

View File

@@ -157,6 +157,29 @@
<br>
<div class="container">
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
Mining Taxes
</div>
<div class="card-body">
<table class="table table-striped table-bordered">
<thead>
<th>Month</th>
<th>SRP Actual</th>
</thead>
<tbody>
@foreach($miningTaxes as $mining)
<tr>
<td>{{ $mining['date'] }}</td>
<td>{{ $mining['gross'] }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<div class="col">
<div class="card">
<div class="card-header">