28require_once DOL_DOCUMENT_ROOT.
'/core/modules/product/modules_product.class.php';
44 public $name =
'Leopard';
45 public $version =
'dolibarr';
53 $this->code_modifiable = 1;
54 $this->code_modifiable_invalide = 1;
55 $this->code_modifiable_null = 1;
66 public function info($langs)
68 $langs->load(
"companies");
69 return $langs->trans(
"LeopardNumRefModelDesc");
80 public function getExample($langs, $objproduct =
null, $type = -1)
111 public function verif($db, &$code, $product, $type)
116 $code = strtoupper(trim($code));
118 if (empty($code) && $this->code_null && !
getDolGlobalString(
'MAIN_COMPANY_CODE_ALWAYS_REQUIRED')) {
120 } elseif (empty($code) && (!$this->code_null ||
getDolGlobalString(
'MAIN_COMPANY_CODE_ALWAYS_REQUIRED'))) {
124 dol_syslog(
"mod_codeproduct_leopard::verif type=".$type.
" result=".$result);
Class template for classes of numbering product.
Class permettant la gestion leopard des codes produits.
verif($db, &$code, $product, $type)
Check validity of code according to its rules.
info($langs)
Return description of module.
getExample($langs, $objproduct=null, $type=-1)
Return an example of result returned by getNextValue.
getNextValue($objproduct='', $type=-1)
Return an example of result returned by getNextValue.
__construct()
Constructor.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.