Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.30 KB | None | 0 0
  1. <?php
  2.  
  3.     /**
  4.      * (c) by Nodus IT
  5.      */
  6.  
  7.     class PriceCalculation
  8.     {
  9.         /**
  10.          * Berechnet die Stundenkosten für einen Mitarbeiter unter Einbeziehung der Sozialabgaben,
  11.          * 20% pauschale Zusatztkosten für sonstige Personalkosten bei einer Jahresarbeitszeit von 215 Tagen
  12.          *
  13.          * @param float $salary Bruttogehalt
  14.          *
  15.          * @return float
  16.          */
  17.         public static function employeeCostsPerHour( $salary )
  18.         {
  19.             $costs = $salary;
  20.             $costs += $salary * 0.1988; // Sozialabgaben
  21.             $costs += $salary * 0.2; // Pauschalsatz für sonstige direkten und indirekten Personalkosten
  22.  
  23.             $workDaysPerYear = 52 * 5; // Werktage
  24.             $workDaysPerYear -= 12; // Feiertage
  25.             $workDaysPerYear -= 20; // Urlaub
  26.             $workDaysPerYear -= 13; // Krankheit
  27.  
  28.             return round( $costs * 12 / $workDaysPerYear / 8 , 2 );
  29.         }
  30.  
  31.         public static function savingPerAssembler( $salary , $amountPerOrder = 10 , $savingFactor = 0.7 , $ordersPerDay = 8 , $daysPerYear = 215 )
  32.         {
  33.             $costs = self::employeeCostsPerHour( $salary );
  34.             $saving = $amountPerOrder * $ordersPerDay * 215 / 12 * 0.7;
  35.  
  36.             return $saving / 60 * $costs;
  37.         }
  38.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement