dolibarr 25.0.0-alpha
mod_inventory_leaf.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2026 Jose MARTINEZ <jose.martinez@pichinov.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
23require_once DOL_DOCUMENT_ROOT.'/core/modules/inventory/modules_inventory.php';
24
25
30{
35 public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
36
40 public $error = '';
41
45 public $name = 'leaf';
46
50 public $position = 20;
51
52
59 public function info($langs)
60 {
61 global $langs;
62 $langs->load("stocks");
63 return $langs->trans("InventoryNumRefFreeDesc");
64 }
65
66
72 public function getExample()
73 {
74 global $langs;
75 return $langs->trans("InventoryRefTypedManually");
76 }
77
78
86 public function canBeActivated($object)
87 {
88 return true;
89 }
90
97 public function getNextValue($object)
98 {
99 return '';
100 }
101}
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
Parent class to manage numbering of Inventory.
Class to manage the free numbering rule for Inventory (the reference is typed manually)
canBeActivated($object)
Checks if the numbers already in the database do not cause conflicts that would prevent this numberin...
getExample()
Return an example of numbering.
info($langs)
Return description of numbering module.
getNextValue($object)
Return next free value: empty string, the user types the reference.