예제 #1
0
$chirSel = CValue::getOrSession("chirSel");
$function_id = CValue::get("function_id");
$today = CMbDT::date();
$show_free = CValue::get("show_free");
$show_cancelled = CValue::get("show_cancelled");
$facturated = CValue::get("facturated");
$status = CValue::get("status");
$actes = CValue::get("actes");
$hide_in_conge = CValue::get("hide_in_conge", 0);
$min_hour = 23;
// gathering prat ids
$ids = array();
$function = new CFunctions();
$function->load($function_id);
if ($function->_id) {
    $function->loadRefsUsers();
    foreach ($function->_ref_users as $_user) {
        $ids[] = $_user->_id;
    }
}
if (!$function_id && $chirSel) {
    $ids[] = $chirSel;
}
// Liste des consultations a avancer si desistement
$count_si_desistement = CConsultation::countDesistementsForDay($ids, $today);
// Période
$debut = CValue::getOrSession("debut");
$debut = CMbDT::date("last sunday", $debut);
$fin = CMbDT::date("next sunday", $debut);
$debut = CMbDT::date("+1 day", $debut);
$prev = CMbDT::date("-1 week", $debut);