/** * Get annotations for the customer 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 customer (via his ID) the data to show. */ function xp_get_arr_knd($start, $end, $users = null, $customers = null, $projects = null, $events = null) { global $expense_ext_available; $arr = get_arr_time_knd($start, $end, $users, $customers, $projects, $events); if ($expense_ext_available) { $exp_arr = get_arr_exp_knd($start, $end, $users, $customers, $projects); merge_annotations($arr, $exp_arr); } return $arr; }
function get_arr_knd_with_time($group, $user, $in, $out) { global $kga, $conn; $arr_knds = get_arr_knd($group); $arr_time = get_arr_time_knd($user, $in, $out); $arr = array(); $i = 0; foreach ($arr_knds as $knd) { $arr[$i]['knd_ID'] = $knd['knd_ID']; $arr[$i]['knd_name'] = $knd['knd_name']; $arr[$i]['knd_visible'] = $knd['knd_visible']; if (isset($arr_time[$knd['knd_ID']])) { $arr[$i]['zeit'] = formatDuration($arr_time[$knd['knd_ID']]); } else { $arr[$i]['zeit'] = formatDuration(0); } $i++; } return $arr; }
} 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 { $ann = get_arr_time_pct($in, $out, array($kga['usr']['usr_ID'])); } formatAnnotations($ann); $tpl->assign('pct_ann', $ann); // Get the annotations for the task sub list. if (isset($kga['customer'])) { $ann = get_arr_time_evt($in, $out, null, array($kga['customer']['knd_ID'])); } else {
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 = // ========================= // ========================= // = add / edit zef record =