industry taxes testing

This commit is contained in:
2019-01-05 23:40:17 -06:00
parent 6e6cb2446b
commit ee15ed55c9
4 changed files with 56 additions and 6 deletions

View File

@@ -29,6 +29,30 @@ class StructureController extends Controller
$this->middleware('permission:structure.operator');
}
public function displayReprocessingTaxes() {
$this->middleware('role:Admin');
$months = 3;
$taxes = array();
//Declare the structure tax helper class
$sHelper = new StructureTaxHelper();
//Get the dates we are working with
$dates = $sHelper->GetTimeFrameInMonths($months);
foreach($dates as $date) {
$taxes[] = [
'date' => $date['start']->toFormattedDateString(),
'tax' => number_format($sHelper->GetTaxes($corpId, 'Refinery', $date['start'], $date['end']), 2, '.', ','),
'revenue' => number_format($sHelper->GetRevenue($corpId, 'Refinery', $date['start'], $date['end']), 2, '.', ',')
];
}
//Return the view with the data passed to it
return view('structures.reprocessingtaxes')->with('taxes', $taxes);
}
public function displayIndustryTaxes() {
$this->middleware('role:Admin');