choose corp tax history for admins

This commit is contained in:
2018-12-14 17:43:42 -06:00
parent 471b37137f
commit 67adb05516

View File

@@ -36,9 +36,15 @@ class StructureTaxHelper {
$revenue = $this->GetRevenue($corpId, $refType, $start, $end);
$revenue = $revenue - ($fuelCost * $count);
dd($revenue);
//Check to see if the revenue is greater than zero to avoid division by zero error.
//Then calculate the tax owed which is revenue divided by ratio previously calcualted.
//if($revenue > 0.00) {
// $taxOwed = $revenue / $ratio;
//} else {
// $taxOwed = 0.00;
//}
//Calculate the tax owed which is revenue divided by ratio previously calculated
$taxOwed = $revenue / $ratio;
$taxOwed = (float)$revenue / (float)$ratio;
//Check for negative number, and if negative, zero it out.
if($taxOwed < 0.00){
$taxOwed = 0.00;