X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=plugins%2FMonthlyQuota.class.php;h=6e420f91846734433820ba2a1d94261846401fbf;hb=5038971aa31a431afb8819a101b91965ad53b968;hp=4fed3c9014a288570e5eeb5acfc05771f9ec04bb;hpb=d9b8a2fcd3d9886b2cf218d31eb6d37afdae368e;p=timetracker.git diff --git a/plugins/MonthlyQuota.class.php b/plugins/MonthlyQuota.class.php index 4fed3c90..6e420f91 100644 --- a/plugins/MonthlyQuota.class.php +++ b/plugins/MonthlyQuota.class.php @@ -80,7 +80,8 @@ class MonthlyQuota { // If we did not find a record, return a calculated monthly quota. $numWorkdays = $this->getNumWorkdays($month, $year); global $user; - return $numWorkdays * $user->workday_hours; + return $numWorkdays * $user->workday_hours; // TODO: fix a rounding issue for small values like 0:01 + // Possibly with a database field type change (minutes?). } // getMany - returns an array of quotas for a given year for team. @@ -139,7 +140,7 @@ class MonthlyQuota { } // quotaToFloat converts a valid quota value to a float. - private function quotaToFloat($value) { + public function quotaToFloat($value) { if (preg_match('/^[0-9]{1,3}h?$/', $value )) { // 000 - 999 return (float) $value;