display streams
This commit is contained in:
@@ -57,12 +57,24 @@ class TaxesController extends Controller
|
|||||||
'date' => $date['start']->toFormattedDateString(),
|
'date' => $date['start']->toFormattedDateString(),
|
||||||
'gross' => number_format($tHelper->GetOfficeGross($date['start'], $date['end']), 2, ".", ","),
|
'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 the view with the compact variable list
|
||||||
return view('/taxes/admin/displaystreams')->with('pis', $pis)
|
return view('/taxes/admin/displaystreams')->with('pis', $pis)
|
||||||
->with('industrys', $industrys)
|
->with('industrys', $industrys)
|
||||||
->with('reprocessings', $reprocessings)
|
->with('reprocessings', $reprocessings)
|
||||||
->with('offices', $offices);
|
->with('offices', $offices)
|
||||||
|
->with('markets', $markets)
|
||||||
|
->with('jumpgates', $jumpgates);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ use App\Models\Finances\ReprocessingTaxJournal;
|
|||||||
use App\Models\Finances\StructureIndustryTaxJournal;
|
use App\Models\Finances\StructureIndustryTaxJournal;
|
||||||
use App\Models\Finances\PlanetProductionTaxJournal;
|
use App\Models\Finances\PlanetProductionTaxJournal;
|
||||||
use App\Models\Finances\OfficeFeesJournal;
|
use App\Models\Finances\OfficeFeesJournal;
|
||||||
|
use App\Models\Finances\CorpMarketJournal;
|
||||||
|
use App\Models\Finances\JumpBridgeJournal;
|
||||||
|
|
||||||
|
|
||||||
class TaxesHelper {
|
class TaxesHelper {
|
||||||
@@ -30,10 +32,30 @@ class TaxesHelper {
|
|||||||
$this->end = $en;
|
$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) {
|
public function GetIndustryGross($start, $end) {
|
||||||
$revenue = 0.00;
|
$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])
|
->whereBetween('date', [$start, $end])
|
||||||
->sum('amount');
|
->sum('amount');
|
||||||
|
|
||||||
|
|||||||
@@ -90,5 +90,51 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
Market Taxes
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<th>Month</th>
|
||||||
|
<th>Market Taxes</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($markets as $market)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $market['date'] }}</td>
|
||||||
|
<td>{{ $market['gross'] }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
Jump Gate Taxes
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<th>Month</th>
|
||||||
|
<th>Jump Gate Taxes</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($jumpgates as $jumpgate)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $jumpgate['date'] }}</td>
|
||||||
|
<td>{{ $jumpgate['gross'] }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
Reference in New Issue
Block a user