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
@@ -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);
}
/**
+10 -2
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;