- private function insertMonthlyQuota($group_id, $year, $month, $minutes) {
+ private function insertMonthlyQuota($fields) {
+ $mdb2 = getConnection();
+ $group_id = (int) $fields['group_id'];
+ $org_id = (int) $fields['org_id'];
+ $year = (int) $fields['year'];
+ $month = (int) $fields['month'];
+ $minutes = (int) $fields['minutes'];
+
+ $sql = "INSERT INTO tt_monthly_quotas (group_id, org_id, year, month, minutes)".
+ " values ($group_id, $org_id, $year, $month, $minutes)";
+ $affected = $mdb2->exec($sql);
+ return (!is_a($affected, 'PEAR_Error'));
+ }
+
+ // insertPredefinedExpense - a helper function to insert a predefined expense.
+ private function insertPredefinedExpense($fields) {