taxes page

This commit is contained in:
2021-03-18 23:02:21 +09:00
parent 9798f8296b
commit d7d98b5195
3 changed files with 47 additions and 4 deletions

View File

@@ -164,6 +164,7 @@ class AdminDashboardController extends Controller
$srpActual = array();
$srpLoss = array();
$miningTaxes = array();
$miningTaxesLate = array();
/** Taxes Pane */
//Declare classes needed for displaying items on the page
@@ -221,6 +222,11 @@ class AdminDashboardController extends Controller
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetMoonMiningTaxesGross($date['start'], $date['end']), 2, ".", ","),
];
$miningTaxesLate[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetMoonMiningTaxesLateGross($date['start'], $date['end']), 2, ".", ","),
];
}
return view('admin.dashboards.taxes')->with('pis', $pis)
@@ -231,7 +237,8 @@ class AdminDashboardController extends Controller
->with('reprocessings', $reprocessings)
->with('srpActual', $srpActual)
->with('srpLoss', $srpLoss)
->with('miningTaxes', $miningTaxes);
->with('miningTaxes', $miningTaxes)
->with('miningTaxesLate', $miningTaxesLate);
}
/**

View File

@@ -31,14 +31,22 @@ class TaxesHelper {
$revenue = Invoice::where([
'status' => 'Paid',
])->orWhere([
'status' => 'Paid Late',
])->whereBetween('date_issued', [$start, $end])
->sum('invoice_amount');
return $revenue;
}
public function GetMoonMiningTaxesLateGross($start, $end) {
$revenue = 0.00;
$revenue = Invoice::where([
'status' => 'Paid Late',
])->whereBetween('date_issued', [$start, $end])->sum('invoice_amount');
return $revenue;
}
public function GetAllianceMarketGross($start, $end) {
$revenue = 0.00;

View File

@@ -166,7 +166,7 @@
<table class="table table-striped table-bordered">
<thead>
<th>Month</th>
<th>SRP Actual</th>
<th>Mining Taxes Paid</th>
</thead>
<tbody>
@foreach($miningTaxes as $mining)
@@ -180,6 +180,34 @@
</div>
</div>
</div>
<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>Mining Taxes Paid Late</th>
</thead>
<tbody>
@foreach($miningTaxesLate as $mining)
<tr>
<td>{{ $mining['date'] }}</td>
<td>{{ $mining['gross'] }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="container">
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">