';
- print '| '.$langs->trans("ThirdPartyName").' | ';
- print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
- print ' |
';
+ print '| '.$langs->trans("ThirdPartyName").' | ';
+ print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
+ print ' |
';
- // Prefix
- if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
- {
- print '| '.$langs->trans('Prefix').' | '.$object->prefix_comm.' |
';
- }
+ print '| '.$langs->trans("NbOfActiveNotifications").' | ';
+ print '';
+ $sql = "SELECT COUNT(n.rowid) as nb";
+ $sql.= " FROM ".MAIN_DB_PREFIX."notify_def as n";
+ $sql.= " WHERE fk_soc = ".$soc->id;
+ $resql=$db->query($sql);
+ if ($resql)
+ {
+ $num = $db->num_rows($resql);
+ $i = 0;
+ while ($i < $num)
+ {
+ $obj = $db->fetch_object($resql);
+ $nb=$obj->nb;
+ $i++;
+ }
+ }
+ else {
+ dol_print_error($db);
+ }
+ print $nb;
+ print ' |
';
+ print '
';
- if ($object->client)
- {
- print '