30require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
41 public $element =
'stock';
46 public $table_element =
'entrepot';
51 public $picto =
'stock';
115 public $warehouse_usage;
160 public $fields = array(
161 'rowid' => array(
'type' =>
'integer',
'label' =>
'ID',
'enabled' => 1,
'visible' => 0,
'notnull' => 1,
'position' => 10),
162 'entity' => array(
'type' =>
'integer',
'label' =>
'Entity',
'enabled' => 1,
'visible' => 0,
'default' =>
'1',
'notnull' => 1,
'index' => 1,
'position' => 15),
163 'ref' => array(
'type' =>
'varchar(255)',
'label' =>
'Ref',
'enabled' => 1,
'visible' => 1,
'showoncombobox' => 1,
'position' => 25,
'searchall' => 1),
164 'description' => array(
'type' =>
'text',
'label' =>
'Description',
'enabled' => 1,
'visible' => -2,
'position' => 35,
'searchall' => 1),
165 'lieu' => array(
'type' =>
'varchar(64)',
'label' =>
'LocationSummary',
'enabled' => 1,
'visible' => 1,
'position' => 40,
'showoncombobox' => 2,
'searchall' => 1),
166 '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),
167 'fk_project' => array(
'type' =>
'integer:Project:projet/class/project.class.php:1:(fk_statut:=:1)',
'label' =>
'Project',
'enabled' =>
'$conf->project->enabled',
'visible' => -1,
'position' => 42),
168 'address' => array(
'type' =>
'varchar(255)',
'label' =>
'Address',
'enabled' => 1,
'visible' => -2,
'position' => 45,
'searchall' => 1),
169 'zip' => array(
'type' =>
'varchar(10)',
'label' =>
'Zip',
'enabled' => 1,
'visible' => -2,
'position' => 50,
'searchall' => 1),
170 'town' => array(
'type' =>
'varchar(50)',
'label' =>
'Town',
'enabled' => 1,
'visible' => -2,
'position' => 55,
'searchall' => 1),
171 'fk_departement' => array(
'type' =>
'integer',
'label' =>
'State',
'enabled' => 1,
'visible' => 0,
'position' => 60),
172 'fk_pays' => array(
'type' =>
'integer:Ccountry:core/class/ccountry.class.php',
'label' =>
'Country',
'enabled' => 1,
'visible' => -1,
'position' => 65),
173 'phone' => array(
'type' =>
'varchar(20)',
'label' =>
'Phone',
'enabled' => 1,
'visible' => -2,
'position' => 70,
'searchall' => 1),
174 'fax' => array(
'type' =>
'varchar(20)',
'label' =>
'Fax',
'enabled' => 1,
'visible' => -2,
'position' => 75,
'searchall' => 1),
176 'datec' => array(
'type' =>
'datetime',
'label' =>
'DateCreation',
'enabled' => 1,
'visible' => -2,
'position' => 300),
177 'tms' => array(
'type' =>
'timestamp',
'label' =>
'DateModification',
'enabled' => 1,
'visible' => -2,
'notnull' => 1,
'position' => 301),
178 'warehouse_usage' => array(
'type' =>
'integer',
'label' =>
'WarehouseUsage',
'enabled' =>
'getDolGlobalInt("STOCK_USE_WAREHOUSE_USAGE")',
'visible' => 1,
'position' => 400,
'default' => 1,
'arrayofkeyval' => array(1 =>
'InternalWarehouse', 2 =>
'ExternalWarehouse')),
181 'statut' => array(
'type' =>
'tinyint(4)',
'label' =>
'Status',
'enabled' => 1,
'visible' => 1,
'position' => 500,
'css' =>
'minwidth50'),
224 $this->ismultientitymanaged = 1;
242 public function create($user, $notrigger = 0)
248 $this->label = trim($this->label);
251 if ($this->label ==
'') {
252 $this->error =
"ErrorFieldRequired";
260 $sql =
"INSERT INTO ".$this->db->prefix().
"entrepot (ref, entity, datec, fk_user_author, fk_parent, fk_project)";
261 $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").
")";
263 dol_syslog(get_class($this).
"::create", LOG_DEBUG);
264 $result = $this->db->query($sql);
266 $id = $this->db->last_insert_id($this->db->prefix().
"entrepot");
271 $result = $this->
update($id, $user);
285 if (!$error && !$notrigger) {
287 $result = $this->
call_trigger(
'WAREHOUSE_CREATE', $user);
298 dol_syslog(get_class($this).
"::create return -3");
299 $this->db->rollback();
303 $this->error =
"Failed to get insert id";
304 dol_syslog(get_class($this).
"::create return -2");
308 $this->error = $this->db->error();
309 dol_syslog(get_class($this).
"::create Error ".$this->db->error());
310 $this->db->rollback();
323 public function update($id, $user, $notrigger = 0)
332 if (!empty($this->fk_parent)) {
333 $TChildWarehouses = array($id);
335 if (in_array($this->fk_parent, $TChildWarehouses)) {
336 $this->error =
'ErrorCannotAddThisParentWarehouse';
341 $this->label = trim($this->label);
345 $this->lieu = trim($this->lieu);
348 $this->zip = trim($this->zip);
349 $this->town = trim($this->town);
350 $this->country_id = ($this->country_id > 0 ? $this->country_id : 0);
352 $sql =
"UPDATE ".$this->db->prefix().
"entrepot";
353 $sql .=
" SET ref = '".$this->db->escape($this->label).
"'";
354 $sql .=
", fk_parent = ".(($this->fk_parent > 0) ? $this->fk_parent :
"NULL");
355 $sql .=
", fk_project = ".(($this->fk_project > 0) ? $this->fk_project :
"NULL");
356 $sql .=
", description = '".$this->db->escape($this->
description).
"'";
357 $sql .=
", statut = ".((int) $this->statut);
358 $sql .=
", lieu = '".$this->db->escape($this->lieu).
"'";
359 $sql .=
", address = '".$this->db->escape($this->
address).
"'";
360 $sql .=
", zip = '".$this->db->escape($this->zip).
"'";
361 $sql .=
", town = '".$this->db->escape($this->town).
"'";
362 $sql .=
", fk_pays = ".((int) $this->country_id);
363 $sql .=
", phone = '".$this->db->escape($this->phone).
"'";
364 $sql .=
", fax = '".$this->db->escape($this->fax).
"'";
365 $sql .=
" WHERE rowid = ".((int) $id);
369 dol_syslog(get_class($this).
"::update", LOG_DEBUG);
370 $resql = $this->db->query($sql);
374 $this->errors[] =
"Error ".$this->db->lasterror();
384 if (!$error && !$notrigger) {
386 $result = $this->
call_trigger(
'WAREHOUSE_MODIFY', $user);
397 $this->db->rollback();
398 $this->error = $this->db->lasterror();
411 public function delete($user, $notrigger = 0)
417 dol_syslog(get_class($this).
"::delete id=".$this->
id, LOG_DEBUG);
421 if (!$error && empty($notrigger)) {
423 $result = $this->
call_trigger(
'WAREHOUSE_DELETE', $user);
431 $sql =
"DELETE FROM ".$this->db->prefix().
"product_batch";
432 $sql .=
" WHERE fk_product_stock IN (SELECT rowid FROM ".$this->db->prefix().
"product_stock as ps WHERE ps.fk_entrepot = ".((int) $this->
id).
")";
433 $result = $this->db->query($sql);
436 $this->errors[] = $this->db->lasterror();
441 $elements = array(
'stock_mouvement',
'product_stock');
442 foreach ($elements as $table) {
444 $sql =
"DELETE FROM ".$this->db->prefix().$table;
445 $sql .=
" WHERE fk_entrepot = ".((int) $this->
id);
447 $result = $this->db->query($sql);
450 $this->errors[] = $this->db->lasterror();
461 dol_syslog(get_class($this).
"::delete Error ".$this->error, LOG_ERR);
466 $sql =
"DELETE FROM ".$this->db->prefix().
"entrepot";
467 $sql .=
" WHERE rowid = ".((int) $this->
id);
468 $resql1 = $this->db->query($sql);
471 $this->errors[] = $this->db->lasterror();
472 dol_syslog(get_class($this).
"::delete Error ".$this->db->lasterror(), LOG_ERR);
478 $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)";
479 $resql2 = $this->db->query($sql);
482 $this->errors[] = $this->db->lasterror();
483 dol_syslog(get_class($this).
"::delete Error ".$this->db->lasterror(), LOG_ERR);
491 $this->db->rollback();
504 public function fetch($id, $ref =
'')
508 dol_syslog(get_class($this).
"::fetch id=".$id.
" ref=".$ref);
512 $this->error =
'ErrorWrongParameters';
513 dol_syslog(get_class($this).
"::fetch ".$this->error);
517 $sql =
"SELECT rowid, entity, fk_parent, fk_project, ref as label, description, statut, lieu, address, zip, town, fk_pays as country_id, phone, fax,";
518 $sql .=
" model_pdf, import_key";
519 $sql .=
" FROM ".$this->db->prefix().
"entrepot";
521 $sql .=
" WHERE rowid = ".((int) $id);
523 $sql .=
" WHERE entity IN (".getEntity(
'stock').
")";
525 $sql .=
" AND ref = '".$this->db->escape($ref).
"'";
529 $result = $this->db->query($sql);
531 if ($this->db->num_rows($result) > 0) {
532 $obj = $this->db->fetch_object($result);
534 $this->
id = $obj->rowid;
535 $this->entity = $obj->entity;
536 $this->fk_parent = $obj->fk_parent;
537 $this->fk_project = $obj->fk_project;
538 $this->
ref = $obj->label;
539 $this->label = $obj->label;
541 $this->statut = $obj->statut;
542 $this->lieu = $obj->lieu;
543 $this->
address = $obj->address;
544 $this->zip = $obj->zip;
545 $this->town = $obj->town;
546 $this->country_id = $obj->country_id;
547 $this->phone = $obj->phone;
548 $this->fax = $obj->fax;
550 $this->model_pdf = $obj->model_pdf;
551 $this->import_key = $obj->import_key;
557 include_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
559 $this->country = $tmp[
'label'];
560 $this->country_code = $tmp[
'code'];
564 $this->error =
"Record Not Found";
568 $this->error = $this->db->error();
582 $sql =
"SELECT e.rowid, e.datec, e.tms as datem, e.fk_user_author";
583 $sql .=
" FROM ".$this->db->prefix().
"entrepot as e";
584 $sql .=
" WHERE e.rowid = ".((int) $id);
586 dol_syslog(get_class($this).
"::info", LOG_DEBUG);
587 $result = $this->db->query($sql);
589 if ($this->db->num_rows($result)) {
590 $obj = $this->db->fetch_object($result);
592 $this->
id = $obj->rowid;
594 $this->user_creation_id = $obj->fk_user_author;
595 $this->date_creation = $this->db->jdate($obj->datec);
596 $this->date_modification = empty($obj->datem) ?
'' : $this->db->jdate($obj->datem);
599 $this->db->free($result);
618 $sql =
"SELECT rowid, ref as label";
619 $sql .=
" FROM ".$this->db->prefix().
"entrepot";
620 $sql .=
" WHERE entity IN (".getEntity(
'stock').
")";
621 $sql .=
" AND statut = ".((int) $status);
623 $result = $this->db->query($sql);
625 $num = $this->db->num_rows($result);
628 $row = $this->db->fetch_row($result);
629 $liste[$row[0]] = $row[1];
632 $this->db->free($result);
648 $sql =
"SELECT count(distinct p.rowid) as nb";
649 $sql .=
" FROM ".$this->db->prefix().
"product_stock as ps";
650 $sql .=
", ".$this->db->prefix().
"product as p";
651 $sql .=
" WHERE ps.fk_entrepot = ".((int) $this->
id);
652 $sql .=
" AND ps.fk_product = p.rowid";
655 $result = $this->db->query($sql);
657 $obj = $this->db->fetch_object($result);
658 $ret[
'nb'] = $obj->nb;
659 $this->db->free($result);
661 $this->error = $this->db->lasterror();
681 $separatedPMP =
false;
683 $separatedPMP =
true;
687 $sql =
"SELECT sum(ps.reel) as nb, sum(ps.reel * pa.pmp) as value";
689 $sql =
"SELECT sum(ps.reel) as nb, sum(ps.reel * p.pmp) as value";
691 $sql .=
" FROM ".$this->db->prefix().
"product_stock as ps";
692 $sql .=
", ".$this->db->prefix().
"product as p";
694 $sql .=
", ".$this->db->prefix().
"product_perentity as pa";
696 $sql .=
" WHERE ps.fk_entrepot = ".((int) $this->
id);
698 $sql .=
" AND pa.fk_product = p.rowid AND pa.entity = ". (int) $conf->entity;
700 $sql .=
" AND ps.fk_product = p.rowid";
702 $result = $this->db->query($sql);
704 $obj = $this->db->fetch_object($result);
705 $ret[
'nb'] = $obj->nb;
706 $ret[
'value'] = $obj->value;
707 $this->db->free($result);
709 $this->error = $this->db->lasterror();
724 return $this->
LibStatut($this->statut, $mode);
740 $statusType =
'status5';
742 $statusType =
'status4';
745 $langs->load(
'stocks');
746 $label = $langs->transnoentitiesnoconv($this->labelStatus[$status]);
747 $labelshort = $langs->transnoentitiesnoconv($this->labelStatus[$status]);
749 return dolGetStatus($label, $labelshort,
'', $statusType, $mode);
760 global $conf, $langs, $user;
762 $langs->load(
'stocks');
766 $option = $params[
'option'] ??
'';
767 $nofetch = !empty($params[
'nofetch']);
770 return [
'optimize' => $langs->trans(
"Warehouse")];
772 $datas[
'picto'] =
img_picto(
'', $this->picto).
' <u class="paddingrightonly">'.$langs->trans(
"Warehouse").
'</u>';
773 if (isset($this->statut)) {
774 $datas[
'picto'] .=
' '.$this->getLibStatut(5);
776 $datas[
'ref'] =
'<br><b>'.$langs->trans(
'Ref').
':</b> '.(empty($this->
ref) ? $this->label : $this->ref);
777 if (!empty($this->lieu)) {
778 $datas[
'locationsummary'] =
'<br><b>'.$langs->trans(
'LocationSummary').
':</b> '.$this->lieu;
781 if (!$nofetch && isModEnabled(
'category')) {
782 require_once DOL_DOCUMENT_ROOT .
'/categories/class/categorie.class.php';
783 $form =
new Form($this->db);
784 $datas[
'categories_warehouse'] =
'<br>' . $form->showCategories($this->
id, Categorie::TYPE_WAREHOUSE, 1, 1);
801 public function getNomUrl($withpicto = 0, $option =
'', $showfullpath = 0, $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
803 global $conf, $langs, $hookmanager;
804 $langs->load(
"stocks");
806 if (!empty($conf->dol_no_mouse_hover)) {
817 'objecttype' => $this->element,
821 $classfortooltip =
'classfortooltip';
824 $classfortooltip =
'classforajaxtooltip';
825 $dataparams =
' data-params="'.dol_escape_htmltag(json_encode($params)).
'"';
826 $label =
'ToComplete';
831 $url = DOL_URL_ROOT.
'/product/stock/card.php?id='.$this->id;
833 if ($option !=
'nolink') {
835 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
836 if ($save_lastsearch_value == -1 && isset($_SERVER[
"PHP_SELF"]) && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
837 $add_save_lastsearch_values = 1;
839 if ($add_save_lastsearch_values) {
840 $url .=
'&save_lastsearch_values=1';
845 if (empty($notooltip)) {
847 $label = $langs->trans(
"Warehouse");
848 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
850 $linkclose .= ($label ?
' title="'.dol_escape_htmltag($label, 1).
'"' :
' title="tocomplete"');
851 $linkclose .= $dataparams.
' class="'.$classfortooltip.
'"';
854 $linkstart =
'<a href="'.$url.
'"';
855 $linkstart .= $linkclose.
'>';
858 $result .= $linkstart;
860 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'"'), 0, 0, $notooltip ? 0 : 1);
862 if ($withpicto != 2) {
868 $hookmanager->initHooks(array(
'warehousedao'));
869 $parameters = array(
'id' => $this->
id,
'getnomurl' => &$result,
'withpicto' => $withpicto,
'option' => $option,
'showfullpath' => $showfullpath,
'notooltip' => $notooltip);
870 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
872 $result = $hookmanager->resPrint;
874 $result .= $hookmanager->resPrint;
889 global $user, $langs, $conf, $mysoc;
895 $this->label =
'WAREHOUSE SPECIMEN';
896 $this->
description =
'WAREHOUSE SPECIMEN '.dol_print_date($now,
'dayhourlog');
900 $this->lieu =
'Location test';
901 $this->
address =
'21 jump street';
902 $this->zip =
'99999';
903 $this->town =
'MyTown';
904 $this->country_id = 1;
905 $this->country_code =
'FR';
919 $TArbo = array($this->label);
923 $warehousetmp =
new Entrepot($this->db);
925 $parentid = $this->fk_parent;
927 while ($parentid > 0 && $i < $protection) {
928 $sql =
"SELECT fk_parent FROM ".$this->db->prefix().
"entrepot";
929 $sql .=
" WHERE rowid = ".((int) $parentid);
931 $resql = $this->db->query($sql);
933 $objarbo = $this->db->fetch_object($resql);
935 $warehousetmp->fetch($parentid);
936 $TArbo[] = $warehousetmp->label;
937 $parentid = $objarbo->fk_parent;
948 return implode(
' >> ', array_reverse($TArbo));
964 FROM ".$this->db->prefix().
"entrepot
965 WHERE fk_parent = ".((int) $id);
967 $resql = $this->db->query($sql);
969 while ($res = $this->db->fetch_object($resql)) {
970 $TChildWarehouses[] = $res->rowid;
975 return $TChildWarehouses;
988 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
990 global $conf, $user, $langs;
992 $langs->load(
"stocks");
993 $outputlangs->load(
"products");
996 $modele =
'standard';
998 if ($this->model_pdf) {
999 $modele = $this->model_pdf;
1005 $modelpath =
"core/modules/stock/doc/";
1007 return $this->
commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
1022 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
1023 return parent::setCategoriesCommon($categories, Categorie::TYPE_WAREHOUSE);
1035 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
1037 $return =
'<div class="box-flex-item box-flex-grow-zero">';
1038 $return .=
'<div class="info-box info-box-sm">';
1039 $return .=
'<div class="info-box-icon bg-infobox-action" >';
1041 $return .=
'</div>';
1042 $return .=
'<div class="info-box-content" >';
1043 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl() : $this->ref).
'</span>';
1044 if ($selected >= 0) {
1045 $return .=
'<input id="cb'.$this->id.
'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1047 if (property_exists($this,
'lieu') && (!empty($this->lieu))) {
1048 $return .=
'<br><span class="info-box-label opacitymedium">'.$this->lieu.
'</span>';
1050 if (property_exists($this,
'sellvalue') && $this->sellvalue != 0) {
1051 $return .=
'<br><span class="info-box-label amount">'.price($this->sellvalue).
'</span>';
1053 if (method_exists($this,
'getLibStatut')) {
1054 $return .=
'<br><div class="info-box-status">'.$this->getLibStatut(3).
'</div>';
1056 $return .=
'</div>';
1057 $return .=
'</div>';
1058 $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...
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.
generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
Create object on disk.
const USAGE_EXTTERNAL
Warehouse that must be excluded for stock calculation (scrapping stock, virtual warehouses,...
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.
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,...
create($user, $notrigger=0)
Creation d'un entrepot en base.
update($id, $user, $notrigger=0)
Update properties of a warehouse.
getTooltipContentArray($params)
getTooltipContentArray
list_array($status=1)
Return list of all warehouses.
const USAGE_INTERNAL
Warehouse that must be include for stock calculation (default)
get_full_arbo()
Return full path to current warehouse.
__construct($db)
Constructor.
getKanbanView($option='', $arraydata=null)
Return clickable link of object (with eventually picto)
const STATUS_CLOSED
Warehouse closed, inactive.
getCountry($searchkey, $withcode='', $dbtouse=null, $outputlangs=null, $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.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
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_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
div refaddress div address