Beispiel #1
0
 print "<td>" . $memberstatic->getmorphylib($objp->morphy) . "</td>\n";
 // EMail
 print "<td>" . dol_print_email($objp->email, 0, 0, 1) . "</td>\n";
 $parameters = array('obj' => $obj);
 $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters);
 // Note that $action and $object may have been modified by hook
 print $hookmanager->resPrint;
 // Statut
 print '<td class="nowrap">';
 print $memberstatic->LibStatut($objp->statut, $objp->cotisation, $datefin, 2);
 print "</td>";
 // End of subscription date
 if ($datefin) {
     print '<td align="center" class="nowrap">';
     print dol_print_date($datefin, 'day');
     if ($memberstatic->hasDelay()) {
         print " " . img_warning($langs->trans("SubscriptionLate"));
     }
     print '</td>';
 } else {
     print '<td align="left" class="nowrap">';
     if ($objp->cotisation == 'yes') {
         print $langs->trans("SubscriptionNotReceived");
         if ($objp->statut > 0) {
             print " " . img_warning();
         }
     } else {
         print '&nbsp;';
     }
     print '</td>';
 }
Beispiel #2
0
 /**
  *      Load indicators for dashboard (this->nbtodo and this->nbtodolate)
  *
  *      @param	User	$user   		Objet user
  *      @return WorkboardResponse|int 	<0 if KO, WorkboardResponse if OK
  */
 function load_board($user)
 {
     global $conf, $langs;
     if ($user->societe_id) {
         return -1;
     }
     // protection pour eviter appel par utilisateur externe
     $now = dol_now();
     $sql = "SELECT a.rowid, a.datefin, a.statut";
     $sql .= " FROM " . MAIN_DB_PREFIX . "adherent as a";
     $sql .= " WHERE a.statut = 1";
     $sql .= " AND a.entity IN (" . getEntity('adherent', 1) . ")";
     $sql .= " AND (a.datefin IS NULL or a.datefin < '" . $this->db->idate($now) . "')";
     $resql = $this->db->query($sql);
     if ($resql) {
         $langs->load("members");
         $response = new WorkboardResponse();
         $response->warning_delay = $conf->adherent->cotisation->warning_delay / 60 / 60 / 24;
         $response->label = $langs->trans("MembersWithSubscriptionToReceive");
         $response->url = DOL_URL_ROOT . '/adherents/list.php?mainmenu=members&amp;statut=1';
         $response->img = img_object($langs->trans("Members"), "user");
         $adherentstatic = new Adherent($this->db);
         while ($obj = $this->db->fetch_object($resql)) {
             $response->nbtodo++;
             $adherentstatic->datefin = $this->db->jdate($obj->datefin);
             $adherentstatic->statut = $obj->statut;
             if ($adherentstatic->hasDelay()) {
                 $response->nbtodolate++;
             }
         }
         return $response;
     } else {
         dol_print_error($this->db);
         $this->error = $this->db->error();
         return -1;
     }
 }