27require_once DOL_DOCUMENT_ROOT.
'/core/modules/contract/modules_contract.php';
40 public $nom =
'Olive';
45 public $name =
'Olive';
47 public $code_modifiable = 1;
49 public $code_modifiable_invalide = 1;
51 public $code_modifiable_null = 1;
53 public $code_null = 1;
59 public $version =
'dolibarr';
64 public $code_auto = 0;
73 public function info($langs)
77 $langs->load(
"companies");
78 return $langs->trans(
"LeopardNumRefModelDesc");
117 public function verif($db, &$code, $product, $type)
122 $code = strtoupper(trim($code));
124 if (empty($code) && $this->code_null && !
getDolGlobalString(
'MAIN_CONTRACT_CODE_ALWAYS_REQUIRED')) {
126 } elseif (empty($code) && (!$this->code_null ||
getDolGlobalString(
'MAIN_CONTRACT_CODE_ALWAYS_REQUIRED'))) {
130 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.
getNextValue($objsoc, $contract)
Return an example of result returned by getNextValue.
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.