public function data($UserID = 0, $start = null, $ende = null)
 {
     $p = mUserdata::getPluginSpecificData("mStatistik");
     $ps = mUserdata::getPluginSpecificData("mAkquise");
     $AC = anyC::get("Todo");
     $AC->addAssocV3("TodoFromDay", ">=", $start ? $start : Util::CLDateParser($this->startDatum, "store"));
     $AC->addAssocV3("TodoFromDay", "<=", $ende ? $ende : Util::CLDateParser($this->endDatum, "store"));
     if ($UserID) {
         $AC->addAssocV3("TodoUserID", "=", $UserID);
     }
     $AC->addGroupV3("TodoUserID");
     if (!isset($p["pluginSpecificCanUseControlling"])) {
         $AC->addAssocV3("TodoUserID", "=", Session::currentUser()->getID(), "AND", "2");
         foreach ($ps as $key => $value) {
             if (strstr($key, "pluginSpecificCanSeeFrom")) {
                 $AC->addAssocV3("TodoUserID", "=", str_replace("pluginSpecificCanSeeFrom", "", $key), "OR", "2");
             }
         }
     }
     $AC->setFieldsV3(array("TodoUserID", "COUNT(*) AS gesamt", "COUNT(CASE WHEN TodoDoneTime > 0 THEN 1 END) AS gesamtDM", "COUNT(CASE WHEN TodoType = 3 THEN 1 END) AS gesamtKalt", "COUNT(CASE WHEN TodoType = 4 THEN 1 END) AS gesamtErst", "COUNT(CASE WHEN TodoType = 5 THEN 1 END) AS gesamtFolge"));
     $AC->addOrderV3("gesamt ", "DESC");
     return $AC;
 }
Beispiel #2
0
 function saveMe($checkUserData = true, $output = true)
 {
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     try {
         $MArgs = func_get_args();
         return Aspect::joinPoint("around", $this, __METHOD__, $MArgs);
     } catch (AOPNoAdviceException $e) {
     }
     Aspect::joinPoint("before", $this, __METHOD__, $MArgs);
     // </editor-fold>
     $ps = mUserdata::getPluginSpecificData("Adressen");
     if (isset($ps["pluginSpecificCanUse1xAdresse"]) and $this->A->AuftragID == -1) {
         die("Speichern nicht möglich!");
     }
     $this->changeA("lastChange", time());
     if ($this->A("AuftragID") != -1 and ($this->A("type") == "auftragsAdresse" or $this->A("type") == "default")) {
         $Auftrag = new Auftrag($this->A("AuftragID"));
         $Auftrag->updateAdressID($this->getID());
     }
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     return Aspect::joinPoint("after", $this, __METHOD__, parent::saveMe($checkUserData, $output));
     // </editor-fold>
 }