dolibarr 21.0.0-alpha
mod_sn_free.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 * or see https://www.gnu.org/
19 */
20
27require_once DOL_DOCUMENT_ROOT.'/core/modules/product_batch/modules_product_batch.class.php';
28
34{
35 /*
36 * :warning:
37 * This module is used by default if none was set in the configuration.
38 * Therefore, the implementation must remain as open as possible.
39 */
40
41 // variables inherited from ModeleThirdPartyCode class
42 public $name = 'sn_free';
43 public $version = 'dolibarr';
44
48 public function __construct()
49 {
50 $this->code_null = 1;
51 $this->code_modifiable = 1;
52 $this->code_modifiable_invalide = 1;
53 $this->code_modifiable_null = 1;
54 $this->code_auto = 0;
55 }
56
57
64 public function info($langs)
65 {
66 global $langs;
67 $langs->load("companies");
68 return $langs->trans("LeopardNumRefModelDesc");
69 }
70
76 public function getExample()
77 {
78 global $db;
79
80 require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
81
82 $thirdparty = new Societe($db);
83 $thirdparty->initAsSpecimen();
84
85 return $this->getNextValue($thirdparty, null);
86 }
87
95 public function getNextValue($objsoc, $object)
96 {
97 return '';
98 }
99}
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
Parent class to manage numbering of batch products.
Class to manage third parties objects (customers, suppliers, prospects...)
__construct()
Constructor.
info($langs)
Return description of module.
getNextValue($objsoc, $object)
Return an example of result returned by getNextValue.
getExample()
Return an example of numbering.