daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private function calcFpl($personIncome, $persons, $period){
  2.       $baseIncome   = 7820;
  3.       $addPerPerson = 4320;
  4.       $fplYearlyIncome = $baseIncome + ($persons * $addPerPerson);
  5.  
  6.       $weeksInYear   = 52;
  7.       $biweeksInYear = 26;
  8.       $monthsInYear  = 12;
  9.  
  10.       switch ($period){
  11.         case "week":
  12.           $personIncome = $personIncome * $weeksInYear;
  13.           break;
  14.  
  15.         case "biweek":
  16.           $personIncome = $personIncome * $biweeksInYear;
  17.           break;
  18.  
  19.         case "month":
  20.           $personIncome = $personIncome * $monthsInYear;
  21.           break;
  22.       }
  23.  
  24.       $fplPercent = ($personIncome / $fplYearlyIncome) * 100;
  25.       return round($fplPercent, 2);
  26.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top