26require_once DOL_DOCUMENT_ROOT.
'/core/modules/product/modules_product.class.php';
46 public $nom =
'Leopard';
51 public $name =
'Leopard';
53 public $code_modifiable;
55 public $code_modifiable_invalide;
57 public $code_modifiable_null;
65 public $version =
'dolibarr';
79 $this->code_modifiable = 1;
80 $this->code_modifiable_invalide = 1;
81 $this->code_modifiable_null = 1;
92 public function info($langs)
94 $langs->load(
"companies");
95 return $langs->trans(
"LeopardNumRefModelDesc");
106 public function getExample($langs, $objproduct = 0, $type = -1)
137 public function verif($db, &$code, $product, $type)
142 $code = strtoupper(trim($code));
144 if (empty($code) && $this->code_null && empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) {
146 } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED))) {
150 dol_syslog(
"mod_codeproduct_leopard::verif type=".$type.
" result=".$result);
Class template for classes of numbering product.
Classe permettant la gestion leopard des codes produits.
getExample($langs, $objproduct=0, $type=-1)
Return an example of result returned by getNextValue.
verif($db, &$code, $product, $type)
Check validity of code according to its rules.
info($langs)
Return description of module.
getNextValue($objproduct=0, $type=-1)
Return an example of result returned by getNextValue.
__construct()
Constructor.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.