27require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
39 public $module =
'eventorganization';
44 public $element =
'conferenceorboothattendee';
49 public $table_element =
'eventorganization_conferenceorboothattendee';
54 public $picto =
'contact';
56 const STATUS_DRAFT = 0;
57 const STATUS_VALIDATED = 1;
58 const STATUS_USED = 5;
59 const STATUS_CANCELED = 9;
91 public $fields = array(
92 'rowid' => array(
'type' =>
'integer',
'label' =>
'TechnicalID',
'enabled' => 1,
'position' => 1,
'notnull' => 1,
'visible' => 0,
'noteditable' => 1,
'index' => 1,
'css' =>
'left',
'comment' =>
"Id"),
93 'ref' => array(
'type' =>
'varchar(128)',
'label' =>
'Ref',
'enabled' => 1,
'position' => 10,
'notnull' => 1,
'visible' => 2,
'index' => 1,
'showoncombobox' => 1,
'comment' =>
"Reference of object"),
95 'fk_project' => array(
'type' =>
'integer:Project:projet/class/project.class.php:1',
'label' =>
'Project',
'enabled' =>
"isModEnabled('project')",
'position' => 20,
'notnull' => 1,
'visible' => 1,
'index' => 1,
'picto' =>
'project',
'css' =>
'maxwidth500 widthcentpercentminusxx',
'csslist' =>
'tdoverflowmax150'),
96 'email' => array(
'type' =>
'mail',
'label' =>
'EmailAttendee',
'enabled' => 1,
'position' => 30,
'notnull' => 1,
'visible' => 1,
'index' => 1,
'autofocusoncreate' => 1,
'searchall' => 1,
'css' =>
'minwidth300',
'csslist' =>
'tdoverflowmax150'),
97 'firstname' => array(
'type' =>
'varchar(100)',
'label' =>
'Firstname',
'enabled' => 1,
'position' => 31,
'notnull' => 0,
'visible' => 1,
'index' => 1,
'searchall' => 1,
'csslist' =>
'tdoverflowmax125',
'showoncombobox' => 1),
98 'lastname' => array(
'type' =>
'varchar(100)',
'label' =>
'Lastname',
'enabled' => 1,
'position' => 32,
'notnull' => 0,
'visible' => 1,
'index' => 1,
'searchall' => 1,
'csslist' =>
'tdoverflowmax125',
'showoncombobox' => 1),
99 'fk_soc' => array(
'type' =>
'integer:Societe:societe/class/societe.class.php:1:((status:=:1) AND (entity:IN:__SHARED_ENTITIES__))',
'label' =>
'ThirdParty',
'enabled' =>
'isModEnabled("societe")',
'position' => 40,
'notnull' => -1,
'visible' => 1,
'index' => 1,
'help' =>
"OrganizationEventLinkToThirdParty",
'picto' =>
'company',
'css' =>
'maxwidth500 widthcentpercentminusxx',
'csslist' =>
'tdoverflowmax150'),
100 'email_company' => array(
'type' =>
'mail',
'label' =>
'EmailCompany',
'enabled' => 1,
'position' => 41,
'notnull' => 0,
'visible' => -2,
'searchall' => 1),
101 'date_subscription' => array(
'type' =>
'datetime',
'label' =>
'DateOfRegistration',
'enabled' => 1,
'position' => 56,
'notnull' => 1,
'visible' => 1,
'showoncombobox' => 1,),
102 'fk_invoice' => array(
'type' =>
'integer:Facture:compta/facture/class/facture.class.php',
'label' =>
'Invoice',
'enabled' =>
'isModEnabled("invoice")',
'position' => 57,
'notnull' => 0,
'visible' => 1,
'index' => 0,
'picto' =>
'bill',
'css' =>
'maxwidth500 widthcentpercentminusxx',
'csslist' =>
'tdoverflowmax150'),
103 'amount' => array(
'type' =>
'price',
'label' =>
'AmountPaid',
'enabled' => 1,
'position' => 57,
'notnull' => 0,
'visible' => 1,
'default' =>
'null',
'isameasure' => 1,
'help' =>
"AmountOfRegistrationPaid",),
104 'note_public' => array(
'type' =>
'html',
'label' =>
'NotePublic',
'enabled' => 1,
'position' => 61,
'notnull' => 0,
'visible' => 3,),
105 'note_private' => array(
'type' =>
'html',
'label' =>
'NotePrivate',
'enabled' => 1,
'position' => 62,
'notnull' => 0,
'visible' => 3,),
106 'date_creation' => array(
'type' =>
'datetime',
'label' =>
'DateCreation',
'enabled' => 1,
'position' => 500,
'notnull' => 1,
'visible' => -2,
'css' =>
'nowraponall'),
107 'tms' => array(
'type' =>
'timestamp',
'label' =>
'DateModification',
'enabled' => 1,
'position' => 501,
'notnull' => 0,
'visible' => -2,),
108 'fk_user_creat' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'UserAuthor',
'enabled' => 1,
'position' => 510,
'notnull' => -1,
'visible' => -2),
109 'fk_user_modif' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'UserModif',
'enabled' => 1,
'position' => 511,
'notnull' => -1,
'visible' => -2,),
110 'last_main_doc' => array(
'type' =>
'varchar(255)',
'label' =>
'LastMainDoc',
'enabled' => 1,
'position' => 600,
'notnull' => 0,
'visible' => 0,),
111 'import_key' => array(
'type' =>
'varchar(14)',
'label' =>
'ImportId',
'enabled' => 1,
'position' => 1000,
'notnull' => -1,
'visible' => -2,),
112 'model_pdf' => array(
'type' =>
'varchar(255)',
'label' =>
'Model pdf',
'enabled' => 1,
'position' => 1010,
'notnull' => -1,
'visible' => 0,),
113 'ip' => array(
'type' =>
'varchar(250)',
'label' =>
'IPAddress',
'enabled' => 1,
'position' => 900,
'notnull' => -1,
'visible' => -2,),
114 'status' => array(
'type' =>
'smallint',
'label' =>
'Status',
'enabled' => 1,
'position' => 1000,
'default' =>
'0',
'notnull' => 1,
'visible' => 1,
'index' => 1,
'arrayofkeyval' => array(
'0' =>
'Draft',
'1' =>
'Registered',
'5' =>
'ShowedUp',
'9' =>
'Canceled'),),
127 public $fk_actioncomm;
151 public $email_company;
155 public $date_subscription;
168 public $fk_user_creat;
172 public $fk_user_modif;
176 public $last_main_doc;
240 $this->ismultientitymanaged =
'fk_project@projet';
241 $this->isextrafieldmanaged = 1;
244 $this->fields[
'rowid'][
'visible'] = 0;
246 if (!
isModEnabled(
'multicompany') && isset($this->fields[
'entity'])) {
247 $this->fields[
'entity'][
'enabled'] = 0;
251 $this->fields[
'fk_soc'][
'type'] .=
' AND rowid IN (SELECT DISTINCT c.fk_soc FROM '.MAIN_DB_PREFIX.
'categorie_societe as c WHERE c.fk_categorie='.
getDolGlobalInt(
'EVENTORGANIZATION_FILTERATTENDEES_CAT').
')';
255 $this->fields[
'fk_soc'][
'type'] .=
' AND (client:=:'.((int)
getDolGlobalInt(
'EVENTORGANIZATION_FILTERATTENDEES_TYPE', 0) .
')');
265 foreach ($this->fields as $key => $val) {
266 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
267 unset($this->fields[$key]);
272 if (is_object($langs)) {
273 foreach ($this->fields as $key => $val) {
274 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
275 foreach ($val[
'arrayofkeyval'] as $key2 => $val2) {
276 $this->fields[$key][
'arrayofkeyval'][$key2] = $langs->trans($val2);
295 $langs->load(
"errors");
296 $this->errors[] = $langs->trans(
"ErrorBadEMail", $this->
email);
302 $result = $this->
fetch($result);
303 if ($result > 0 && empty($this->
ref)) {
304 $this->
ref = (string) $this->
id;
305 $result = $this->
update($user);
320 global $langs, $extrafields;
330 $result =
$object->fetchCommon($fromid);
331 if ($result > 0 && !empty(
$object->table_element_line)) {
342 unset(
$object->user_creation_id);
347 $object->status = self::STATUS_DRAFT;
349 $object->date_modification =
null;
352 if (is_array(
$object->array_options) && count(
$object->array_options) > 0) {
353 $extrafields->fetch_name_optionals_label($this->table_element);
354 foreach (
$object->array_options as $key => $option) {
355 $shortkey = preg_replace(
'/options_/',
'', $key);
356 if (!empty($extrafields->attributes[$this->table_element][
'unique'][$shortkey])) {
357 unset(
$object->array_options[$key]);
363 $object->context[
'createfromclone'] =
'createfromclone';
364 $result =
$object->createCommon($user);
370 $result =
$object->update($user);
380 unset(
$object->context[
'createfromclone']);
387 $this->db->rollback();
399 public function fetch($id, $ref =
null)
402 if ($result > 0 && !empty($this->table_element_line)) {
415 $this->lines = array();
434 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, $filter =
'', $filtermode =
'AND')
442 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
443 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"actioncomm as a on a.id = t.fk_actioncomm";
444 if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
445 $sql .=
' WHERE t.entity IN ('.getEntity($this->element).
')';
447 $sql .=
' WHERE 1 = 1';
451 if (is_array($filter)) {
452 dol_syslog(
"You are using a deprecated use of fetchAll. filter parameter must be an USF string now.", LOG_WARNING);
454 if (count($filter) > 0) {
455 foreach ($filter as $key => $value) {
456 if ($key ==
't.rowid' || $key ==
't.fk_soc' || $key ==
't.fk_project' || $key ==
't.fk_actioncomm') {
457 $sqlwhere[] = $this->db->sanitize($key).
' = '.((int) $value);
458 } elseif (!empty($this->fields[$key]) && in_array($this->fields[$key][
'type'], array(
'date',
'datetime',
'timestamp'))) {
459 $sqlwhere[] = $this->db->sanitize($key).
" = '".$this->db->idate((
int) $value).
"'";
460 } elseif ($key ==
'customsql') {
461 $sqlwhere[] = $value;
462 } elseif (strpos($value,
'%') ===
false) {
463 $sqlwhere[] = $this->db->sanitize($key).
' IN ('.$this->db->sanitize($this->db->escape($value)).
')';
465 $sqlwhere[] = $this->db->sanitize($key).
" LIKE '%".$this->db->escape($value).
"%'";
469 if (count($sqlwhere) > 0) {
470 $sql .=
' AND ('.implode(
' '.$this->db->sanitize($filtermode).
' ', $sqlwhere).
')';
480 $this->errors[] = $errormessage;
481 dol_syslog(__METHOD__.
' '.implode(
',', $this->errors), LOG_ERR);
485 if (!empty($sortfield)) {
486 $sql .= $this->db->order($sortfield, $sortorder);
488 if (!empty($limit)) {
489 $sql .= $this->db->plimit($limit, $offset);
492 $resql = $this->db->query($sql);
494 $num = $this->db->num_rows($resql);
496 while ($i < ($limit ? min($limit, $num) : $num)) {
497 $obj = $this->db->fetch_object($resql);
499 $record =
new self($this->db);
500 $record->setVarsFromFetchObj($obj);
502 $records[$record->id] = $record;
506 $this->db->free($resql);
510 $this->errors[] =
'Error '.$this->db->lasterror();
511 dol_syslog(__METHOD__.
' '.implode(
',', $this->errors), LOG_ERR);
536 public function delete(
User $user, $notrigger = 0)
553 $this->error =
'ErrorDeleteLineNotAllowedByObjectStatus';
572 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
577 if ($this->
status == self::STATUS_VALIDATED) {
578 dol_syslog(get_class($this).
"::validate action abandoned: already validated", LOG_WARNING);
587 $num = (string) $this->
ref;
588 if (preg_match(
'/^[\(]?PROV/i', $num) || empty($num)) {
589 $num = (string) $this->
id;
592 $this->newref = (string) $num;
596 $sql =
"UPDATE ".MAIN_DB_PREFIX.$this->table_element;
597 $sql .=
" SET ref = '".$this->db->escape($num).
"',";
598 $sql .=
" status = ".self::STATUS_VALIDATED;
599 if (!empty($this->fields[
'date_validation'])) {
600 $sql .=
", date_validation = '".$this->db->idate($now).
"'";
602 if (!empty($this->fields[
'fk_user_valid'])) {
603 $sql .=
", fk_user_valid = ".((int) $user->id);
605 $sql .=
" WHERE rowid = ".((int) $this->
id);
607 dol_syslog(get_class($this).
"::validate()", LOG_DEBUG);
608 $resql = $this->db->query($sql);
610 dol_print_error($this->db);
611 $this->error = $this->db->lasterror();
615 if (!$error && !$notrigger) {
617 $result = $this->call_trigger(
'CONFERENCEORBOOTHATTENDEE_VALIDATE', $user);
626 $this->oldref = $this->ref;
629 if (preg_match(
'/^[\(]?PROV/i', $this->
ref)) {
631 $sql =
'UPDATE '.MAIN_DB_PREFIX.
"ecm_files set filename = CONCAT('".$this->db->escape($this->newref).
"', SUBSTR(filename, ".(strlen($this->
ref) + 1).
")), filepath = 'conferenceorboothattendee/".$this->db->escape($this->newref).
"'";
632 $sql .=
" WHERE filename LIKE '".$this->db->escape($this->
ref).
"%' AND filepath = 'conferenceorboothattendee/".$this->db->escape($this->
ref).
"' and entity = ".((int)
$conf->entity);
633 $resql = $this->db->query($sql);
636 $this->error = $this->db->lasterror();
638 $sql =
'UPDATE '.MAIN_DB_PREFIX.
"ecm_files set filepath = 'conferenceorboothattendee/".$this->db->escape($this->newref).
"'";
639 $sql .=
" WHERE filepath = 'conferenceorboothattendee/".$this->db->escape($this->
ref).
"' and entity = ".((int)
$conf->entity);
640 $resql = $this->db->query($sql);
643 $this->error = $this->db->lasterror();
649 $dirsource =
$conf->eventorganization->dir_output.
'/conferenceorboothattendee/'.$oldref;
650 $dirdest =
$conf->eventorganization->dir_output.
'/conferenceorboothattendee/'.$newref;
651 if (!$error && file_exists($dirsource)) {
652 dol_syslog(get_class($this).
"::validate() rename dir ".$dirsource.
" into ".$dirdest);
654 if (@rename($dirsource, $dirdest)) {
657 $listoffiles =
dol_dir_list(
$conf->eventorganization->dir_output.
'/conferenceorboothattendee/'.$newref,
'files', 1,
'^'.preg_quote($oldref,
'/'));
658 foreach ($listoffiles as $fileentry) {
659 $dirsource = $fileentry[
'name'];
660 $dirdest = preg_replace(
'/^'.preg_quote($oldref,
'/').
'/', $newref, $dirsource);
661 $dirsource = $fileentry[
'path'].
'/'.$dirsource;
662 $dirdest = $fileentry[
'path'].
'/'.$dirdest;
663 @rename($dirsource, $dirdest);
673 $this->
status = self::STATUS_VALIDATED;
680 $this->db->rollback();
694 include_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
701 if (empty($this->fk_project)) {
705 $project =
new Project($this->db);
706 $result = $project->fetch($this->fk_project);
708 $this->project = $project;
723 if ($this->
status <= self::STATUS_DRAFT) {
727 return $this->
setStatusCommon($user, self::STATUS_DRAFT, $notrigger,
'CONFERENCEORBOOTHATTENDEE_UNVALIDATE');
737 public function cancel($user, $notrigger = 0)
740 if ($this->
status != self::STATUS_VALIDATED) {
744 return $this->
setStatusCommon($user, self::STATUS_CANCELED, $notrigger,
'CONFERENCEORBOOTHATTENDEE_CANCEL');
754 public function reopen($user, $notrigger = 0)
757 if ($this->
status != self::STATUS_CANCELED) {
761 return $this->
setStatusCommon($user, self::STATUS_VALIDATED, $notrigger,
'CONFERENCEORBOOTHATTENDEE_REOPEN');
774 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
776 global
$conf, $langs, $hookmanager;
778 if (!empty(
$conf->dol_no_mouse_hover)) {
784 $label = img_picto(
'', $this->picto).
' <u>'.$langs->trans(
"ConferenceOrBoothAttendee").
'</u>';
785 if (isset($this->
status)) {
786 $label .=
' '.$this->getLibStatut(5);
789 $label .=
'<b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
790 $label .=
'<br><b>'.$langs->trans(
'DateOfRegistration').
':</b> '.
dol_print_date($this->date_subscription,
'dayhour');
791 $label .=
'<br><b>'.$langs->trans(
'AmountPaid').
':</b> '.$this->amount;
793 $url = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_card.php?id='.$this->id;
795 if ($option !=
'nolink') {
797 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
798 if ($save_lastsearch_value == -1 && isset($_SERVER[
"PHP_SELF"]) && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
799 $add_save_lastsearch_values = 1;
801 if ($add_save_lastsearch_values) {
802 $url .=
'&save_lastsearch_values=1';
805 if ($option ==
'conforboothid') {
806 $url .=
'&conforboothid='.((int) $this->fk_actioncomm);
809 if ($option ==
'projectid') {
810 $url .=
'&fk_project='.((int) $this->fk_project).
'&withproject=1';
813 if ($option ==
'thirdpartyid') {
814 $url = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_list.php?thirdpartyid='.$this->id;
817 if ($option ==
'conforboothidproject') {
818 $url .=
'&conforboothid='.((int) $this->fk_actioncomm).
'&withproject=1';
823 if (empty($notooltip)) {
825 $label = $langs->trans(
"ShowConferenceOrBoothAttendee");
826 $linkclose .=
' alt="'.dolPrintHTMLForAttribute($label).
'"';
828 $linkclose .=
' title="'.dolPrintHTMLForAttribute($label).
'"';
829 $linkclose .=
' class="classfortooltip'.($morecss ?
' '.$morecss :
'').
'"';
831 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
834 if ($option ==
'nolink') {
835 $linkstart =
'<span';
837 $linkstart =
'<a href="'.$url.
'"';
839 $linkstart .= $linkclose.
'>';
840 if ($option ==
'nolink') {
841 $linkend =
'</span>';
846 $result .= $linkstart;
848 if (empty($this->showphoto_on_popup)) {
850 $result .= img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
854 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
856 list($class, $module) = explode(
'@', $this->picto);
859 $filename = $filearray[0][
'name'];
860 if (!empty($filename)) {
861 $pospoint = strpos($filearray[0][
'name'],
'.');
863 $pathtophoto = $class.
'/'.$this->
ref.
'/thumbs/'.
dol_substr($filename, 0, $pospoint).
'_mini'.
dol_substr($filename, $pospoint);
865 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$module.
'" alt="No photo" border="0" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart='.$module.
'&entity='.
$conf->entity.
'&file='.urlencode($pathtophoto).
'"></div></div>';
867 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart='.$module.
'&entity='.
$conf->entity.
'&file='.urlencode($pathtophoto).
'"></div>';
872 $result .= img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
877 if ($withpicto != 2) {
878 $result .= $this->ref;
884 global $action, $hookmanager;
885 $hookmanager->initHooks(array(
'conferenceorboothattendeedao'));
886 $parameters = array(
'id' => $this->
id,
'getnomurl' => &$result);
887 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
889 $result = $hookmanager->resPrint;
891 $result .= $hookmanager->resPrint;
932 if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
934 $this->labelStatus[self::STATUS_DRAFT] = $langs->trans(
'Draft');
935 $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans(
'Registered');
936 $this->labelStatus[self::STATUS_USED] = $langs->trans(
'ShowedUp');
937 $this->labelStatus[self::STATUS_CANCELED] = $langs->trans(
'Disabled');
938 $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans(
'Draft');
939 $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans(
'Registered');
940 $this->labelStatusShort[self::STATUS_USED] = $langs->trans(
'ShowedUp');
941 $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans(
'Disabled');
944 $labelStatus = $this->labelStatus[$status];
945 $labelStatusShort = $this->labelStatusShort[$status];
947 $statusType =
'status'.$status;
948 if ($status == self::STATUS_VALIDATED) {
949 $statusType =
'status2';
951 if ($status == self::STATUS_CANCELED) {
952 $statusType =
'status9';
955 if ($status == self::STATUS_VALIDATED && $this->date_subscription && $this->
amount) {
956 $statusType =
'status4';
957 $labelStatus .=
' - '.$langs->trans(
"Paid");
960 if ($status == self::STATUS_USED) {
961 $statusType =
'status6';
964 return dolGetStatus($labelStatus, $labelStatusShort,
'', $statusType, $mode);
975 $sql =
'SELECT rowid, date_creation as datec, tms as datem,';
976 $sql .=
' fk_user_creat, fk_user_modif';
977 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
978 $sql .=
' WHERE t.rowid = '.((int) $id);
979 $result = $this->db->query($sql);
981 if ($this->db->num_rows($result)) {
982 $obj = $this->db->fetch_object($result);
984 $this->
id = $obj->rowid;
986 $this->user_creation_id = $obj->fk_user_creat;
987 $this->user_modification_id = $obj->fk_user_modif;
988 $this->date_creation = $this->db->jdate($obj->datec);
989 $this->date_modification = empty($obj->datem) ?
'' : $this->db->jdate($obj->datem);
992 $this->db->free($result);
994 dol_print_error($this->db);
1020 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams =
null)
1022 global
$conf, $langs;
1026 $langs->load(
"eventorganization@eventorganization");
1029 $modele =
'standard_conferenceorboothattendee';
1031 if (!empty($this->model_pdf)) {
1032 $modele = $this->model_pdf;
1038 $modelpath =
"core/modules/eventorganization/doc/";
1040 if (!empty($modele)) {
1041 $result = $this->
commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
1058 'eventorganization_conferenceorboothattendee'
1073 public function getFullName($langs, $option = 0, $nameorder = -1, $maxlen = 0)
1075 $lastname = $this->lastname;
1076 $firstname = $this->firstname;
1077 if (empty($lastname)) {
1078 $lastname = (isset($this->lastname) ? $this->lastname : (isset($this->
name) ? $this->
name :
''));
1090require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobjectline.class.php';
1109 $this->isextrafieldmanaged = 0;
if(! $sortfield) if(! $sortorder) $object
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
deleteLineCommon(User $user, $idline, $notrigger=0)
Delete a line of object in database.
commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams=null)
Common function for all objects extending CommonObject for generating documents.
setErrorsFromObject($object)
setErrorsFromObject
createCommon(User $user, $notrigger=0)
Create object in the database.
getFieldList($alias='', $excludefields=array())
Function to concat keys of fields.
updateCommon(User $user, $notrigger=0)
Update object into database.
setStatusCommon($user, $status, $notrigger=0, $triggercode='')
Set to a status.
initAsSpecimenCommon()
Initialise object with example values Id must be 0 if object instance is a specimen.
copy_linked_contact($objFrom, $source='internal')
Copy contact from one element to current.
static commonReplaceThirdparty(DoliDB $dbs, $origin_id, $dest_id, array $tables, $ignoreerrors=0)
Function used to replace a thirdparty id with another one.
fetchLinesCommon($morewhere='', $noextrafields=0)
Load object in memory from the database.
fetchCommon($id, $ref=null, $morewhere='', $noextrafields=0)
Load object in memory from the database.
deleteCommon(User $user, $notrigger=0, $forcechilddeletion=0)
Delete object in database.
Parent class for class inheritance lines of business objects This class is useless for the moment so ...
Class for ConferenceOrBoothAttendee.
cancel($user, $notrigger=0)
Set cancel status.
createFromClone(User $user, $fromid)
Clone an object into another one.
getLibStatut($mode=0)
Return the label of the status.
info($id)
Load the info information in the object.
fetch($id, $ref=null)
Load object in memory from the database.
getLabelStatus($mode=0)
Return the label of the status.
create(User $user, $notrigger=0)
Create object into database.
fetchLines()
Load object lines in memory from the database.
initAsSpecimen()
Initialise object with example values Id must be 0 if object instance is a specimen.
getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
Return a link to the object card (with optionally the picto)
LibStatut($status, $mode=0)
Return the status.
static replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
Function used to replace a thirdparty id with another one.
fetch_projet()
Load the project with id $this->fk_project into this->project.
getFullName($langs, $option=0, $nameorder=-1, $maxlen=0)
Return full name ('name+' '+lastname)
__construct(DoliDB $db)
Constructor.
generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
Create a document onto disk according to template module.
deleteLine(User $user, $idline, $notrigger=0)
Delete a line of object in database.
update(User $user, $notrigger=0)
Update object into database.
reopen($user, $notrigger=0)
Set back to validated status.
fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, $filter='', $filtermode='AND')
Load list of objects in memory from the database.
setDraft($user, $notrigger=0)
Set draft status.
validate($user, $notrigger=0)
Validate object.
Class ConferenceOrBoothAttendeeLine.
__construct(DoliDB $db)
Constructor.
Class to manage Dolibarr database access.
Class to manage projects.
Class to manage Dolibarr users.
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").
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
dol_now($mode='gmt')
Return date for now.
dol_strlen($string, $stringencoding='UTF-8', $binarycount=0)
Make a strlen call.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dolGetFirstLastname($firstname, $lastname, $nameorder=-1)
Return firstname and lastname in correct order.
forgeSQLFromUniversalSearchCriteria($filter, &$errorstr='', $noand=0, $nopar=0, $noerror=0, $forbiddenfields=array())
forgeSQLFromUniversalSearchCriteria
dol_substr($string, $start, $length=null, $stringencoding='', $trunconbytes=0)
Make a substring.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
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.
isValidEmail($address, $acceptsupervisorkey=0, $acceptuserkey=0)
Return true if email syntax is ok.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
print $langs trans('Date')." left Ref Label right Qty right Price right TotalHT right TotalTTC right right right right right right right right right centpercent right TotalHT right n right VAT right n right TotalVAT right n No sujeto a RE IRPF right TotalLT1 right n right TotalLT2 right n right TotalTTC right n takeposcustomercurrency takeposcustomercurrency takeposcustomercurrency takeposcustomercurrency right TotalTTC takeposcustomercurrency right takeposcustomercurrency n right Paid right PaymentTypeShortLIQ right SELECT p pos_change as p datep as p p num_paiement as f pf amount as amount
$conf db name
Only used if Module[ID]Name translation string is not found.