29require_once DOL_DOCUMENT_ROOT.
'/core/modules/contract/modules_contract.php';
38 public $name =
'Olive';
39 public $version =
'dolibarr';
48 $this->code_modifiable = 1;
49 $this->code_modifiable_invalide = 1;
50 $this->code_modifiable_null = 1;
59 public function info($langs)
63 $langs->load(
"companies");
64 return $langs->trans(
"LeopardNumRefModelDesc");
103 public function verif($db, &$code, $product, $type)
108 $code = strtoupper(trim($code));
110 if (empty($code) && $this->code_null && !
getDolGlobalString(
'MAIN_CONTRACT_CODE_ALWAYS_REQUIRED')) {
112 } elseif (empty($code) && (!$this->code_null ||
getDolGlobalString(
'MAIN_CONTRACT_CODE_ALWAYS_REQUIRED'))) {
116 dol_syslog(
"mod_contract_olive::verif type=".$type.
" result=".$result);
Parent class for all contract numbering modules.
Class to manage contract numbering rules Olive.
verif($db, &$code, $product, $type)
Check validity of code according to its rules.
info($langs)
Return description of module.
getExample()
Return numbering example.
__construct()
Constructor.
getNextValue($objsoc, $contract)
Return an example of result returned by getNextValue.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.