27 require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
39 public $module =
'mymodule';
44 public $element =
'myobject';
49 public $table_element =
'mymodule_myobject';
55 public $ismultientitymanaged = 0;
60 public $isextrafieldmanaged = 1;
65 public $picto =
'fa-file';
68 const STATUS_DRAFT = 0;
69 const STATUS_VALIDATED = 1;
70 const STATUS_CANCELED = 9;
116 public $fields = array(
117 'rowid' => array(
'type'=>
'integer',
'label'=>
'TechnicalID',
'enabled'=>1,
'visible'=>-2,
'noteditable'=>1,
'notnull'=> 1,
'index'=>1,
'position'=>1,
'comment'=>
'Id',
'css'=>
'left'),
118 'entity' => array(
'type'=>
'integer',
'label'=>
'Entity',
'enabled'=>1,
'visible'=>0,
'notnull'=> 1,
'default'=>1,
'index'=>1,
'position'=>10),
119 'ref' => array(
'type'=>
'varchar(128)',
'label'=>
'Ref',
'enabled'=>1,
'visible'=>1,
'noteditable'=>0,
'default'=>
'',
'notnull'=> 1,
'showoncombobox'=>1,
'index'=>1,
'position'=>20,
'searchall'=>1,
'comment'=>
'Reference of object',
'validate'=>1),
120 'label' => array(
'type'=>
'varchar(255)',
'label'=>
'Label',
'enabled'=>1,
'visible'=>1,
'position'=>30,
'searchall'=>1,
'css'=>
'minwidth300',
'cssview'=>
'wordbreak',
'help'=>
'Help text',
'showoncombobox'=>2,
'validate'=>1,
'alwayseditable'=>1),
121 'amount' => array(
'type'=>
'price',
'label'=>
'Amount',
'enabled'=>1,
'visible'=>1,
'default'=>
'null',
'position'=>40,
'searchall'=>0,
'isameasure'=>1,
'help'=>
'Help text for amount',
'validate'=>1),
122 'qty' => array(
'type'=>
'real',
'label'=>
'Qty',
'enabled'=>1,
'visible'=>1,
'default'=>
'0',
'position'=>45,
'searchall'=>0,
'isameasure'=>1,
'help'=>
'Help text for quantity',
'css'=>
'maxwidth75imp',
'validate'=>1),
123 'fk_soc' => array(
'type'=>
'integer:Societe:societe/class/societe.class.php:1:((status:=:1) AND (entity:IN:__SHARED_ENTITIES__))',
'picto'=>
'company',
'label'=>
'ThirdParty',
'visible'=> 1,
'enabled'=>
'isModEnabled("societe")',
'position'=>50,
'notnull'=>-1,
'index'=>1,
'help'=>
'OrganizationEventLinkToThirdParty',
'validate'=>1,
'css'=>
'maxwidth500 widthcentpercentminusxx',
'csslist'=>
'tdoverflowmax150'),
124 'fk_project' => array(
'type'=>
'integer:Project:projet/class/project.class.php:1',
'label'=>
'Project',
'picto'=>
'project',
'enabled'=>
'isModEnabled("project")',
'visible'=>-1,
'position'=>52,
'notnull'=>-1,
'index'=>1,
'validate'=>1,
'css'=>
'maxwidth500 widthcentpercentminusxx',
'csslist'=>
'tdoverflowmax150'),
125 'description' => array(
'type'=>
'text',
'label'=>
'Description',
'enabled'=>1,
'visible'=>3,
'position'=>60,
'validate'=>1),
126 'note_public' => array(
'type'=>
'html',
'label'=>
'NotePublic',
'enabled'=>1,
'visible'=>0,
'position'=>61,
'validate'=>1,
'cssview'=>
'wordbreak'),
127 'note_private' => array(
'type'=>
'html',
'label'=>
'NotePrivate',
'enabled'=>1,
'visible'=>0,
'position'=>62,
'validate'=>1,
'cssview'=>
'wordbreak'),
128 'date_creation' => array(
'type'=>
'datetime',
'label'=>
'DateCreation',
'enabled'=>1,
'visible'=>-2,
'notnull'=> 1,
'position'=>500),
129 'tms' => array(
'type'=>
'timestamp',
'label'=>
'DateModification',
'enabled'=>1,
'visible'=>-2,
'notnull'=> 0,
'position'=>501),
131 'fk_user_creat' => array(
'type'=>
'integer:User:user/class/user.class.php',
'label'=>
'UserAuthor',
'picto'=>
'user',
'enabled'=>1,
'visible'=>-2,
'notnull'=> 1,
'position'=>510,
'foreignkey'=>
'user.rowid',
'csslist'=>
'tdoverflowmax150'),
132 'fk_user_modif' => array(
'type'=>
'integer:User:user/class/user.class.php',
'label'=>
'UserModif',
'picto'=>
'user',
'enabled'=>1,
'visible'=>-2,
'notnull'=>-1,
'position'=>511,
'csslist'=>
'tdoverflowmax150'),
134 'last_main_doc' => array(
'type'=>
'varchar(255)',
'label'=>
'LastMainDoc',
'enabled'=>1,
'visible'=>0,
'notnull'=>0,
'position'=>600),
135 'import_key' => array(
'type'=>
'varchar(14)',
'label'=>
'ImportId',
'enabled'=>1,
'visible'=>-2,
'notnull'=>-1,
'index'=>0,
'position'=>1000),
136 'model_pdf' => array(
'type'=>
'varchar(255)',
'label'=>
'Model pdf',
'enabled'=>1,
'visible'=>0,
'notnull'=>-1,
'position'=>1010),
137 'status' => array(
'type'=>
'integer',
'label'=>
'Status',
'enabled'=>1,
'visible'=>1,
'notnull'=> 1,
'default'=>0,
'index'=>1,
'position'=>2000,
'arrayofkeyval'=>array(0=>
'Draft', 1=>
'Validated', 9=>
'Canceled'),
'validate'=>1),
179 public $date_creation;
189 public $fk_user_creat;
194 public $fk_user_modif;
199 public $last_main_doc;
251 global $conf, $langs;
255 if (!
getDolGlobalInt(
'MAIN_SHOW_TECHNICAL_ID') && isset($this->fields[
'rowid']) && !empty($this->fields[
'ref'])) {
256 $this->fields[
'rowid'][
'visible'] = 0;
258 if (!
isModEnabled(
'multicompany') && isset($this->fields[
'entity'])) {
259 $this->fields[
'entity'][
'enabled'] = 0;
269 foreach ($this->fields as $key => $val) {
270 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
271 unset($this->fields[$key]);
276 if (is_object($langs)) {
277 foreach ($this->fields as $key => $val) {
278 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
279 foreach ($val[
'arrayofkeyval'] as $key2 => $val2) {
280 $this->fields[$key][
'arrayofkeyval'][$key2] = $langs->trans($val2);
300 return $resultcreate;
312 global $langs, $extrafields;
317 $object =
new self($this->db);
322 $result = $object->fetchCommon($fromid);
323 if ($result > 0 && !empty($object->table_element_line)) {
324 $object->fetchLines();
333 unset($object->fk_user_creat);
334 unset($object->import_key);
337 if (property_exists($object,
'ref')) {
338 $object->ref = empty($this->fields[
'ref'][
'default']) ?
"Copy_Of_".$object->ref : $this->fields[
'ref'][
'default'];
340 if (property_exists($object,
'label')) {
341 $object->label = empty($this->fields[
'label'][
'default']) ? $langs->trans(
"CopyOf").
" ".$object->label : $this->fields[
'label'][
'default'];
343 if (property_exists($object,
'status')) {
344 $object->status = self::STATUS_DRAFT;
346 if (property_exists($object,
'date_creation')) {
347 $object->date_creation =
dol_now();
349 if (property_exists($object,
'date_modification')) {
350 $object->date_modification =
null;
354 if (is_array($object->array_options) && count($object->array_options) > 0) {
355 $extrafields->fetch_name_optionals_label($this->table_element);
356 foreach ($object->array_options as $key => $option) {
357 $shortkey = preg_replace(
'/options_/',
'', $key);
358 if (!empty($extrafields->attributes[$this->table_element][
'unique'][$shortkey])) {
361 unset($object->array_options[$key]);
367 $object->context[
'createfromclone'] =
'createfromclone';
368 $result = $object->createCommon($user);
383 if (!empty($object->socid) && property_exists($this,
'fk_soc') && $this->fk_soc == $object->socid) {
390 unset($object->context[
'createfromclone']);
397 $this->db->rollback();
409 public function fetch($id, $ref =
null)
412 if ($result > 0 && !empty($this->table_element_line)) {
425 $this->lines = array();
443 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, array $filter = array(), $filtermode =
'AND')
453 $sql .=
" FROM ".$this->db->prefix().$this->table_element.
" as t";
454 if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
455 $sql .=
" WHERE t.entity IN (".getEntity($this->element).
")";
457 $sql .=
" WHERE 1 = 1";
461 if (count($filter) > 0) {
462 foreach ($filter as $key => $value) {
463 if ($key ==
't.rowid') {
464 $sqlwhere[] = $key.
" = ".((int) $value);
465 } elseif (in_array($this->fields[$key][
'type'], array(
'date',
'datetime',
'timestamp'))) {
466 $sqlwhere[] = $key.
" = '".$this->db->idate($value).
"'";
467 } elseif ($key ==
'customsql') {
468 $sqlwhere[] = $value;
469 } elseif (strpos($value,
'%') ===
false) {
470 $sqlwhere[] = $key.
" IN (".$this->db->sanitize($this->db->escape($value)).
")";
472 $sqlwhere[] = $key.
" LIKE '%".$this->db->escape($value).
"%'";
476 if (count($sqlwhere) > 0) {
477 $sql .=
" AND (".implode(
" ".$filtermode.
" ", $sqlwhere).
")";
480 if (!empty($sortfield)) {
481 $sql .= $this->db->order($sortfield, $sortorder);
483 if (!empty($limit)) {
484 $sql .= $this->db->plimit($limit, $offset);
487 $resql = $this->db->query(
$sql);
489 $num = $this->db->num_rows($resql);
491 while ($i < ($limit ? min($limit, $num) : $num)) {
492 $obj = $this->db->fetch_object($resql);
494 $record =
new self($this->db);
495 $record->setVarsFromFetchObj($obj);
497 $records[$record->id] = $record;
501 $this->db->free($resql);
505 $this->errors[] =
'Error '.$this->db->lasterror();
506 dol_syslog(__METHOD__.
' '.join(
',', $this->errors), LOG_ERR);
531 public function delete(
User $user, $notrigger =
false)
547 if ($this->status < 0) {
548 $this->error =
'ErrorDeleteLineNotAllowedByObjectStatus';
565 global $conf, $langs;
567 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
572 if ($this->status == self::STATUS_VALIDATED) {
573 dol_syslog(get_class($this).
"::validate action abandonned: already validated", LOG_WARNING);
590 if (!$error && (preg_match(
'/^[\(]?PROV/i', $this->
ref) || empty($this->
ref))) {
595 $this->newref = $num;
599 $sql =
"UPDATE ".MAIN_DB_PREFIX.$this->table_element;
600 $sql .=
" SET ref = '".$this->db->escape($num).
"',";
601 $sql .=
" status = ".self::STATUS_VALIDATED;
602 if (!empty($this->fields[
'date_validation'])) {
603 $sql .=
", date_validation = '".$this->db->idate($now).
"'";
605 if (!empty($this->fields[
'fk_user_valid'])) {
606 $sql .=
", fk_user_valid = ".((int) $user->id);
608 $sql .=
" WHERE rowid = ".((int) $this->
id);
610 dol_syslog(get_class($this).
"::validate()", LOG_DEBUG);
611 $resql = $this->db->query(
$sql);
614 $this->error = $this->db->lasterror();
618 if (!$error && !$notrigger) {
620 $result = $this->
call_trigger(
'MYOBJECT_VALIDATE', $user);
629 $this->oldref = $this->ref;
632 if (preg_match(
'/^[\(]?PROV/i', $this->
ref)) {
634 $sql =
'UPDATE '.MAIN_DB_PREFIX.
"ecm_files set filename = CONCAT('".$this->db->escape($this->newref).
"', SUBSTR(filename, ".(strlen($this->
ref) + 1).
")), filepath = 'myobject/".$this->db->escape($this->newref).
"'";
635 $sql .=
" WHERE filename LIKE '".$this->db->escape($this->
ref).
"%' AND filepath = 'myobject/".$this->db->escape($this->
ref).
"' and entity = ".$conf->entity;
636 $resql = $this->db->query(
$sql);
638 $error++; $this->error = $this->db->lasterror();
644 $dirsource = $conf->mymodule->dir_output.
'/myobject/'.$oldref;
645 $dirdest = $conf->mymodule->dir_output.
'/myobject/'.$newref;
646 if (!$error && file_exists($dirsource)) {
647 dol_syslog(get_class($this).
"::validate() rename dir ".$dirsource.
" into ".$dirdest);
649 if (@rename($dirsource, $dirdest)) {
652 $listoffiles =
dol_dir_list($conf->mymodule->dir_output.
'/myobject/'.$newref,
'files', 1,
'^'.preg_quote($oldref,
'/'));
653 foreach ($listoffiles as $fileentry) {
654 $dirsource = $fileentry[
'name'];
655 $dirdest = preg_replace(
'/^'.preg_quote($oldref,
'/').
'/', $newref, $dirsource);
656 $dirsource = $fileentry[
'path'].
'/'.$dirsource;
657 $dirdest = $fileentry[
'path'].
'/'.$dirdest;
658 @rename($dirsource, $dirdest);
668 $this->status = self::STATUS_VALIDATED;
675 $this->db->rollback();
691 if ($this->status <= self::STATUS_DRAFT) {
702 return $this->
setStatusCommon($user, self::STATUS_DRAFT, $notrigger,
'MYOBJECT_UNVALIDATE');
712 public function cancel($user, $notrigger = 0)
715 if ($this->status != self::STATUS_VALIDATED) {
726 return $this->
setStatusCommon($user, self::STATUS_CANCELED, $notrigger,
'MYOBJECT_CANCEL');
736 public function reopen($user, $notrigger = 0)
739 if ($this->status == self::STATUS_VALIDATED) {
750 return $this->
setStatusCommon($user, self::STATUS_VALIDATED, $notrigger,
'MYOBJECT_REOPEN');
762 global $conf, $langs;
767 return [
'optimize' => $langs->trans(
"ShowMyObject")];
769 $datas[
'picto'] =
img_picto(
'', $this->picto).
' <u>'.$langs->trans(
"MyObject").
'</u>';
770 if (isset($this->status)) {
771 $datas[
'picto'] .=
' '.$this->getLibStatut(5);
773 $datas[
'ref'] .=
'<br><b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
788 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
790 global $conf, $langs, $hookmanager;
792 if (!empty($conf->dol_no_mouse_hover)) {
799 'objecttype' => $this->element.($this->module ?
'@'.$this->module :
''),
802 $classfortooltip =
'classfortooltip';
805 $classfortooltip =
'classforajaxtooltip';
806 $dataparams =
' data-params="'.dol_escape_htmltag(json_encode($params)).
'"';
812 $url =
dol_buildpath(
'/mymodule/myobject_card.php', 1).
'?id='.$this->id;
814 if ($option !==
'nolink') {
816 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
817 if ($save_lastsearch_value == -1 && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
818 $add_save_lastsearch_values = 1;
820 if ($url && $add_save_lastsearch_values) {
821 $url .=
'&save_lastsearch_values=1';
826 if (empty($notooltip)) {
828 $label = $langs->trans(
"ShowMyObject");
829 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
831 $linkclose .= ($label ?
' title="'.dol_escape_htmltag($label, 1).
'"' :
' title="tocomplete"');
832 $linkclose .= $dataparams.
' class="'.$classfortooltip.($morecss ?
' '.$morecss :
'').
'"';
834 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
837 if ($option ==
'nolink' || empty($url)) {
838 $linkstart =
'<span';
840 $linkstart =
'<a href="'.$url.
'"';
842 $linkstart .= $linkclose.
'>';
843 if ($option ==
'nolink' || empty($url)) {
844 $linkend =
'</span>';
849 $result .= $linkstart;
851 if (empty($this->showphoto_on_popup)) {
853 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), (($withpicto != 2) ?
'class="paddingright"' :
''), 0, 0, $notooltip ? 0 : 1);
857 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
859 list($class, $module) = explode(
'@', $this->picto);
862 $filename = $filearray[0][
'name'];
863 if (!empty($filename)) {
864 $pospoint = strpos($filearray[0][
'name'],
'.');
866 $pathtophoto = $class.
'/'.$this->
ref.
'/thumbs/'.substr($filename, 0, $pospoint).
'_mini'.substr($filename, $pospoint);
867 if (!
getDolGlobalInt(strtoupper($module.
'_'.$class).
'_FORMATLISTPHOTOSASUSERS')) {
868 $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>';
870 $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>';
875 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'"'), 0, 0, $notooltip ? 0 : 1);
880 if ($withpicto != 2) {
881 $result .= $this->ref;
887 global $action, $hookmanager;
888 $hookmanager->initHooks(array($this->element.
'dao'));
889 $parameters = array(
'id' => $this->
id,
'getnomurl' => &$result);
890 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
892 $result = $hookmanager->resPrint;
894 $result .= $hookmanager->resPrint;
909 global $conf, $langs;
911 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
913 $return =
'<div class="box-flex-item box-flex-grow-zero">';
914 $return .=
'<div class="info-box info-box-sm">';
915 $return .=
'<span class="info-box-icon bg-infobox-action">';
917 $return .=
'</span>';
918 $return .=
'<div class="info-box-content">';
919 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl() : $this->ref).
'</span>';
920 if ($selected >= 0) {
921 $return .=
'<input id="cb'.$this->id.
'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
923 if (property_exists($this,
'label')) {
924 $return .=
' <div class="inline-block opacitymedium valignmiddle tdoverflowmax100">'.$this->label.
'</div>';
926 if (property_exists($this,
'amount')) {
928 $return .=
'<span class="info-box-label amount">'.price($this->amount, 0, $langs, 1, -1, -1, $conf->currency).
'</span>';
930 if (method_exists($this,
'getLibStatut')) {
931 $return .=
'<br><div class="info-box-status margintoponly">'.$this->getLibStatut(3).
'</div>';
948 return $this->
LibStatut($this->status, $mode);
959 return $this->
LibStatut($this->status, $mode);
973 if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
976 $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'Draft');
977 $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Enabled');
978 $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv(
'Disabled');
979 $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'Draft');
980 $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Enabled');
981 $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv(
'Disabled');
984 $statusType =
'status'.$status;
986 if ($status == self::STATUS_CANCELED) {
987 $statusType =
'status6';
990 return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status],
'', $statusType, $mode);
1001 $sql =
"SELECT rowid,";
1002 $sql .=
" date_creation as datec, tms as datem,";
1003 $sql .=
" fk_user_creat, fk_user_modif";
1004 $sql .=
" FROM ".MAIN_DB_PREFIX.$this->table_element.
" as t";
1005 $sql .=
" WHERE t.rowid = ".((int) $id);
1007 $result = $this->db->query(
$sql);
1009 if ($this->db->num_rows($result)) {
1010 $obj = $this->db->fetch_object($result);
1012 $this->
id = $obj->rowid;
1014 $this->user_creation_id = $obj->fk_user_creat;
1015 $this->user_modification_id = $obj->fk_user_modif;
1016 if (!empty($obj->fk_user_valid)) {
1017 $this->user_validation_id = $obj->fk_user_valid;
1019 $this->date_creation = $this->db->jdate($obj->datec);
1020 $this->date_modification = empty($obj->datem) ?
'' : $this->db->jdate($obj->datem);
1021 if (!empty($obj->datev)) {
1022 $this->date_validation = empty($obj->datev) ?
'' : $this->db->jdate($obj->datev);
1026 $this->db->free($result);
1054 $this->lines = array();
1057 $result = $objectline->fetchAll(
'ASC',
'position', 0, 0, array(
'customsql'=>
'fk_myobject = '.((
int) $this->
id)));
1059 if (is_numeric($result)) {
1063 $this->lines = $result;
1064 return $this->lines;
1075 global $langs, $conf;
1076 $langs->load(
"mymodule@mymodule");
1079 $conf->global->MYMODULE_MYOBJECT_ADDON =
'mod_myobject_standard';
1089 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
1090 foreach ($dirmodels as $reldir) {
1094 $mybool |= @include_once $dir.$file;
1097 if ($mybool ===
false) {
1102 if (class_exists($classname)) {
1103 $obj =
new $classname();
1104 $numref = $obj->getNextValue($this);
1106 if ($numref !=
'' && $numref !=
'-1') {
1109 $this->error = $obj->error;
1114 print $langs->trans(
"Error").
" ".$langs->trans(
"ClassNotFound").
' '.$classname;
1118 print $langs->trans(
"ErrorNumberingModuleNotSetup", $this->element);
1134 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams =
null)
1136 global $conf, $langs;
1139 $includedocgeneration = 0;
1141 $langs->load(
"mymodule@mymodule");
1144 $modele =
'standard_myobject';
1146 if (!empty($this->model_pdf)) {
1147 $modele = $this->model_pdf;
1153 $modelpath =
"core/modules/mymodule/doc/";
1155 if ($includedocgeneration && !empty($modele)) {
1156 $result = $this->
commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
1187 $this->db->commit();
1194 require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobjectline.class.php';
1207 public $isextrafieldmanaged = 0;