30require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
41 public $element =
'stock';
46 public $table_element =
'entrepot';
51 public $picto =
'stock';
118 public $warehouse_usage;
163 public $fields = array(
164 'rowid' => array(
'type' =>
'integer',
'label' =>
'ID',
'enabled' => 1,
'visible' => 0,
'notnull' => 1,
'position' => 10),
165 'entity' => array(
'type' =>
'integer',
'label' =>
'Entity',
'enabled' => 1,
'visible' => 0,
'default' =>
'1',
'notnull' => 1,
'index' => 1,
'position' => 15),
166 'ref' => array(
'type' =>
'varchar(255)',
'label' =>
'Ref',
'enabled' => 1,
'visible' => 1,
'showoncombobox' => 1,
'position' => 25,
'searchall' => 1),
167 'description' => array(
'type' =>
'text',
'label' =>
'Description',
'enabled' => 1,
'visible' => -2,
'position' => 35,
'searchall' => 1),
168 'lieu' => array(
'type' =>
'varchar(64)',
'label' =>
'LocationSummary',
'enabled' => 1,
'visible' => 1,
'position' => 40,
'showoncombobox' => 2,
'searchall' => 1),
169 '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),
170 '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),
171 'address' => array(
'type' =>
'varchar(255)',
'label' =>
'Address',
'enabled' => 1,
'visible' => -2,
'position' => 45,
'searchall' => 1),
172 'zip' => array(
'type' =>
'varchar(10)',
'label' =>
'Zip',
'enabled' => 1,
'visible' => -2,
'position' => 50,
'searchall' => 1),
173 'town' => array(
'type' =>
'varchar(50)',
'label' =>
'Town',
'enabled' => 1,
'visible' => -2,
'position' => 55,
'searchall' => 1),
174 'fk_departement' => array(
'type' =>
'integer',
'label' =>
'State',
'enabled' => 1,
'visible' => 0,
'position' => 60),
175 'fk_pays' => array(
'type' =>
'integer:Ccountry:core/class/ccountry.class.php',
'label' =>
'Country',
'enabled' => 1,
'visible' => -1,
'position' => 65),
176 'phone' => array(
'type' =>
'varchar(20)',
'label' =>
'Phone',
'enabled' => 1,
'visible' => -2,
'position' => 70,
'searchall' => 1),
177 'fax' => array(
'type' =>
'varchar(20)',
'label' =>
'Fax',
'enabled' => 1,
'visible' => -2,
'position' => 75,
'searchall' => 1),
179 'datec' => array(
'type' =>
'datetime',
'label' =>
'DateCreation',
'enabled' => 1,
'visible' => -2,
'position' => 300),
180 'tms' => array(
'type' =>
'timestamp',
'label' =>
'DateModification',
'enabled' => 1,
'visible' => -2,
'notnull' => 1,
'position' => 301),
181 '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')),
184 'statut' => array(
'type' =>
'tinyint(4)',
'label' =>
'Status',
'enabled' => 1,
'visible' => 1,
'position' => 500,
'css' =>
'minwidth50'),
227 $this->ismultientitymanaged = 1;
245 public function create($user, $notrigger = 0)
251 $this->label = trim($this->label);
254 if ($this->label ==
'') {
255 $this->error =
"ErrorFieldRequired";
263 $sql =
"INSERT INTO ".$this->db->prefix().
"entrepot (ref, entity, datec, fk_user_author, fk_parent, fk_project)";
264 $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").
")";
266 dol_syslog(get_class($this).
"::create", LOG_DEBUG);
267 $result = $this->db->query($sql);
269 $id = $this->db->last_insert_id($this->db->prefix().
"entrepot");
274 $result = $this->
update($id, $user);
288 if (!$error && !$notrigger) {
290 $result = $this->
call_trigger(
'WAREHOUSE_CREATE', $user);
301 dol_syslog(get_class($this).
"::create return -3");
302 $this->db->rollback();
306 $this->error =
"Failed to get insert id";
307 dol_syslog(get_class($this).
"::create return -2");
311 $this->error = $this->db->error();
312 dol_syslog(get_class($this).
"::create Error ".$this->db->error());
313 $this->db->rollback();
326 public function update($id, $user, $notrigger = 0)
335 if (!empty($this->fk_parent)) {
336 $TChildWarehouses = array($id);
338 if (in_array($this->fk_parent, $TChildWarehouses)) {
339 $this->error =
'ErrorCannotAddThisParentWarehouse';
344 $this->label = trim($this->label);
348 $this->lieu = trim($this->lieu);
351 $this->zip = trim($this->zip);
352 $this->town = trim($this->town);
353 $this->country_id = ($this->country_id > 0 ? $this->country_id : 0);
355 $sql =
"UPDATE ".$this->db->prefix().
"entrepot";
356 $sql .=
" SET ref = '".$this->db->escape($this->label).
"'";
357 $sql .=
", fk_parent = ".(($this->fk_parent > 0) ? $this->fk_parent :
"NULL");
358 $sql .=
", fk_project = ".(($this->fk_project > 0) ? $this->fk_project :
"NULL");
359 $sql .=
", description = '".$this->db->escape($this->
description).
"'";
360 $sql .=
", statut = ".((int) $this->statut);
361 $sql .=
", lieu = '".$this->db->escape($this->lieu).
"'";
362 $sql .=
", address = '".$this->db->escape($this->
address).
"'";
363 $sql .=
", zip = '".$this->db->escape($this->zip).
"'";
364 $sql .=
", town = '".$this->db->escape($this->town).
"'";
365 $sql .=
", fk_pays = ".((int) $this->country_id);
366 $sql .=
", phone = '".$this->db->escape($this->phone).
"'";
367 $sql .=
", fax = '".$this->db->escape($this->fax).
"'";
368 $sql .=
" WHERE rowid = ".((int) $id);
372 dol_syslog(get_class($this).
"::update", LOG_DEBUG);
373 $resql = $this->db->query($sql);
377 $this->errors[] =
"Error ".$this->db->lasterror();
387 if (!$error && !$notrigger) {
389 $result = $this->
call_trigger(
'WAREHOUSE_MODIFY', $user);
400 $this->db->rollback();
401 $this->error = $this->db->lasterror();
414 public function delete($user, $notrigger = 0)
420 dol_syslog(get_class($this).
"::delete id=".$this->
id, LOG_DEBUG);
424 if (!$error && empty($notrigger)) {
426 $result = $this->
call_trigger(
'WAREHOUSE_DELETE', $user);
434 $sql =
"DELETE FROM ".$this->db->prefix().
"product_batch";
435 $sql .=
" WHERE fk_product_stock IN (SELECT rowid FROM ".$this->db->prefix().
"product_stock as ps WHERE ps.fk_entrepot = ".((int) $this->
id).
")";
436 $result = $this->db->query($sql);
439 $this->errors[] = $this->db->lasterror();
444 $elements = array(
'stock_mouvement',
'product_stock');
445 foreach ($elements as $table) {
447 $sql =
"DELETE FROM ".$this->db->prefix().$table;
448 $sql .=
" WHERE fk_entrepot = ".((int) $this->
id);
450 $result = $this->db->query($sql);
453 $this->errors[] = $this->db->lasterror();
464 dol_syslog(get_class($this).
"::delete Error ".$this->error, LOG_ERR);
469 $sql =
"DELETE FROM ".$this->db->prefix().
"entrepot";
470 $sql .=
" WHERE rowid = ".((int) $this->
id);
471 $resql1 = $this->db->query($sql);
474 $this->errors[] = $this->db->lasterror();
475 dol_syslog(get_class($this).
"::delete Error ".$this->db->lasterror(), LOG_ERR);
481 $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)";
482 $resql2 = $this->db->query($sql);
485 $this->errors[] = $this->db->lasterror();
486 dol_syslog(get_class($this).
"::delete Error ".$this->db->lasterror(), LOG_ERR);
494 $this->db->rollback();
507 public function fetch($id, $ref =
'')
511 dol_syslog(get_class($this).
"::fetch id=".$id.
" ref=".$ref);
515 $this->error =
'ErrorWrongParameters';
516 dol_syslog(get_class($this).
"::fetch ".$this->error);
520 $sql =
"SELECT rowid, entity, fk_parent, fk_project, ref as label, description, statut, lieu, address, zip, town, fk_pays as country_id, phone, fax,";
521 $sql .=
" model_pdf, import_key";
522 $sql .=
" FROM ".$this->db->prefix().
"entrepot";
524 $sql .=
" WHERE rowid = ".((int) $id);
526 $sql .=
" WHERE entity IN (".getEntity(
'stock').
")";
528 $sql .=
" AND ref = '".$this->db->escape($ref).
"'";
532 $result = $this->db->query($sql);
534 if ($this->db->num_rows($result) > 0) {
535 $obj = $this->db->fetch_object($result);
537 $this->
id = $obj->rowid;
538 $this->entity = $obj->entity;
539 $this->fk_parent = $obj->fk_parent;
540 $this->fk_project = $obj->fk_project;
541 $this->
ref = $obj->label;
542 $this->label = $obj->label;
544 $this->statut = $obj->statut;
545 $this->lieu = $obj->lieu;
546 $this->
address = $obj->address;
547 $this->zip = $obj->zip;
548 $this->town = $obj->town;
549 $this->country_id = $obj->country_id;
550 $this->phone = $obj->phone;
551 $this->fax = $obj->fax;
553 $this->model_pdf = $obj->model_pdf;
554 $this->import_key = $obj->import_key;
560 include_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
562 $this->country = $tmp[
'label'];
563 $this->country_code = $tmp[
'code'];
567 $this->error =
"Record Not Found";
571 $this->error = $this->db->error();
585 $sql =
"SELECT e.rowid, e.datec, e.tms as datem, e.fk_user_author";
586 $sql .=
" FROM ".$this->db->prefix().
"entrepot as e";
587 $sql .=
" WHERE e.rowid = ".((int) $id);
589 dol_syslog(get_class($this).
"::info", LOG_DEBUG);
590 $result = $this->db->query($sql);
592 if ($this->db->num_rows($result)) {
593 $obj = $this->db->fetch_object($result);
595 $this->
id = $obj->rowid;
597 $this->user_creation_id = $obj->fk_user_author;
598 $this->date_creation = $this->db->jdate($obj->datec);
599 $this->date_modification = empty($obj->datem) ?
'' : $this->db->jdate($obj->datem);
602 $this->db->free($result);
621 $sql =
"SELECT rowid, ref as label";
622 $sql .=
" FROM ".$this->db->prefix().
"entrepot";
623 $sql .=
" WHERE entity IN (".getEntity(
'stock').
")";
624 $sql .=
" AND statut = ".((int) $status);
626 $result = $this->db->query($sql);
628 $num = $this->db->num_rows($result);
631 $row = $this->db->fetch_row($result);
632 $liste[$row[0]] = $row[1];
635 $this->db->free($result);
651 $sql =
"SELECT count(distinct p.rowid) as nb";
652 $sql .=
" FROM ".$this->db->prefix().
"product_stock as ps";
653 $sql .=
", ".$this->db->prefix().
"product as p";
654 $sql .=
" WHERE ps.fk_entrepot = ".((int) $this->
id);
655 $sql .=
" AND ps.fk_product = p.rowid";
658 $result = $this->db->query($sql);
660 $obj = $this->db->fetch_object($result);
661 $ret[
'nb'] = $obj->nb;
662 $this->db->free($result);
664 $this->error = $this->db->lasterror();
684 $separatedPMP =
false;
686 $separatedPMP =
true;
690 $sql =
"SELECT sum(ps.reel) as nb, sum(ps.reel * pa.pmp) as value";
692 $sql =
"SELECT sum(ps.reel) as nb, sum(ps.reel * p.pmp) as value";
694 $sql .=
" FROM ".$this->db->prefix().
"product_stock as ps";
695 $sql .=
", ".$this->db->prefix().
"product as p";
697 $sql .=
", ".$this->db->prefix().
"product_perentity as pa";
699 $sql .=
" WHERE ps.fk_entrepot = ".((int) $this->
id);
701 $sql .=
" AND pa.fk_product = p.rowid AND pa.entity = ". (int)
$conf->entity;
703 $sql .=
" AND ps.fk_product = p.rowid";
705 $result = $this->db->query($sql);
707 $obj = $this->db->fetch_object($result);
708 $ret[
'nb'] = $obj->nb;
709 $ret[
'value'] = $obj->value;
710 $this->db->free($result);
712 $this->error = $this->db->lasterror();
727 return $this->
LibStatut($this->statut, $mode);
743 $statusType =
'status5';
745 $statusType =
'status4';
748 $langs->load(
'stocks');
749 $label = $langs->transnoentitiesnoconv($this->labelStatus[$status]);
750 $labelshort = $langs->transnoentitiesnoconv($this->labelStatus[$status]);
752 return dolGetStatus($label, $labelshort,
'', $statusType, $mode);
763 global
$conf, $langs, $user;
765 $langs->load(
'stocks');
769 $option = $params[
'option'] ??
'';
770 $nofetch = !empty($params[
'nofetch']);
773 return [
'optimize' => $langs->trans(
"Warehouse")];
775 $datas[
'picto'] =
img_picto(
'', $this->picto).
' <u class="paddingrightonly">'.$langs->trans(
"Warehouse").
'</u>';
776 if (!empty($this->statut)) {
777 $datas[
'picto'] .=
' '.$this->getLibStatut(5);
779 $datas[
'ref'] =
'<br><b>'.$langs->trans(
'Ref').
':</b> '.(empty($this->
ref) ? $this->label : $this->ref);
780 if (!empty($this->lieu)) {
781 $datas[
'locationsummary'] =
'<br><b>'.$langs->trans(
'LocationSummary').
':</b> '.$this->lieu;
784 if (!$nofetch && isModEnabled(
'category')) {
785 require_once DOL_DOCUMENT_ROOT .
'/categories/class/categorie.class.php';
786 $form =
new Form($this->db);
787 $datas[
'categories_warehouse'] =
'<br>' . $form->showCategories($this->
id, Categorie::TYPE_WAREHOUSE, 1, 1);
804 public function getNomUrl($withpicto = 0, $option =
'', $showfullpath = 0, $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
806 global
$conf, $langs, $hookmanager;
807 $langs->load(
"stocks");
809 if (!empty(
$conf->dol_no_mouse_hover)) {
820 'objecttype' => $this->element,
824 $classfortooltip =
'classfortooltip';
827 $classfortooltip =
'classforajaxtooltip';
828 $dataparams =
' data-params="'.dol_escape_htmltag(json_encode($params)).
'"';
829 $label =
'ToComplete';
834 $url = DOL_URL_ROOT.
'/product/stock/card.php?id='.$this->id;
836 if ($option !=
'nolink') {
838 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
839 if ($save_lastsearch_value == -1 && isset($_SERVER[
"PHP_SELF"]) && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
840 $add_save_lastsearch_values = 1;
842 if ($add_save_lastsearch_values) {
843 $url .=
'&save_lastsearch_values=1';
848 if (empty($notooltip)) {
850 $label = $langs->trans(
"Warehouse");
851 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
853 $linkclose .= ($label ?
' title="'.dol_escape_htmltag($label, 1).
'"' :
' title="tocomplete"');
854 $linkclose .= $dataparams.
' class="'.$classfortooltip.
'"';
857 $linkstart =
'<a href="'.$url.
'"';
858 $linkstart .= $linkclose.
'>';
861 $result .= $linkstart;
863 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'"'), 0, 0, $notooltip ? 0 : 1);
865 if ($withpicto != 2) {
871 $hookmanager->initHooks(array(
'warehousedao'));
872 $parameters = array(
'id' => $this->
id,
'getnomurl' => &$result,
'withpicto' => $withpicto,
'option' => $option,
'showfullpath' => $showfullpath,
'notooltip' => $notooltip);
873 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
875 $result = $hookmanager->resPrint;
877 $result .= $hookmanager->resPrint;
892 global $user, $langs,
$conf, $mysoc;
898 $this->label =
'WAREHOUSE SPECIMEN';
899 $this->
description =
'WAREHOUSE SPECIMEN '.dol_print_date($now,
'dayhourlog');
903 $this->lieu =
'Location test';
904 $this->
address =
'21 jump street';
905 $this->zip =
'99999';
906 $this->town =
'MyTown';
907 $this->country_id = 1;
908 $this->country_code =
'FR';
922 $TArbo = array($this->label);
926 $warehousetmp =
new Entrepot($this->db);
928 $parentid = $this->fk_parent;
930 while ($parentid > 0 && $i < $protection) {
931 $sql =
"SELECT fk_parent FROM ".$this->db->prefix().
"entrepot";
932 $sql .=
" WHERE rowid = ".((int) $parentid);
934 $resql = $this->db->query($sql);
936 $objarbo = $this->db->fetch_object($resql);
938 $warehousetmp->fetch($parentid);
939 $TArbo[] = $warehousetmp->label;
940 $parentid = $objarbo->fk_parent;
951 return implode(
' >> ', array_reverse($TArbo));
967 FROM ".$this->db->prefix().
"entrepot
968 WHERE fk_parent = ".((int) $id);
970 $resql = $this->db->query($sql);
972 while ($res = $this->db->fetch_object($resql)) {
973 $TChildWarehouses[] = $res->rowid;
978 return $TChildWarehouses;
991 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
993 global
$conf, $user, $langs;
995 $langs->load(
"stocks");
996 $outputlangs->load(
"products");
999 $modele =
'standard';
1001 if ($this->model_pdf) {
1002 $modele = $this->model_pdf;
1008 $modelpath =
"core/modules/stock/doc/";
1010 return $this->
commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
1025 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
1026 return parent::setCategoriesCommon($categories, Categorie::TYPE_WAREHOUSE);
1038 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
1040 $return =
'<div class="box-flex-item box-flex-grow-zero">';
1041 $return .=
'<div class="info-box info-box-sm">';
1042 $return .=
'<div class="info-box-icon bg-infobox-action" >';
1044 $return .=
'</div>';
1045 $return .=
'<div class="info-box-content" >';
1046 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl() : $this->ref).
'</span>';
1047 if ($selected >= 0) {
1048 $return .=
'<input id="cb'.$this->id.
'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1050 if (property_exists($this,
'lieu') && (!empty($this->lieu))) {
1051 $return .=
'<br><span class="info-box-label opacitymedium">'.$this->lieu.
'</span>';
1053 if (property_exists($this,
'sellvalue') && $this->sellvalue != 0) {
1054 $return .=
'<br><span class="info-box-label amount">'.price($this->sellvalue).
'</span>';
1056 if (method_exists($this,
'getLibStatut')) {
1057 $return .=
'<br><div class="info-box-status">'.$this->getLibStatut(3).
'</div>';
1059 $return .=
'</div>';
1060 $return .=
'</div>';
1061 $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 warehouse.
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.
dolGetStatus($statusLabel='', $statusLabelShort='', $html='', $statusType='status0', $displayMode=0, $url='', $params=array())
Output the badge of a status.
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
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...