Beispiel #1
0
/**
 * Get annotations for the project sub list. Currently it's just the time, like
 * in the timesheet extension.
 * 
 * @param int $start Time from which to take entries into account.
 * @param int $end Time until which to take entries into account.
 * @param array $users Array of user IDs to filter by.
 * @param array $customers Array of customer IDs to filter by.
 * @param array $projects Array of project IDs to filter by.
 * @param array $events Array of event IDs to filter by.
 * @return array Array which assigns every project (via his ID) the data to show.
 */
function xp_get_arr_pct($start, $end, $users = null, $customers = null, $projects = null, $events = null)
{
    global $expense_ext_available;
    $arr = get_arr_time_pct($start, $end, $users, $customers, $projects, $events);
    if ($expense_ext_available) {
        $exp_arr = get_arr_exp_pct($start, $end, $users, $customers, $projects);
        merge_annotations($arr, $exp_arr);
    }
    return $arr;
}
Beispiel #2
0
/**
 * Get annotations for the project sub list. Currently it's just the time, like
 * in the timesheet extension.
 *
 * @param int $start Time from which to take entries into account.
 * @param int $end Time until which to take entries into account.
 * @param array $users Array of user IDs to filter by.
 * @param array $customers Array of customer IDs to filter by.
 * @param array $projects Array of project IDs to filter by.
 * @param array $activities Array of activity IDs to filter by.
 * @return array Array which assigns every project (via his ID) the data to show.
 */
function export_get_project_annotations($start, $end, $users = null, $customers = null, $projects = null, $activities = null)
{
    global $expense_ext_available, $database;
    $arr = $database->get_time_projects($start, $end, $users, $customers, $projects, $activities);
    if ($expense_ext_available) {
        $expenses = expenses_by_project($start, $end, $users, $customers, $projects);
        merge_annotations($arr, $expenses);
    }
    return $arr;
}