29require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
40 public $element =
'stock';
45 public $table_element =
'entrepot';
50 public $picto =
'stock';
55 public $ismultientitymanaged = 1;
119 public $statuts = array();
124 public $fields = array(
125 'rowid' =>array(
'type'=>
'integer',
'label'=>
'ID',
'enabled'=>1,
'visible'=>0,
'notnull'=>1,
'position'=>10),
126 'entity' =>array(
'type'=>
'integer',
'label'=>
'Entity',
'enabled'=>1,
'visible'=>0,
'default'=>1,
'notnull'=>1,
'index'=>1,
'position'=>15),
127 'ref' =>array(
'type'=>
'varchar(255)',
'label'=>
'Ref',
'enabled'=>1,
'visible'=>1,
'showoncombobox'=>1,
'position'=>25,
'searchall'=>1),
128 'description' =>array(
'type'=>
'text',
'label'=>
'Description',
'enabled'=>1,
'visible'=>-2,
'position'=>35,
'searchall'=>1),
129 'lieu' =>array(
'type'=>
'varchar(64)',
'label'=>
'LocationSummary',
'enabled'=>1,
'visible'=>1,
'position'=>40,
'showoncombobox'=>2,
'searchall'=>1),
130 'fk_parent' =>array(
'type'=>
'integer:Entrepot:product/stock/class/entrepot.class.php:1:((statut:=:1) AND (entity:IN:__SHARED_ENTITIES__))',
'label'=>
'ParentWarehouse',
'enabled'=>1,
'visible'=>-2,
'position'=>41),
131 'fk_project' =>array(
'type'=>
'integer:Project:projet/class/project.class.php:1:(fk_statut:=:1)',
'label'=>
'Project',
'enabled'=>
'$conf->project->enabled',
'visible'=>-1,
'position'=>25),
132 'address' =>array(
'type'=>
'varchar(255)',
'label'=>
'Address',
'enabled'=>1,
'visible'=>-2,
'position'=>45,
'searchall'=>1),
133 'zip' =>array(
'type'=>
'varchar(10)',
'label'=>
'Zip',
'enabled'=>1,
'visible'=>-2,
'position'=>50,
'searchall'=>1),
134 'town' =>array(
'type'=>
'varchar(50)',
'label'=>
'Town',
'enabled'=>1,
'visible'=>-2,
'position'=>55,
'searchall'=>1),
135 'fk_departement' =>array(
'type'=>
'sellist:c_departements:label:rowid::active=1',
'label'=>
'State',
'enabled'=>1,
'visible'=>0,
'position'=>60),
136 'fk_pays' =>array(
'type'=>
'sellist:c_country:label:rowid::active=1',
'label'=>
'Country',
'enabled'=>1,
'visible'=>-2,
'position'=>65),
137 'phone' =>array(
'type'=>
'varchar(20)',
'label'=>
'Phone',
'enabled'=>1,
'visible'=>-2,
'position'=>70,
'searchall'=>1),
138 'fax' =>array(
'type'=>
'varchar(20)',
'label'=>
'Fax',
'enabled'=>1,
'visible'=>-2,
'position'=>75,
'searchall'=>1),
140 'datec' =>array(
'type'=>
'datetime',
'label'=>
'DateCreation',
'enabled'=>1,
'visible'=>-2,
'position'=>300),
141 'tms' =>array(
'type'=>
'timestamp',
'label'=>
'DateModification',
'enabled'=>1,
'visible'=>-2,
'notnull'=>1,
'position'=>301),
144 'statut' =>array(
'type'=>
'tinyint(4)',
'label'=>
'Status',
'enabled'=>1,
'visible'=>1,
'position'=>500,
'css'=>
'minwidth50'),
180 if (!empty($conf->global->ENTREPOT_EXTRA_STATUS)) {
195 public function create($user, $notrigger =
false)
201 $this->label = trim($this->label);
204 if ($this->label ==
'') {
205 $this->error =
"ErrorFieldRequired";
213 $sql =
"INSERT INTO ".$this->db->prefix().
"entrepot (ref, entity, datec, fk_user_author, fk_parent, fk_project)";
214 $sql .=
" VALUES ('".$this->db->escape($this->label).
"', ".((int) $conf->entity).
", '".$this->db->idate($now).
"', ".((int) $user->id).
", ".($this->fk_parent > 0 ? ((int) $this->fk_parent) :
"NULL").
", ".($this->fk_project > 0 ? ((
int) $this->fk_project) :
"NULL").
")";
216 dol_syslog(get_class($this).
"::create", LOG_DEBUG);
217 $result = $this->db->query($sql);
219 $id = $this->db->last_insert_id($this->db->prefix().
"entrepot");
224 $result = $this->
update($id, $user);
238 if (!$error && !$notrigger) {
240 $result = $this->
call_trigger(
'WAREHOUSE_CREATE', $user);
251 dol_syslog(get_class($this).
"::create return -3");
252 $this->db->rollback();
256 $this->error =
"Failed to get insert id";
257 dol_syslog(get_class($this).
"::create return -2");
261 $this->error = $this->db->error();
262 dol_syslog(get_class($this).
"::create Error ".$this->db->error());
263 $this->db->rollback();
276 public function update($id, $user, $notrigger =
false)
287 if (!empty($this->fk_parent)) {
288 $TChildWarehouses = array($id);
290 if (in_array($this->fk_parent, $TChildWarehouses)) {
291 $this->error =
'ErrorCannotAddThisParentWarehouse';
296 $this->label = trim($this->label);
300 $this->lieu = trim($this->lieu);
302 $this->address = trim($this->address);
303 $this->zip = trim($this->zip);
304 $this->town = trim($this->town);
305 $this->country_id = ($this->country_id > 0 ? $this->country_id : 0);
307 $sql =
"UPDATE ".$this->db->prefix().
"entrepot";
308 $sql .=
" SET ref = '".$this->db->escape($this->label).
"'";
309 $sql .=
", fk_parent = ".(($this->fk_parent > 0) ? $this->fk_parent :
"NULL");
310 $sql .=
", fk_project = ".(($this->fk_project > 0) ? $this->fk_project :
"NULL");
311 $sql .=
", description = '".$this->db->escape($this->
description).
"'";
312 $sql .=
", statut = ".((int) $this->
statut);
313 $sql .=
", lieu = '".$this->db->escape($this->lieu).
"'";
314 $sql .=
", address = '".$this->db->escape($this->address).
"'";
315 $sql .=
", zip = '".$this->db->escape($this->zip).
"'";
316 $sql .=
", town = '".$this->db->escape($this->town).
"'";
317 $sql .=
", fk_pays = ".((int) $this->country_id);
318 $sql .=
", phone = '".$this->db->escape($this->phone).
"'";
319 $sql .=
", fax = '".$this->db->escape($this->fax).
"'";
320 $sql .=
" WHERE rowid = ".((int) $id);
324 dol_syslog(get_class($this).
"::update", LOG_DEBUG);
325 $resql = $this->db->query($sql);
329 $this->errors[] =
"Error ".$this->db->lasterror();
339 if (!$error && !$notrigger) {
341 $result = $this->
call_trigger(
'WAREHOUSE_MODIFY', $user);
352 $this->db->rollback();
353 $this->error = $this->db->lasterror();
366 public function delete($user, $notrigger = 0)
372 dol_syslog(get_class($this).
"::delete id=".$this->
id, LOG_DEBUG);
376 if (!$error && empty($notrigger)) {
378 $result = $this->
call_trigger(
'WAREHOUSE_DELETE', $user);
386 $sql =
"DELETE FROM ".$this->db->prefix().
"product_batch";
387 $sql .=
" WHERE fk_product_stock IN (SELECT rowid FROM ".$this->db->prefix().
"product_stock as ps WHERE ps.fk_entrepot = ".((int) $this->
id).
")";
388 $result = $this->db->query($sql);
391 $this->errors[] = $this->db->lasterror();
396 $elements = array(
'stock_mouvement',
'product_stock');
397 foreach ($elements as $table) {
399 $sql =
"DELETE FROM ".$this->db->prefix().$table;
400 $sql .=
" WHERE fk_entrepot = ".((int) $this->
id);
402 $result = $this->db->query($sql);
405 $this->errors[] = $this->db->lasterror();
417 dol_syslog(get_class($this).
"::delete Error ".$this->error, LOG_ERR);
423 $sql =
"DELETE FROM ".$this->db->prefix().
"entrepot";
424 $sql .=
" WHERE rowid = ".((int) $this->
id);
425 $resql1 = $this->db->query($sql);
428 $this->errors[] = $this->db->lasterror();
429 dol_syslog(get_class($this).
"::delete Error ".$this->db->lasterror(), LOG_ERR);
435 $sql =
"UPDATE ".$this->db->prefix().
"product as p SET stock = (SELECT SUM(ps.reel) FROM ".$this->db->prefix().
"product_stock as ps WHERE ps.fk_product = p.rowid)";
436 $resql2 = $this->db->query($sql);
439 $this->errors[] = $this->db->lasterror();
440 dol_syslog(get_class($this).
"::delete Error ".$this->db->lasterror(), LOG_ERR);
448 $this->db->rollback();
461 public function fetch($id, $ref =
'')
465 dol_syslog(get_class($this).
"::fetch id=".$id.
" ref=".$ref);
469 $this->error =
'ErrorWrongParameters';
470 dol_syslog(get_class($this).
"::fetch ".$this->error);
474 $sql =
"SELECT rowid, entity, fk_parent, fk_project, ref as label, description, statut, lieu, address, zip, town, fk_pays as country_id, phone, fax,";
475 $sql .=
" model_pdf, import_key";
476 $sql .=
" FROM ".$this->db->prefix().
"entrepot";
478 $sql .=
" WHERE rowid = ".((int) $id);
480 $sql .=
" WHERE entity IN (".getEntity(
'stock').
")";
482 $sql .=
" AND ref = '".$this->db->escape($ref).
"'";
486 $result = $this->db->query($sql);
488 if ($this->db->num_rows($result) > 0) {
489 $obj = $this->db->fetch_object($result);
491 $this->
id = $obj->rowid;
492 $this->entity = $obj->entity;
493 $this->fk_parent = $obj->fk_parent;
494 $this->fk_project = $obj->fk_project;
495 $this->
ref = $obj->label;
496 $this->label = $obj->label;
498 $this->
statut = $obj->statut;
499 $this->lieu = $obj->lieu;
500 $this->address = $obj->address;
501 $this->zip = $obj->zip;
502 $this->town = $obj->town;
503 $this->country_id = $obj->country_id;
504 $this->phone = $obj->phone;
505 $this->fax = $obj->fax;
507 $this->model_pdf = $obj->model_pdf;
508 $this->import_key = $obj->import_key;
514 include_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
516 $this->country = $tmp[
'label'];
517 $this->country_code = $tmp[
'code'];
521 $this->error =
"Record Not Found";
525 $this->error = $this->db->error();
539 $sql =
"SELECT e.rowid, e.datec, e.tms as datem, e.fk_user_author";
540 $sql .=
" FROM ".$this->db->prefix().
"entrepot as e";
541 $sql .=
" WHERE e.rowid = ".((int) $id);
543 dol_syslog(get_class($this).
"::info", LOG_DEBUG);
544 $result = $this->db->query($sql);
546 if ($this->db->num_rows($result)) {
547 $obj = $this->db->fetch_object($result);
549 $this->
id = $obj->rowid;
551 $this->user_creation_id = $obj->fk_user_author;
552 $this->date_creation = $this->db->jdate($obj->datec);
553 $this->date_modification = empty($obj->datem) ?
'' : $this->db->jdate($obj->datem);
556 $this->db->free($result);
575 $sql =
"SELECT rowid, ref as label";
576 $sql .=
" FROM ".$this->db->prefix().
"entrepot";
577 $sql .=
" WHERE entity IN (".getEntity(
'stock').
")";
578 $sql .=
" AND statut = ".((int) $status);
580 $result = $this->db->query($sql);
582 $num = $this->db->num_rows($result);
585 $row = $this->db->fetch_row($result);
586 $liste[$row[0]] = $row[1];
589 $this->db->free($result);
605 $sql =
"SELECT count(distinct p.rowid) as nb";
606 $sql .=
" FROM ".$this->db->prefix().
"product_stock as ps";
607 $sql .=
", ".$this->db->prefix().
"product as p";
608 $sql .=
" WHERE ps.fk_entrepot = ".((int) $this->
id);
609 $sql .=
" AND ps.fk_product = p.rowid";
612 $result = $this->db->query($sql);
614 $obj = $this->db->fetch_object($result);
615 $ret[
'nb'] = $obj->nb;
616 $this->db->free($result);
618 $this->error = $this->db->lasterror();
638 $separatedPMP =
false;
639 if (!empty($conf->global->MULTICOMPANY_PRODUCT_SHARING_ENABLED) && !empty($conf->global->MULTICOMPANY_PMP_PER_ENTITY_ENABLED)) {
640 $separatedPMP =
true;
644 $sql =
"SELECT sum(ps.reel) as nb, sum(ps.reel * pa.pmp) as value";
646 $sql =
"SELECT sum(ps.reel) as nb, sum(ps.reel * p.pmp) as value";
648 $sql .=
" FROM ".$this->db->prefix().
"product_stock as ps";
649 $sql .=
", ".$this->db->prefix().
"product as p";
651 $sql .=
", ".$this->db->prefix().
"product_perentity as pa";
653 $sql .=
" WHERE ps.fk_entrepot = ".((int) $this->
id);
655 $sql .=
" AND pa.fk_product = p.rowid AND pa.entity = ". (int) $conf->entity;
657 $sql .=
" AND ps.fk_product = p.rowid";
659 $result = $this->db->query($sql);
661 $obj = $this->db->fetch_object($result);
662 $ret[
'nb'] = $obj->nb;
663 $ret[
'value'] = $obj->value;
664 $this->db->free($result);
666 $this->error = $this->db->lasterror();
697 $statusType =
'status5';
699 $statusType =
'status4';
702 $langs->load(
'stocks');
703 $label = $langs->transnoentitiesnoconv($this->statuts[$status]);
704 $labelshort = $langs->transnoentitiesnoconv($this->statuts[$status]);
706 return dolGetStatus($label, $labelshort,
'', $statusType, $mode);
718 global $conf, $langs, $user;
720 $langs->load(
'stocks');
724 $option = $params[
'option'] ??
'';
725 $nofetch = !empty($params[
'nofetch']);
727 if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
728 return [
'optimize' => $langs->trans(
"Warehouse")];
730 $datas[
'picto'] =
img_picto(
'', $this->picto).
' <u class="paddingrightonly">'.$langs->trans(
"Warehouse").
'</u>';
731 if (isset($this->
statut)) {
732 $datas[
'picto'] .=
' '.$this->getLibStatut(5);
734 $datas[
'ref'] =
'<br><b>'.$langs->trans(
'Ref').
':</b> '.(empty($this->
ref) ? $this->label : $this->ref);
735 if (!empty($this->lieu)) {
736 $datas[
'locationsummary'] =
'<br><b>'.$langs->trans(
'LocationSummary').
':</b> '.$this->lieu;
739 if (!$nofetch && isModEnabled(
'categorie')) {
740 require_once DOL_DOCUMENT_ROOT .
'/categories/class/categorie.class.php';
741 $form =
new Form($this->db);
742 $datas[
'categories_warehouse'] =
'<br>' . $form->showCategories($this->
id, Categorie::TYPE_WAREHOUSE, 1, 1);
759 public function getNomUrl($withpicto = 0, $option =
'', $showfullpath = 0, $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
761 global $conf, $langs, $hookmanager;
762 $langs->load(
"stocks");
764 if (!empty($conf->dol_no_mouse_hover)) {
768 if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpicto) {
775 'objecttype' => $this->element,
779 $classfortooltip =
'classfortooltip';
782 $classfortooltip =
'classforajaxtooltip';
783 $dataparams =
' data-params="'.dol_escape_htmltag(json_encode($params)).
'"';
784 $label =
'ToComplete';
789 $url = DOL_URL_ROOT.
'/product/stock/card.php?id='.$this->id;
791 if ($option !=
'nolink') {
793 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
794 if ($save_lastsearch_value == -1 && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
795 $add_save_lastsearch_values = 1;
797 if ($add_save_lastsearch_values) {
798 $url .=
'&save_lastsearch_values=1';
803 if (empty($notooltip)) {
804 if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
805 $label = $langs->trans(
"Warehouse");
806 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
808 $linkclose .= ($label ?
' title="'.dol_escape_htmltag($label, 1).
'"' :
' title="tocomplete"');
809 $linkclose .= $dataparams.
' class="'.$classfortooltip.
'"';
812 $linkstart =
'<a href="'.$url.
'"';
813 $linkstart .= $linkclose.
'>';
816 $result .= $linkstart;
818 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'"'), 0, 0, $notooltip ? 0 : 1);
820 if ($withpicto != 2) {
821 $result .= (($showfullpath || !empty($conf->global->STOCK_ALWAYS_SHOW_FULL_ARBO)) ? $this->
get_full_arbo() : $this->label);
826 $hookmanager->initHooks(array(
'warehousedao'));
827 $parameters = array(
'id'=>$this->
id,
'getnomurl' => &$result,
'withpicto' => $withpicto,
'option' => $option,
'showfullpath' => $showfullpath,
'notooltip'=> $notooltip);
828 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
830 $result = $hookmanager->resPrint;
832 $result .= $hookmanager->resPrint;
847 global $user, $langs, $conf, $mysoc;
853 $this->label =
'WAREHOUSE SPECIMEN';
854 $this->
description =
'WAREHOUSE SPECIMEN '.dol_print_date($now,
'dayhourlog');
858 $this->lieu =
'Location test';
859 $this->address =
'21 jump street';
860 $this->zip =
'99999';
861 $this->town =
'MyTown';
862 $this->country_id = 1;
863 $this->country_code =
'FR';
875 global $user, $langs, $conf;
877 $TArbo = array($this->label);
881 $warehousetmp =
new Entrepot($this->db);
883 $parentid = $this->fk_parent;
885 while ($parentid > 0 && $i < $protection) {
886 $sql =
"SELECT fk_parent FROM ".$this->db->prefix().
"entrepot WHERE rowid = ".((int) $parentid);
887 $resql = $this->db->query($sql);
889 $objarbo = $this->db->fetch_object($resql);
891 $warehousetmp->fetch($parentid);
892 $TArbo[] = $warehousetmp->label;
893 $parentid = $objarbo->fk_parent;
904 return implode(
' >> ', array_reverse($TArbo));
920 FROM ".$this->db->prefix().
"entrepot
921 WHERE fk_parent = ".((int) $id);
923 $resql = $this->db->query($sql);
925 while ($res = $this->db->fetch_object($resql)) {
926 $TChildWarehouses[] = $res->rowid;
931 return $TChildWarehouses;
944 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
946 global $conf, $user, $langs;
948 $langs->load(
"stocks");
949 $outputlangs->load(
"products");
952 $modele =
'standard';
954 if ($this->model_pdf) {
955 $modele = $this->model_pdf;
956 } elseif (!empty($conf->global->STOCK_ADDON_PDF)) {
957 $modele = $conf->global->STOCK_ADDON_PDF;
961 $modelpath =
"core/modules/stock/doc/";
963 return $this->
commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
978 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
979 return parent::setCategoriesCommon($categories, Categorie::TYPE_WAREHOUSE);
991 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
993 $return =
'<div class="box-flex-item box-flex-grow-zero">';
994 $return .=
'<div class="info-box info-box-sm">';
995 $return .=
'<div class="info-box-icon bg-infobox-action" >';
998 $return .=
'<div class="info-box-content" >';
999 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl() : $this->ref).
'</span>';
1000 if ($selected >= 0) {
1001 $return .=
'<input id="cb'.$this->id.
'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1003 if (property_exists($this,
'lieu') && (!empty($this->lieu))) {
1004 $return .=
'<br><span class="info-box-label opacitymedium">'.$this->lieu.
'</span>';
1006 if (property_exists($this,
'sellvalue') && $this->sellvalue != 0) {
1007 $return .=
'<br><span class="info-box-label amount">'.price($this->sellvalue).
'</span>';
1009 if (method_exists($this,
'getLibStatut')) {
1010 $return .=
'<br><div class="info-box-status margintoponly">'.$this->getLibStatut(3).
'</div>';
1012 $return .=
'</div>';
1013 $return .=
'</div>';
1014 $return .=
'</div>';
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...
commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams=null)
Common function for all objects extending CommonObject for generating documents.
deleteExtraFields()
Delete all extra fields values for the current object.
insertExtraFields($trigger='', $userused=null)
Add/Update all extra fields values for the current object.
call_trigger($triggerName, $user)
Call trigger based on this instance.
Class to manage warehouses.
const STATUS_OPEN_INTERNAL
Warehouse open and only operations for stock transfers/corrections allowed (not for customer shipping...
create($user, $notrigger=false)
Creation d'un entrepot en base.
nb_different_products()
Return number of unique different product into a warehouse.
fetch($id, $ref='')
Load warehouse data.
get_children_warehouses($id, &$TChildWarehouses)
Return array of children warehouses ids from $id warehouse (recursive function)
getLibStatut($mode=0)
Return label of status of object.
LibStatut($status, $mode=0)
Return label of a given status.
const STATUS_OPENEXT_ALL
Warehouse open and any operations are allowed, but warehouse is not included into calculation of stoc...
generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
Create object on disk.
getNomUrl($withpicto=0, $option='', $showfullpath=0, $notooltip=0, $morecss='', $save_lastsearch_value=-1)
Return clickable name (possibility with the pictogram)
setCategories($categories)
Sets object to supplied categories.
initAsSpecimen()
Initialise an instance with random values.
update($id, $user, $notrigger=false)
Update properties of a warehouse.
info($id)
Load warehouse info data.
nb_products()
Return stock and value of warehosue.
const STATUS_OPEN_ALL
Warehouse open and any operations are allowed (customer shipping, supplier dispatch,...
getTooltipContentArray($params)
getTooltipContentArray
list_array($status=1)
Return list of all warehouses.
get_full_arbo()
Return full path to current warehouse.
__construct($db)
Constructor.
getKanbanView($option='', $arraydata=null)
Return clicable link of object (with eventually picto)
const STATUS_CLOSED
Warehouse closed, inactive.
print $langs trans("Ref").' m m m statut
getCountry($searchkey, $withcode='', $dbtouse=0, $outputlangs='', $entconv=1, $searchlabel='')
Return country label, code or id from an id, code or label.
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.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.