diff --git a/app/Http/Controllers/TaxesController.php b/app/Http/Controllers/TaxesController.php index c43454f7f..e2b3afa6d 100644 --- a/app/Http/Controllers/TaxesController.php +++ b/app/Http/Controllers/TaxesController.php @@ -57,12 +57,24 @@ class TaxesController extends Controller 'date' => $date['start']->toFormattedDateString(), 'gross' => number_format($tHelper->GetOfficeGross($date['start'], $date['end']), 2, ".", ","), ]; + + $markets[] = [ + 'date' => $date['start']->toFormattedDateString(), + 'gross' => number_format($tHelper->GetMarketGross($date['start'], $date['end']), 2, ".", ","), + ]; + + $jumpgates[] = [ + 'date' => $date['start']->toFormattedDateString(), + 'gross' => number_format($tHelper->GetJumpGateGross($date['start'], $date['end']), 2, ".", ","), + ]; } //Return the view with the compact variable list return view('/taxes/admin/displaystreams')->with('pis', $pis) ->with('industrys', $industrys) ->with('reprocessings', $reprocessings) - ->with('offices', $offices); + ->with('offices', $offices) + ->with('markets', $markets) + ->with('jumpgates', $jumpgates); } } diff --git a/app/Library/Taxes/TaxesHelper.php b/app/Library/Taxes/TaxesHelper.php index 10f05e9eb..ebcea5848 100644 --- a/app/Library/Taxes/TaxesHelper.php +++ b/app/Library/Taxes/TaxesHelper.php @@ -14,6 +14,8 @@ use App\Models\Finances\ReprocessingTaxJournal; use App\Models\Finances\StructureIndustryTaxJournal; use App\Models\Finances\PlanetProductionTaxJournal; use App\Models\Finances\OfficeFeesJournal; +use App\Models\Finances\CorpMarketJournal; +use App\Models\Finances\JumpBridgeJournal; class TaxesHelper { @@ -30,10 +32,30 @@ class TaxesHelper { $this->end = $en; } + public function GetJumpGateGross($start, $end) { + $revenue = 0.00; + + $revenue = JumpBridgeJournal::where(['ref_type' => 'structure_gate_jump', 'second_party_id' => '98287666']) + ->whereBetween('date', [$start, $end]) + ->sum('amount'); + + return $revenue; + } + + public function GetMarketGross($start, $end) { + $revenue = 0.00; + + $revenue = CorpMarketJournal::where(['ref_type' => 'brokers_fee', 'second_party_id' => '98287666']) + ->whereBetween('date', [$start, $end]) + ->sum('amount'); + + return $revenue; + } + public function GetIndustryGross($start, $end) { $revenue = 0.00; - $revenue = StructureIndustryTaxJournal::where(['ref_type' => 'facility_industry_tax', 'second_party_id' => '98287666']) + $revenue = StructureIndustryTaxJournal::where(['ref_type' => 'industry_job_tax', 'second_party_id' => '98287666']) ->whereBetween('date', [$start, $end]) ->sum('amount'); diff --git a/resources/views/taxes/admin/displaystreams.blade.php b/resources/views/taxes/admin/displaystreams.blade.php index 60f51d759..cc2fb8f57 100644 --- a/resources/views/taxes/admin/displaystreams.blade.php +++ b/resources/views/taxes/admin/displaystreams.blade.php @@ -90,5 +90,51 @@ - +
+
+
+
+
+ Market Taxes +
+
+ + + + + + + @foreach($markets as $market) + + + + + @endforeach + +
MonthMarket Taxes
{{ $market['date'] }}{{ $market['gross'] }}
+
+
+
+
+ Jump Gate Taxes +
+
+ + + + + + + @foreach($jumpgates as $jumpgate) + + + + + @endforeach + +
MonthJump Gate Taxes
{{ $jumpgate['date'] }}{{ $jumpgate['gross'] }}
+
+
+
+
@endsection \ No newline at end of file