Fixed bug where variable is undefined
This commit is contained in:
@@ -15,7 +15,7 @@ class PaycheckController extends Controller
|
||||
{
|
||||
$hours = $stuff->input('hours');
|
||||
$payrate = $stuff->input('payrate');
|
||||
$grosspay;
|
||||
$grosspay = $hours * $payrate;
|
||||
$netpay;
|
||||
$fedtax;
|
||||
$statetax;
|
||||
@@ -31,7 +31,6 @@ class PaycheckController extends Controller
|
||||
return view('paycheck', ['hours' => 'd', 'payrate' => '', 'grosspay' => '', 'netpay' => '', 'fedtax' => '', 'statetax' => '', 'sstax' => '', 'medtax' => '']);
|
||||
}
|
||||
|
||||
$grosspay = $hours * $payrate;
|
||||
if ($grosspay < 87)
|
||||
{
|
||||
$fedtax = 0;
|
||||
@@ -48,6 +47,10 @@ class PaycheckController extends Controller
|
||||
{
|
||||
$fedtax = floor(($grosspay - 744.04) * .25 * 100)/100;
|
||||
}
|
||||
else
|
||||
{
|
||||
$fedtax = floor(($grosspay - 1500) * .40 * 100)/100;
|
||||
}
|
||||
|
||||
$statetax = round($grosspay * .0375 * 100)/100;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user