31require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobjectline.class.php';
45 public $element =
'inventory';
50 public $table_element =
'inventory';
55 public $picto =
'inventory';
57 const STATUS_DRAFT = 0;
58 const STATUS_VALIDATED = 1;
59 const STATUS_RECORDED = 2;
60 const STATUS_CANCELED = 9;
70 const START_MODE_NONE =
'none';
71 const START_MODE_ZERO =
'zero';
103 public $fields = array(
104 'rowid' => array(
'type' =>
'integer',
'label' =>
'TechnicalID',
'visible' => -1,
'enabled' => 1,
'position' => 1,
'notnull' => 1,
'index' => 1,
'comment' =>
'Id',),
105 'ref' => array(
'type' =>
'varchar(64)',
'label' =>
'Ref',
'visible' => 1,
'enabled' => 1,
'position' => 10,
'notnull' => 1,
'index' => 1,
'searchall' => 1,
'comment' =>
'Reference of object',
'css' =>
'maxwidth150'),
106 'entity' => array(
'type' =>
'integer',
'label' =>
'Entity',
'visible' => 0,
'enabled' => 1,
'position' => 20,
'notnull' => 1,
'index' => 1,),
107 'title' => array(
'type' =>
'varchar(255)',
'label' =>
'Label',
'visible' => 1,
'enabled' => 1,
'position' => 25,
'css' =>
'minwidth300',
'csslist' =>
'tdoverflowmax150',
'alwayseditable' => 1),
108 'fk_warehouse' => array(
'type' =>
'integer:Entrepot:product/stock/class/entrepot.class.php',
'label' =>
'Warehouse',
'visible' => 1,
'enabled' => 1,
'position' => 30,
'index' => 1,
'help' =>
'InventoryForASpecificWarehouse',
'picto' =>
'stock',
'css' =>
'minwidth300 maxwidth500 widthcentpercentminusx',
'csslist' =>
'tdoverflowmax150'),
109 'fk_product' => array(
'type' =>
'integer:Product:product/class/product.class.php',
'label' =>
'Product',
'get_name_url_params' =>
'0::0:-1:0::1',
'visible' => 1,
'enabled' => 1,
'position' => 32,
'index' => 1,
'help' =>
'InventoryForASpecificProduct',
'picto' =>
'product',
'css' =>
'minwidth300 maxwidth500 widthcentpercentminusx',
'csslist' =>
'tdoverflowmax150'),
110 'categories_product' => array(
'type' =>
'chkbxlst:categorie:label:rowid::type=0:0:',
'label' =>
'OrProductsWithCategories',
'visible' => 3,
'enabled' => 1,
'position' => 33,
'help' =>
'',
'picto' =>
'category',
'css' =>
'minwidth300 maxwidth500 widthcentpercentminusx'),
111 'date_inventory' => array(
'type' =>
'date',
'label' =>
'DateValue',
'visible' => 1,
'enabled' =>
'getDolGlobalInt("STOCK_INVENTORY_ADD_A_VALUE_DATE")',
'position' => 35,
'csslist' =>
'nowraponall'),
112 'date_creation' => array(
'type' =>
'datetime',
'label' =>
'DateCreation',
'enabled' => 1,
'visible' => -2,
'notnull' => 1,
'position' => 500,
'csslist' =>
'nowraponall'),
113 'tms' => array(
'type' =>
'timestamp',
'label' =>
'DateModification',
'enabled' => 1,
'visible' => -2,
'notnull' => 1,
'position' => 501,
'csslist' =>
'nowraponall'),
114 'date_validation' => array(
'type' =>
'datetime',
'label' =>
'DateValidation',
'visible' => -2,
'enabled' => 1,
'position' => 502,
'csslist' =>
'nowraponall'),
115 'fk_user_creat' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'UserAuthor',
'enabled' => 1,
'visible' => -2,
'notnull' => 1,
'position' => 510,
'foreignkey' =>
'user.rowid',
'csslist' =>
'tdoverflowmax150'),
116 'fk_user_modif' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'UserModif',
'enabled' => 1,
'visible' => -2,
'notnull' => -1,
'position' => 511,
'csslist' =>
'tdoverflowmax150'),
117 'fk_user_valid' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'UserValidation',
'visible' => -2,
'enabled' => 1,
'position' => 512,
'csslist' =>
'tdoverflowmax150'),
118 'import_key' => array(
'type' =>
'varchar(14)',
'label' =>
'ImportId',
'enabled' => 1,
'visible' => -2,
'notnull' => -1,
'index' => 0,
'position' => 1000),
119 'status' => array(
'type' =>
'integer',
'label' =>
'Status',
'visible' => 4,
'enabled' => 1,
'position' => 1000,
'notnull' => 1,
'default' =>
'0',
'index' => 1,
'arrayofkeyval' => array(0 =>
'Draft', 1 =>
'Validated', 2 =>
'Closed', 9 =>
'Canceled'))
135 public $fk_warehouse;
145 public $categories_product;
149 public $date_inventory;
163 public $fk_user_creat;
168 public $fk_user_modif;
173 public $fk_user_valid;
188 public $table_element_line =
'inventorydet';
193 public $fk_element =
'fk_inventory';
198 public $class_element_line =
'Inventoryline';
203 protected $childtables = array();
207 protected $childtablesoncascade = array(
'inventorydet');
212 public $lines = array();
225 $this->ismultientitymanaged = 1;
226 $this->isextrafieldmanaged = 0;
229 $this->fields[
'rowid'][
'visible'] = 0;
232 $this->fields[
'entity'][
'enabled'] = 0;
262 public function validate(
User $user, $notrigger = 0, $include_sub_warehouse = 0, $startmode =
'')
268 if (empty($startmode)) {
269 $startmode =
getDolGlobalString(
'INVENTORY_DEFAULT_START_MODE', self::START_MODE_CURRENT);
271 if (!in_array($startmode, array(self::START_MODE_CURRENT, self::START_MODE_NONE, self::START_MODE_ZERO))) {
275 if ($this->
status == self::STATUS_DRAFT) {
277 $sql =
'DELETE FROM '.$this->db->prefix().
'inventorydet WHERE fk_inventory = '.((int) $this->
id);
278 $resql = $this->db->query($sql);
280 $this->error = $this->db->lasterror();
281 $this->db->rollback();
285 if ($startmode == self::START_MODE_NONE) {
287 $result = $this->
setStatut($this::STATUS_VALIDATED,
null,
'',
'INVENTORY_VALIDATED');
291 $this->db->rollback();
297 $sql =
"SELECT ps.rowid, ps.fk_entrepot as fk_warehouse, ps.fk_product, ps.reel,";
299 $sql .=
" COALESCE(pb.batch, '') as batch, pb.qty as qty,";
301 $sql .=
" '' as batch, 0 as qty,";
303 $sql .=
" p.ref, p.tobatch";
304 $sql .=
" FROM ".$this->db->prefix().
"product_stock as ps";
306 $sql .=
" LEFT JOIN ".$this->db->prefix().
"product_batch as pb ON pb.fk_product_stock = ps.rowid";
308 $sql .=
", ".$this->db->prefix().
"product as p, ".$this->db->prefix().
"entrepot as e";
309 $sql .=
" WHERE p.entity IN (".getEntity(
'product').
")";
310 $sql .=
" AND ps.fk_product = p.rowid AND ps.fk_entrepot = e.rowid";
312 $sql .=
" AND p.fk_product_type = 0";
314 if ($this->fk_product > 0) {
315 $sql .=
" AND ps.fk_product = ".((int) $this->fk_product);
317 if ($this->fk_warehouse > 0) {
318 $sql .=
" AND (ps.fk_entrepot = ".((int) $this->fk_warehouse);
319 if (!empty($include_sub_warehouse) &&
getDolGlobalInt(
'INVENTORY_INCLUDE_SUB_WAREHOUSE')) {
320 $TChildWarehouses = array();
322 if (!empty($TChildWarehouses)) {
323 $sql .=
" OR ps.fk_entrepot IN (" . $this->db->sanitize(implode(
',', $TChildWarehouses)) .
")";
328 if (!empty($this->categories_product)) {
329 $sql .=
" AND EXISTS (";
330 $sql .=
" SELECT cp.fk_product";
331 $sql .=
" FROM ".$this->db->prefix().
"categorie_product AS cp";
332 $sql .=
" WHERE cp.fk_product = ps.fk_product";
333 $sql .=
" AND cp.fk_categorie IN (".$this->db->sanitize($this->categories_product).
")";
337 $sql .=
" AND NOT EXISTS (";
338 $sql .=
" SELECT pa.rowid";
339 $sql .=
" FROM ".$this->db->prefix().
"product_association as pa";
340 $sql .=
" WHERE pa.fk_product_pere = ps.fk_product";
343 $sql .=
" ORDER BY p.rowid";
347 $resql = $this->db->query($sql);
349 $num = $this->db->num_rows($resql);
353 $obj = $this->db->fetch_object($resql);
355 $inventoryline->fk_inventory = $this->id;
356 $inventoryline->fk_warehouse = $obj->fk_warehouse;
357 $inventoryline->fk_product = $obj->fk_product;
358 $inventoryline->batch = $obj->batch;
359 $inventoryline->datec =
dol_now();
362 $inventoryline->qty_view = ($startmode == self::START_MODE_ZERO) ? 0 :
null;
365 if ($obj->batch && empty($obj->tobatch)) {
368 $this->error =
'The product ID='.$obj->ref.
" has stock with lot/serial but is configured to not manage lot/serial. You must first fix this, this way: Set the product to have 'Management of Lot/Serial' to Yes, then set it back to 'Management of Lot/Serial to No";
372 $inventoryline->qty_stock = ($obj->batch ? $obj->qty : $obj->reel);
374 $inventoryline->qty_stock = $obj->reel;
377 $resultline = $inventoryline->create($user);
378 if ($resultline <= 0) {
379 $this->error = $inventoryline->error;
380 $this->errors = $inventoryline->errors;
389 $this->error = $this->db->lasterror();
394 $result = $this->
setStatut($this::STATUS_VALIDATED,
null,
'',
'INVENTORY_VALIDATED');
400 $this->db->rollback();
417 $sql =
'DELETE FROM '.$this->db->prefix().
'inventorydet WHERE fk_inventory = '.((int) $this->
id);
418 $resql = $this->db->query($sql);
420 $this->error = $this->db->lasterror();
421 $this->db->rollback();
425 $result = $this->
setStatut($this::STATUS_DRAFT,
null,
'',
'INVENTORY_DRAFT');
430 $this->db->rollback();
446 $result = $this->
setStatut($this::STATUS_RECORDED,
null,
'',
'INVENTORY_RECORDED');
451 $this->db->rollback();
468 $result = $this->
setStatut($this::STATUS_CANCELED,
null,
'',
'INVENTORY_CANCELED');
473 $this->db->rollback();
506 $object->ref =
"copy_of_".$object->ref;
511 $object->context[
'createfromclone'] =
'createfromclone';
512 $result =
$object->createCommon($user);
518 unset(
$object->context[
'createfromclone']);
525 $this->db->rollback();
537 public function fetch($id, $ref =
null)
577 public function delete(
User $user, $notrigger = 0)
593 $this->error =
'ErrorDeleteLineNotAllowedByObjectStatus';
610 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
612 global
$conf, $langs;
614 if (!empty(
$conf->dol_no_mouse_hover)) {
620 $label =
'<u>'.$langs->trans(
"Inventory").
'</u>';
622 $label .=
'<b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
624 $url =
dol_buildpath(
'/product/inventory/card.php', 1).
'?id='.$this->id;
627 if (empty($notooltip)) {
629 $label = $langs->trans(
"ShowInventory");
630 $linkclose .=
' alt="'.dolPrintHTMLForAttribute($label).
'"';
632 $linkclose .=
' title="'.dolPrintHTMLForAttribute($label).
'"';
633 $linkclose .=
' class="classfortooltip'.($morecss ?
' '.$morecss :
'').
'"';
635 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
638 $linkstart =
'<a href="'.$url.
'"';
639 $linkstart .= $linkclose.
'>';
642 $result .= $linkstart;
644 $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);
646 if ($withpicto != 2) {
647 $result .= $this->ref;
652 global $action, $hookmanager;
653 $hookmanager->initHooks(array($this->element .
'dao'));
654 $parameters = array(
'id' => $this->
id,
'getnomurl' => &$result);
655 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
657 $result = $hookmanager->resPrint;
659 $result .= $hookmanager->resPrint;
687 global $langs, $hookmanager;
689 $labelStatus = array();
690 $labelStatusShort = array();
691 $labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'Draft');
692 $labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Validated').
' ('.$langs->transnoentitiesnoconv(
'InventoryStartedShort').
')';
693 $labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv(
'Canceled');
694 $labelStatus[self::STATUS_RECORDED] = $langs->transnoentitiesnoconv(
'Closed');
695 $labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'Draft');
696 $labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'InventoryStartedShort');
697 $labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv(
'Canceled');
698 $labelStatusShort[self::STATUS_RECORDED] = $langs->transnoentitiesnoconv(
'Closed');
700 $statusType =
'status'.$status;
701 if ($status == self::STATUS_RECORDED) {
702 $statusType =
'status6';
705 $parameters = array(
'status' => $status,
'mode' => $mode);
706 $reshook = $hookmanager->executeHooks(
'LibStatut', $parameters, $this);
708 return $hookmanager->resPrint;
710 return dolGetStatus($labelStatus[$status], $labelStatusShort[$status],
'', $statusType, $mode);
722 global
$conf, $langs;
724 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
726 $return =
'<div class="box-flex-item box-flex-grow-zero">';
727 $return .=
'<div class="info-box info-box-sm">';
728 $return .=
'<span class="info-box-icon bg-infobox-action">';
729 $return .= img_picto(
'', $this->picto);
730 $return .=
'</span>';
731 $return .=
'<div class="info-box-content">';
732 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl() : $this->ref).
'</span>';
733 if ($selected >= 0) {
734 $return .=
'<input id="cb'.$this->id.
'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
736 if (property_exists($this,
'label')) {
737 $return .=
' <div class="inline-block opacitymedium valignmiddle tdoverflowmax100">'.$this->label.
'</div>';
739 if (property_exists($this,
'amount')) {
741 $return .=
'<span class="info-box-label amount">'.price($this->
amount, 0, $langs, 1, -1, -1,
$conf->currency).
'</span>';
743 if (method_exists($this,
'getLibStatut')) {
744 $return .=
'<br><div class="info-box-status">'.$this->getLibStatut(3).
'</div>';
761 $sql =
"SELECT rowid, date_creation as datec, tms as datem, date_validation as datev,";
762 $sql .=
" fk_user_creat, fk_user_modif, fk_user_valid";
763 $sql .=
" FROM ".$this->db->prefix().$this->table_element.
" as t";
764 $sql .=
" WHERE t.rowid = ".((int) $id);
765 $result = $this->db->query($sql);
767 if ($this->db->num_rows($result)) {
768 $obj = $this->db->fetch_object($result);
770 $this->
id = $obj->rowid;
772 $this->user_creation_id = $obj->fk_user_creat;
773 $this->user_modification_id = $obj->fk_user_modif;
774 $this->user_validation_id = $obj->fk_user_valid;
776 $this->date_creation = $this->db->jdate($obj->datec);
777 $this->date_modification = $this->db->jdate($obj->datem);
778 $this->date_validation = $this->db->jdate($obj->datev);
781 $this->db->free($result);
783 dol_print_error($this->db);
810 $sql =
'SELECT rowid FROM '.MAIN_DB_PREFIX.
'entrepot';
811 $sql .=
' WHERE fk_parent='.(int) $id;
812 $sql .=
' ORDER BY rowid';
813 $resql = $this->db->query($sql);
814 if ($resql && $this->db->num_rows($resql) > 0) {
815 while ($obj = $this->db->fetch_object($resql)) {
816 $TChildWarehouse[] = $obj->rowid;
834 global $langs,
$conf;
835 $langs->load(
"stocks");
847 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
848 foreach ($dirmodels as $reldir) {
852 $mybool = ((bool) @include_once $dir.$file) || $mybool;
856 dol_print_error(
null,
"Failed to include file ".$file);
860 if (class_exists($classname)) {
861 $obj =
new $classname();
862 '@phan-var-force ModeleNumRefInventory $obj';
863 $numref = $obj->getNextValue($this);
865 if ($numref !=
'' && $numref !=
'-1') {
868 $this->error = $obj->error;
887 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams =
null)
891 $langs->load(
"stocks");
896 if ($this->model_pdf) {
897 $modele = $this->model_pdf;
903 $modelpath =
"core/modules/inventory/doc/";
905 if (empty($modele)) {
909 return $this->
commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
921 public $element =
'inventoryline';
926 public $table_element =
'inventorydet';
941 public $picto =
'stock';
964 public $fields = array(
965 'rowid' => array(
'type' =>
'integer',
'label' =>
'TechnicalID',
'visible' => -1,
'enabled' => 1,
'position' => 1,
'notnull' => 1,
'index' => 1,
'comment' =>
'Id',),
966 'fk_inventory' => array(
'type' =>
'integer:Inventory:product/inventory/class/inventory.class.php',
'label' =>
'Inventory',
'visible' => 1,
'enabled' => 1,
'position' => 30,
'index' => 1,
'help' =>
'LinkToInventory'),
967 'fk_warehouse' => array(
'type' =>
'integer:Entrepot:product/stock/class/entrepot.class.php',
'label' =>
'Warehouse',
'visible' => 1,
'enabled' => 1,
'position' => 30,
'index' => 1,
'help' =>
'LinkToThirdparty'),
968 'fk_product' => array(
'type' =>
'integer:Product:product/class/product.class.php',
'label' =>
'Product',
'visible' => 1,
'enabled' => 1,
'position' => 32,
'index' => 1,
'help' =>
'LinkToProduct'),
969 'batch' => array(
'type' =>
'string',
'label' =>
'Batch',
'visible' => 1,
'enabled' => 1,
'position' => 32,
'index' => 1,
'help' =>
'LinkToProduct'),
970 'datec' => array(
'type' =>
'datetime',
'label' =>
'DateCreation',
'enabled' => 1,
'visible' => -2,
'notnull' => 1,
'position' => 500),
971 'tms' => array(
'type' =>
'timestamp',
'label' =>
'DateModification',
'enabled' => 1,
'visible' => -2,
'notnull' => 1,
'position' => 501),
972 'qty_stock' => array(
'type' =>
'double',
'label' =>
'QtyFound',
'visible' => 1,
'enabled' => 1,
'position' => 32,
'index' => 1,
'help' =>
'Qty we found/want (to define during draft edition)'),
973 'qty_view' => array(
'type' =>
'double',
'label' =>
'QtyBefore',
'visible' => 1,
'enabled' => 1,
'position' => 33,
'index' => 1,
'help' =>
'Qty before (filled once movements are validated)'),
974 'qty_regulated' => array(
'type' =>
'double',
'label' =>
'QtyDelta',
'visible' => 1,
'enabled' => 1,
'position' => 34,
'index' => 1,
'help' =>
'Qty added or removed (filled once movements are validated)'),
975 'pmp_real' => array(
'type' =>
'double',
'label' =>
'PMPReal',
'visible' => 1,
'enabled' => 1,
'position' => 35),
976 'pmp_expected' => array(
'type' =>
'double',
'label' =>
'PMPExpected',
'visible' => 1,
'enabled' => 1,
'position' => 36),
987 public $fk_inventory;
991 public $fk_warehouse;
1018 public $qty_regulated;
1027 public $pmp_expected;
1037 $this->ismultientitymanaged = 0;
1039 $this->isextrafieldmanaged = 0;
1086 public function delete(
User $user, $notrigger = 0)
if(! $sortfield) if(! $sortorder) $object
deleteLineCommon(User $user, $idline, $notrigger=0)
Delete a line of object in database.
setStatut($status, $elementId=null, $elementType='', $trigkey='', $fieldstatus='')
Set status of an object.
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.
updateCommon(User $user, $notrigger=0)
Update object into database.
initAsSpecimenCommon()
Initialise object with example values Id must be 0 if object instance is a specimen.
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 to manage Dolibarr database access.
getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
Return a link to the object card (with optionally the picto)
create(User $user, $notrigger=0)
Create object into database.
setRecorded(User $user, $notrigger=0)
Set to inventory to status "Closed".
LibStatut($status, $mode=0)
Return the status.
getKanbanView($option='', $arraydata=null)
Return a thumb for kanban views.
__construct(DoliDB $db)
Constructor.
getLibStatut($mode=0)
Return the label of the status.
info($id)
Charge les information d'ordre info dans l'objet commande.
setDraft(User $user, $notrigger=0)
Go back to draft.
update(User $user, $notrigger=0)
Load object lines in memory from the database.
setCanceled(User $user, $notrigger=0)
Set to Canceled.
initAsSpecimen()
Initialise object with example values Id must be 0 if object instance is a specimen.
deleteLine(User $user, $idline, $notrigger=0)
Delete a line of object in database.
const START_MODE_CURRENT
How the lines of the inventory are initialized when it is started.
fetch($id, $ref=null)
Load object in memory from the database.
validate(User $user, $notrigger=0, $include_sub_warehouse=0, $startmode='')
Validate inventory (start it)
getChildWarehouse($id, &$TChildWarehouse)
Return the child warehouse of the current one.
getNextNumRef()
Returns the reference to the following non used object depending on the active numbering module.
generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
Create a document onto disk according to template module.
createFromClone(User $user, $fromid)
Clone and object into another one.
update(User $user, $notrigger=0)
Update object into database.
__construct($db)
Constructor.
create(User $user, $notrigger=0)
Create object in database.
fetch($id, $ref=null)
Load object in memory from the database.
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...
dol_now($mode='gmt')
Return date for now.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
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