31require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
42 public $table_element =
'adherent_type';
47 public $element =
'adherent_type';
52 public $picto =
'members';
79 public $duration_value;
84 public $duration_unit;
99 public $caneditamount;
119 public $mail_subscription =
'';
122 public $mail_resiliate =
'';
125 public $mail_exclude =
'';
128 public $members = array();
143 public $multilangs = array();
152 "rowid" => array(
"type" =>
"integer",
"label" =>
"TechnicalID",
"enabled" =>
"1",
'position' => 10,
'notnull' => 1,
"visible" =>
"-1",),
153 "tms" => array(
"type" =>
"timestamp",
"label" =>
"DateModification",
"enabled" =>
"1",
'position' => 20,
'notnull' => 1,
"visible" =>
"-1",),
154 "statut" => array(
"type" =>
"smallint(6)",
"label" =>
"Statut",
"enabled" =>
"1",
'position' => 500,
'notnull' => 1,
"visible" =>
"-1",),
155 "libelle" => array(
"type" =>
"varchar(50)",
"label" =>
"Label",
"enabled" =>
"1",
'position' => 30,
'notnull' => 1,
"visible" =>
"-1",),
156 "subscription" => array(
"type" =>
"varchar(3)",
"label" =>
"Subscription",
"enabled" =>
"1",
'position' => 35,
'notnull' => 1,
"visible" =>
"-1",),
157 "amount" => array(
"type" =>
"double(24,8)",
"label" =>
"Amount",
"enabled" =>
"1",
'position' => 40,
'notnull' => 0,
"visible" =>
"-1",),
158 "caneditamount" => array(
"type" =>
"integer",
"label" =>
"Caneditamount",
"enabled" =>
"1",
'position' => 45,
'notnull' => 0,
"visible" =>
"-1",),
159 "vote" => array(
"type" =>
"varchar(3)",
"label" =>
"Vote",
"enabled" =>
"1",
'position' => 50,
'notnull' => 1,
"visible" =>
"-1",),
160 "note" => array(
"type" =>
"longtext",
"label" =>
"Note",
"enabled" =>
"1",
'position' => 55,
'notnull' => 0,
"visible" =>
"-1",),
161 "mail_valid" => array(
"type" =>
"longtext",
"label" =>
"Mailvalid",
"enabled" =>
"1",
'position' => 60,
'notnull' => 0,
"visible" =>
"-1",),
162 "morphy" => array(
"type" =>
"varchar(3)",
"label" =>
"Morphy",
"enabled" =>
"1",
'position' => 65,
'notnull' => 0,
"visible" =>
"-1",),
163 "duration" => array(
"type" =>
"varchar(6)",
"label" =>
"Duration",
"enabled" =>
"1",
'position' => 70,
'notnull' => 0,
"visible" =>
"-1",),
177 $this->ismultientitymanaged = 1;
190 $current_lang = $langs->getDefaultLang();
192 $sql =
"SELECT lang, label, description, email";
193 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent_type_lang";
194 $sql .=
" WHERE fk_type = ".((int) $this->
id);
196 $result = $this->db->query($sql);
198 while ($obj = $this->db->fetch_object($result)) {
200 if ($obj->lang == $current_lang) {
201 $this->label = $obj->label;
203 $this->
email = $obj->email;
205 $this->multilangs[(string) $obj->lang][
"label"] = $obj->label;
206 $this->multilangs[(string) $obj->lang][
"description"] = $obj->description;
207 $this->multilangs[(string) $obj->lang][
"email"] = $obj->email;
211 $this->error =
"Error: ".$this->db->lasterror().
" - ".$sql;
226 $langs_available = $langs->get_available_languages(DOL_DOCUMENT_ROOT, 0, 2);
227 $current_lang = $langs->getDefaultLang();
229 foreach ($langs_available as $key => $value) {
230 if ($key == $current_lang) {
231 $sql =
"SELECT rowid";
232 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent_type_lang";
233 $sql .=
" WHERE fk_type = ".((int) $this->
id);
234 $sql .=
" AND lang = '".$this->db->escape($key).
"'";
236 $result = $this->db->query($sql);
238 if ($this->db->num_rows($result)) {
239 $sql2 =
"UPDATE ".MAIN_DB_PREFIX.
"adherent_type_lang";
241 $sql2 .=
" label = '".$this->db->escape($this->label).
"',";
242 $sql2 .=
" description = '".$this->db->escape($this->
description).
"'";
243 $sql2 .=
" WHERE fk_type = ".((int) $this->
id).
" AND lang='".$this->db->escape($key).
"'";
245 $sql2 =
"INSERT INTO ".MAIN_DB_PREFIX.
"adherent_type_lang (fk_type, lang, label, description";
247 $sql2 .=
" VALUES(".((int) $this->
id).
",'".$this->db->escape($key).
"','".$this->db->escape($this->label).
"',";
248 $sql2 .=
" '".$this->db->escape($this->
description).
"'";
251 dol_syslog(get_class($this).
'::setMultiLangs key = current_lang = '.$key);
252 if (!$this->db->query($sql2)) {
253 $this->error = $this->db->lasterror();
256 } elseif (isset($this->multilangs[$key])) {
257 $sql =
"SELECT rowid";
258 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent_type_lang";
259 $sql .=
" WHERE fk_type = ".((int) $this->
id);
260 $sql .=
" AND lang = '".$this->db->escape($key).
"'";
262 $result = $this->db->query($sql);
264 if ($this->db->num_rows($result)) {
265 $sql2 =
"UPDATE ".MAIN_DB_PREFIX.
"adherent_type_lang";
267 $sql2 .=
" label = '".$this->db->escape($this->multilangs[
"$key"][
"label"]).
"',";
268 $sql2 .=
" description = '".$this->db->escape($this->multilangs[
"$key"][
"description"]).
"'";
269 $sql2 .=
" WHERE fk_type = ".((int) $this->
id).
" AND lang='".$this->db->escape($key).
"'";
271 $sql2 =
"INSERT INTO ".MAIN_DB_PREFIX.
"adherent_type_lang (fk_type, lang, label, description";
273 $sql2 .=
" VALUES(".((int) $this->
id).
",'".$this->db->escape($key).
"','".$this->db->escape($this->multilangs[
"$key"][
"label"]).
"',";
274 $sql2 .=
" '".$this->db->escape($this->multilangs[
"$key"][
"description"]).
"'";
279 if ($this->multilangs[
"$key"][
"label"] || $this->multilangs[
"$key"][
"description"]) {
280 if (!$this->db->query($sql2)) {
281 $this->error = $this->db->lasterror();
291 $result = $this->
call_trigger(
'MEMBER_TYPE_SET_MULTILANGS', $user);
293 $this->error = $this->db->lasterror();
310 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"adherent_type_lang";
311 $sql .=
" WHERE fk_type = ".((int) $this->
id).
" AND lang = '".$this->db->escape($langtodelete).
"'";
313 dol_syslog(get_class($this).
'::delMultiLangs', LOG_DEBUG);
314 $result = $this->db->query($sql);
317 $result = $this->
call_trigger(
'MEMBER_TYPE_DEL_MULTILANGS', $user);
319 $this->error = $this->db->lasterror();
320 dol_syslog(get_class($this).
'::delMultiLangs error='.$this->error, LOG_ERR);
326 $this->error = $this->db->lasterror();
327 dol_syslog(get_class($this).
'::delMultiLangs error='.$this->error, LOG_ERR);
339 public function create($user, $notrigger = 0)
346 $this->label = trim($this->label);
350 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"adherent_type (";
354 $sql .=
") VALUES (";
355 $sql .=
"'".$this->db->escape($this->morphy).
"'";
356 $sql .=
", '".$this->db->escape($this->label).
"'";
357 $sql .=
", ".((int)
$conf->entity);
360 dol_syslog(
"Adherent_type::create", LOG_DEBUG);
361 $result = $this->db->query($sql);
363 $this->
id = $this->db->last_insert_id(MAIN_DB_PREFIX.
"adherent_type");
365 $result = $this->
update($user, 1);
367 $this->db->rollback();
373 $result = $this->
call_trigger(
'MEMBER_TYPE_CREATE', $user);
384 dol_syslog(get_class($this).
"::create ".$this->error, LOG_ERR);
385 $this->db->rollback();
389 $this->error = $this->db->lasterror();
390 $this->db->rollback();
402 public function update($user, $notrigger = 0)
408 $this->label = trim($this->label);
410 if (empty($this->note_public) && !empty($this->note)) {
411 $this->note_public = $this->note;
416 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"adherent_type ";
418 $sql .=
"statut = ".((int) $this->
status).
",";
419 $sql .=
"libelle = '".$this->db->escape($this->label).
"',";
420 $sql .=
"morphy = '".$this->db->escape($this->morphy).
"',";
421 $sql .=
"subscription = '".$this->db->escape($this->subscription).
"',";
422 $sql .=
"amount = ".((empty($this->amount) && $this->amount ==
'') ?
"null" : ((float) $this->amount)).
",";
423 $sql .=
"caneditamount = ".((int) $this->caneditamount).
",";
424 $sql .=
"duration = '".$this->db->escape($this->duration_value.$this->duration_unit).
"',";
425 $sql .=
"note = '".$this->db->escape($this->note_public).
"',";
426 $sql .=
"vote = ".(int) $this->db->escape($this->vote).
",";
427 $sql .=
"mail_valid = '".$this->db->escape($this->mail_valid).
"'";
428 $sql .=
" WHERE rowid =".((int) $this->
id);
430 $result = $this->db->query($sql);
432 $this->
description = $this->db->escape($this->note_public);
437 $this->error = $langs->trans(
"Error").
" : ".$this->db->error().
" - ".$sql;
450 if (!$error && !$notrigger) {
452 $result = $this->
call_trigger(
'MEMBER_TYPE_MODIFY', $user);
463 $this->db->rollback();
464 dol_syslog(get_class($this).
"::update ".$this->error, LOG_ERR);
468 $this->error = $this->db->lasterror();
469 $this->db->rollback();
480 public function delete($user)
484 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"adherent_type";
485 $sql .=
" WHERE rowid = ".((int) $this->
id);
487 $resql = $this->db->query($sql);
490 $result = $this->
call_trigger(
'MEMBER_TYPE_DELETE', $user);
493 $this->db->rollback();
501 $this->db->rollback();
502 $this->error = $this->db->lasterror();
515 $sql =
"SELECT d.rowid, d.libelle as label, d.morphy, d.statut as status, d.duration, d.subscription, d.amount, d.caneditamount, d.mail_valid, d.note as note_public, d.vote";
516 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent_type as d";
517 $sql .=
" WHERE d.rowid = ".(int) $rowid;
519 dol_syslog(
"Adherent_type::fetch", LOG_DEBUG);
521 $resql = $this->db->query($sql);
523 if ($this->db->num_rows($resql)) {
524 $obj = $this->db->fetch_object($resql);
526 $this->
id = $obj->rowid;
527 $this->
ref = $obj->rowid;
528 $this->label = $obj->label;
529 $this->morphy = $obj->morphy;
530 $this->
status = $obj->status;
531 $this->duration = $obj->duration;
532 $this->duration_value = (int) substr($obj->duration, 0,
dol_strlen($obj->duration) - 1);
533 $this->duration_unit = substr($obj->duration, -1);
534 $this->subscription = $obj->subscription;
535 $this->amount = $obj->amount;
536 $this->caneditamount = $obj->caneditamount;
537 $this->mail_valid = $obj->mail_valid;
538 $this->note = $obj->note_public;
539 $this->note_public = $obj->note_public;
540 $this->vote = $obj->vote;
554 $this->error = $this->db->lasterror();
571 $adherenttypes = array();
573 $sql =
"SELECT rowid, libelle as label";
574 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent_type";
575 $sql .=
" WHERE entity IN (".getEntity(
'member_type').
")";
577 $sql .=
" AND statut = ".((int) $status);
580 $resql = $this->db->query($sql);
582 $nump = $this->db->num_rows($resql);
587 $obj = $this->db->fetch_object($resql);
589 $adherenttypes[$obj->rowid] = $langs->trans($obj->label);
594 print $this->db->error();
596 return $adherenttypes;
607 $amountbytype = array();
609 $sql =
"SELECT rowid, amount";
610 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent_type";
611 $sql .=
" WHERE entity IN (".getEntity(
'member_type').
")";
612 if ($status !==
null) {
613 $sql .=
" AND statut = ".((int) $status);
616 $resql = $this->db->query($sql);
618 $nump = $this->db->num_rows($resql);
623 $obj = $this->db->fetch_object($resql);
625 $amountbytype[$obj->rowid] = $obj->amount;
630 print $this->db->error();
633 return $amountbytype;
649 $sql =
"SELECT a.rowid";
650 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent as a";
651 $sql .=
" WHERE a.entity IN (".getEntity(
'member').
")";
652 $sql .=
" AND a.fk_adherent_type = ".((int) $this->
id);
653 if (!empty($excludefilter)) {
654 $sql .=
' AND ('.$excludefilter.
')';
657 dol_syslog(get_class($this).
"::listMembersForMemberType", LOG_DEBUG);
658 $resql = $this->db->query($sql);
660 while ($obj = $this->db->fetch_object($resql)) {
661 if (!array_key_exists($obj->rowid, $ret)) {
663 $memberstatic =
new Adherent($this->db);
665 $memberstatic->fetch($obj->rowid,
'', 0,
'',
false,
false);
667 $memberstatic->fetch($obj->rowid);
669 $ret[$obj->rowid] = $memberstatic;
671 $ret[$obj->rowid] = $obj->rowid;
676 $this->db->free($resql);
678 $this->members = $ret;
682 $this->error = $this->db->lasterror();
696 if ($morphy ==
'phy') {
697 return $langs->trans(
"Physical");
698 } elseif ($morphy ==
'mor') {
699 return $langs->trans(
"Moral");
701 return $langs->trans(
"MorAndPhy");
716 $langs->load(
'members');
719 $datas[
'picto'] =
img_picto(
'', $this->picto).
' <u class="paddingrightonly">'.$langs->trans(
"MemberType").
'</u> '.$this->
getLibStatut(4);
720 $datas[
'label'] =
'<br>'.$langs->trans(
"Label").
': '.$this->label;
721 if (isset($this->subscription)) {
722 $datas[
'subscription'] =
'<br>'.$langs->trans(
"SubscriptionRequired").
': '.
yn($this->subscription);
724 if (isset($this->vote)) {
725 $datas[
'vote'] =
'<br>'.$langs->trans(
"VoteAllowed").
': '.
yn($this->vote);
727 if (isset($this->duration)) {
728 $datas[
'duration'] =
'<br>'.$langs->trans(
"Duration").
': '.$this->duration_value;
729 if ($this->duration_value > 1) {
730 $dur = array(
"i" => $langs->trans(
"Minutes"),
"h" => $langs->trans(
"Hours"),
"d" => $langs->trans(
"Days"),
"w" => $langs->trans(
"Weeks"),
"m" => $langs->trans(
"Months"),
"y" => $langs->trans(
"Years"));
731 } elseif ($this->duration_value > 0) {
732 $dur = array(
"i" => $langs->trans(
"Minute"),
"h" => $langs->trans(
"Hour"),
"d" => $langs->trans(
"Day"),
"w" => $langs->trans(
"Week"),
"m" => $langs->trans(
"Month"),
"y" => $langs->trans(
"Year"));
734 $datas[
'duration'] .=
" " . (!empty($this->duration_unit) && isset($dur[$this->duration_unit]) ? $langs->trans($dur[$this->duration_unit]) :
'');
750 public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
755 $classfortooltip =
'classfortooltip';
759 'objecttype' => $this->element,
764 $classfortooltip =
'classforajaxtooltip';
765 $dataparams =
' data-params="'.dol_escape_htmltag(json_encode($params)).
'"';
771 $url = DOL_URL_ROOT.
'/adherents/type.php?rowid='.((int) $this->
id);
772 if ($option !=
'nolink') {
774 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
775 if ($save_lastsearch_value == -1 && isset($_SERVER[
"PHP_SELF"]) && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
776 $add_save_lastsearch_values = 1;
778 if ($add_save_lastsearch_values) {
779 $url .=
'&save_lastsearch_values=1';
782 $linkstart =
'<a href="'.$url.
'"';
783 $linkstart .= ($label ?
' title="'.dol_escape_htmltag($label, 1).
'"' :
' title="tocomplete"');
784 $linkstart .= $dataparams.
' class="'.$classfortooltip.
'">';
788 $result .= $linkstart;
790 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), (
' class="'.(($withpicto != 2) ?
'paddingright' :
'').
'"'), 0, 0, $notooltip ? 0 : 1);
792 if ($withpicto != 2) {
793 $result .= ($maxlen ?
dol_trunc($this->label, $maxlen) : $this->label);
823 $langs->load(
'companies');
825 $statusType =
'status4';
827 $statusType =
'status5';
830 if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
831 $this->labelStatus[0] = $langs->transnoentitiesnoconv(
"ActivityCeased");
832 $this->labelStatus[1] = $langs->transnoentitiesnoconv(
"InActivity");
833 $this->labelStatusShort[0] = $langs->transnoentitiesnoconv(
"ActivityCeased");
834 $this->labelStatusShort[1] = $langs->transnoentitiesnoconv(
"InActivity");
837 return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status],
'', $statusType, $mode);
881 $info[
"objectclass"] = explode(
',',
getDolGlobalString(
'LDAP_MEMBER_TYPE_OBJECT_CLASS'));
883 if (empty($this->note_public) && !empty($this->note)) {
884 $this->note_public = $this->note;
895 $valueofldapfield = array();
896 foreach ($this->members as $key => $val) {
898 $member->fetch($val->id,
'', 0,
'',
false,
false);
899 $info2 = $member->_load_ldap_info();
900 $valueofldapfield[] = $member->_load_ldap_dn($info2);
902 $info[
getDolGlobalString(
'LDAP_MEMBER_TYPE_FIELD_GROUPMEMBERS')] = (!empty($valueofldapfield) ? $valueofldapfield :
'');
920 $this->
ref =
'MTSPEC';
923 $this->label =
'MEMBERS TYPE SPECIMEN';
924 $this->note_public =
'This is a public note';
925 $this->mail_valid =
'This is welcome email';
926 $this->subscription = 1;
927 $this->caneditamount = 0;
933 $this->members = array(
948 return $this->mail_valid;
963 return $this->mail_subscription;
978 return $this->mail_resiliate;
993 return $this->mail_exclude;
1009 global $langs, $user;
1013 $return =
'<div class="box-flex-item box-flex-grow-zero">';
1014 $return .=
'<div class="info-box info-box-sm">';
1015 $return .=
'<span class="info-box-icon bg-infobox-action">';
1017 $return .=
'</span>';
1018 $return .=
'<div class="info-box-content">';
1019 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl() : $this->ref).
'</span>';
1023 if ($user->hasRight(
'adherent',
'configurer')) {
1024 $return .=
'<span class="right paddingleft"><a class="editfielda" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit&rowid='.urlencode($this->
ref).
'">'.
img_edit().
'</a></span>';
1026 $return .=
'<span class="right"> </span>';
1028 if (property_exists($this,
'vote')) {
1029 $return .=
'<br><span class="info-box-label opacitymedium">'.$langs->trans(
"VoteAllowed").
' : '.
yn($this->vote).
'</span>';
1031 if (property_exists($this,
'amount')) {
1032 if (is_null($this->amount) || $this->amount ===
'') {
1035 $return .=
'<br><span class="info-box-label opacitymedium">'.$langs->trans(
"Amount").
'</span>';
1036 $return .=
'<span class="amount"> : '.price($this->amount).
'</span>';
1039 if (method_exists($this,
'getLibStatut')) {
1040 $return .=
'<br><div class="info-box-status">'.$this->getLibStatut(3).
'</div>';
1042 $return .=
'</div>';
1043 $return .=
'</div>';
1044 $return .=
'</div>';
Class to manage members of a foundation.
Class to manage members type.
amountByType($status=null)
Return the array of all amounts per membership type id.
__construct($db)
Constructor.
getKanbanView($option='', $arraydata=null)
Return clickable link of object (with eventually picto)
update($user, $notrigger=0)
Updating the type in the database.
getMailOnExclude()
getMailOnExclude
fetch($rowid)
Function that retrieves the properties of a membership type.
getNomUrl($withpicto=0, $maxlen=0, $notooltip=0, $morecss='', $save_lastsearch_value=-1)
Return clickable name (with picto eventually)
create($user, $notrigger=0)
Function to create the member type.
$fields
Array with all fields and their property.
getTooltipContentArray($params)
getTooltipContentArray
setMultiLangs($user)
Update or add a translation for this member type.
getMailOnValid()
getMailOnValid
getMailOnSubscription()
getMailOnSubscription
initAsSpecimen()
Initialise an instance with random values.
liste_array($status=-1)
Return list of members' type.
getLibStatut($mode=0)
Return label of status (activity, closed)
delMultiLangs($langtodelete, $user)
Delete a language for this member type.
_load_ldap_info()
Initialize the info array (array of LDAP values) that will be used to call LDAP functions.
getmorphylib($morphy='')
Return translated label by the nature of a adherent (physical or moral)
getMultiLangs()
Load array this->multilangs.
getMailOnResiliate()
getMailOnResiliate
LibStatut($status, $mode=0)
Return the label of a given status.
_load_ldap_dn($info, $mode=0)
Retourne chaine DN complete dans l'annuaire LDAP pour l'objet.
listMembersForMemberType($excludefilter='', $mode=0)
Return array of Member objects for member type this->id (or all if this->id not defined)
Parent class of all other business classes (invoices, contracts, proposals, orders,...
fetch_optionals($rowid=null, $optionsArray=null)
Function to get extra fields of an object into $this->array_options This method is in most cases call...
insertExtraFields($trigger='', $userused=null)
Add/Update all extra fields values for the current object.
call_trigger($triggerName, $user)
Call trigger based on this instance.
print $langs trans("Ref").' m titre as m m statut as status
Or an array listing all the potential status of the object: array: int of the status => translated la...
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as p label as s rowid as s nom as s email
Sender: Who sends the email ("Sender" has sent emails on behalf of "From").
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
dol_htmlentitiesbr_decode($stringtodecode, $pagecodeto='UTF-8')
This function is called to decode a HTML string (it decodes entities and br tags)
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
dolGetStatus($statusLabel='', $statusLabelShort='', $html='', $statusType='status0', $displayMode=0, $url='', $params=array())
Output the badge of a status.
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...