structure controller
This commit is contained in:
@@ -45,8 +45,6 @@ class StructureController extends Controller
|
|||||||
'lastMonthRevRefinery' => $this->GetRevenue($corpId, 'Refinery', $dates['LastMonthStart'], $dates['LastMonthEnd']),
|
'lastMonthRevRefinery' => $this->GetRevenue($corpId, 'Refinery', $dates['LastMonthStart'], $dates['LastMonthEnd']),
|
||||||
];
|
];
|
||||||
|
|
||||||
dd($totalTaxes);
|
|
||||||
|
|
||||||
return view('structures.taxes')->with('totalTaxes', $totalTaxes);
|
return view('structures.taxes')->with('totalTaxes', $totalTaxes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +144,7 @@ class StructureController extends Controller
|
|||||||
$taxOwed = 0.00;
|
$taxOwed = 0.00;
|
||||||
}
|
}
|
||||||
//Return the amount
|
//Return the amount
|
||||||
return $taxOwed;
|
return number_format($taxOwed,'2', '.', ',');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function GetRevenue($corpId, $refType, $start, $end) {
|
private function GetRevenue($corpId, $refType, $start, $end) {
|
||||||
@@ -155,7 +153,7 @@ class StructureController extends Controller
|
|||||||
->whereBetween('date', [$start, $end])
|
->whereBetween('date', [$start, $end])
|
||||||
->sum('amount');
|
->sum('amount');
|
||||||
} else if($refType === 'Refinery'){
|
} else if($refType === 'Refinery'){
|
||||||
return CorpJournal::where(['ref_type' => 'reprocessing_fee', 'corporation_id' => $corpId])
|
return CorpJournal::where(['ref_type' => 'reprocessing_tax', 'corporation_id' => $corpId])
|
||||||
->whereBetween('date', [$start, $end])
|
->whereBetween('date', [$start, $end])
|
||||||
->sum('amount');
|
->sum('amount');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user