added moon rentals into tax performance metrics
This commit is contained in:
@@ -239,6 +239,11 @@ class AdminDashboardController extends Controller
|
||||
'date' => $date['start']->toFormattedDateString(),
|
||||
'gross' => number_format($tHelper->GetMoonMiningTaxesLateGross($date['start'], $date['end']), 2, ".", ","),
|
||||
];
|
||||
|
||||
$moonRentalTaxes[] = [
|
||||
'date' => $date['start']->toFormattedDateString(),
|
||||
'gross' => number_format($tHelper->GetMoonRentalTaxesGross($date['start'], $date['end']), 2, ".", ","),
|
||||
];
|
||||
}
|
||||
|
||||
return view('admin.dashboards.taxes')->with('pis', $pis)
|
||||
|
||||
@@ -11,6 +11,7 @@ use App\Models\User\UserRole;
|
||||
use App\Models\User\UserPermission;
|
||||
use App\Models\Finances\AllianceWalletJournal;
|
||||
use App\Models\MiningTax\Invoice;
|
||||
use App\Models\MoonRental\AllianceMoonRental;
|
||||
|
||||
class TaxesHelper {
|
||||
|
||||
@@ -26,6 +27,15 @@ class TaxesHelper {
|
||||
$this->end = $en;
|
||||
}
|
||||
|
||||
public function GetMoonRentalTaxesGross($start, $end) {
|
||||
$revenue = 0.00;
|
||||
|
||||
$revenue = AllianceMoonRental::whereBetween('rental_start', [$start, $end])
|
||||
->sum('rental_amount');
|
||||
|
||||
return $revenue;
|
||||
}
|
||||
|
||||
public function GetMoonMiningTaxesGross($start, $end) {
|
||||
$revenue = 0.00;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user