Esempio n. 1
0
// Get the array of timesheet entries.
if (isset($kga['customer'])) {
    $arr_zef = get_arr_zef($in, $out, null, array($kga['customer']['knd_ID']), null, 1);
} else {
    $arr_zef = get_arr_zef($in, $out, array($kga['usr']['usr_ID']), null, null, 1);
}
if (count($arr_zef) > 0) {
    $tpl->assign('arr_zef', $arr_zef);
} else {
    $tpl->assign('arr_zef', 0);
}
// Get the annotations for the user sub list.
if (isset($kga['customer'])) {
    $ann = get_arr_time_usr($in, $out, null, array($kga['customer']['knd_ID']));
} else {
    $ann = get_arr_time_usr($in, $out, array($kga['usr']['usr_ID']));
}
formatAnnotations($ann);
$tpl->assign('usr_ann', $ann);
// Get the annotations for the customer sub list.
if (isset($kga['customer'])) {
    $ann = get_arr_time_knd($in, $out, null, array($kga['customer']['knd_ID']));
} else {
    $ann = get_arr_time_knd($in, $out, array($kga['usr']['usr_ID']));
}
formatAnnotations($ann);
$tpl->assign('knd_ann', $ann);
// Get the annotations for the project sub list.
if (isset($kga['customer'])) {
    $ann = get_arr_time_pct($in, $out, null, array($kga['customer']['knd_ID']));
} else {
Esempio n. 2
0
/**
 * Get annotations for the user 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 user (via his ID) the data to show.
 */
function xp_get_arr_usr($start, $end, $users = null, $customers = null, $projects = null, $events = null)
{
    global $expense_ext_available;
    $arr = get_arr_time_usr($start, $end, $users, $customers, $projects, $events);
    if ($expense_ext_available) {
        $exp_arr = get_arr_exp_usr($start, $end, $users, $customers, $projects);
        merge_annotations($arr, $exp_arr);
    }
    return $arr;
}
Esempio n. 3
0
 }
 // if no userfilter is set, set it to current user
 if (isset($kga['usr']) && count($filterUsr) == 0) {
     array_push($filterUsr, $kga['usr']['usr_ID']);
 }
 if (isset($kga['customer'])) {
     $filterKnd = array($kga['customer']['knd_ID']);
 }
 $arr_zef = get_arr_zef($in, $out, $filterUsr, $filterKnd, $filterPct, $filterEvt, 1);
 if (count($arr_zef) > 0) {
     $tpl->assign('arr_zef', $arr_zef);
 } else {
     $tpl->assign('arr_zef', 0);
 }
 $tpl->assign('total', formatDuration(get_zef_time($in, $out, $filterUsr, $filterKnd, $filterPct, $filterEvt)));
 $ann = get_arr_time_usr($in, $out, $filterUsr, $filterKnd, $filterPct, $filterEvt);
 formatAnnotations($ann);
 $tpl->assign('usr_ann', $ann);
 $ann = get_arr_time_knd($in, $out, $filterUsr, $filterKnd, $filterPct, $filterEvt);
 formatAnnotations($ann);
 $tpl->assign('knd_ann', $ann);
 $ann = get_arr_time_pct($in, $out, $filterUsr, $filterKnd, $filterPct, $filterEvt);
 formatAnnotations($ann);
 $tpl->assign('pct_ann', $ann);
 $ann = get_arr_time_evt($in, $out, $filterUsr, $filterKnd, $filterPct, $filterEvt);
 formatAnnotations($ann);
 $tpl->assign('evt_ann', $ann);
 $tpl->display("zef.tpl");
 break;
 // =========================
 // = add / edit zef record =