30 require_once DOL_DOCUMENT_ROOT.
'/core/class/commondocgenerator.class.php';
57 include_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
71 public $code_modifiable;
73 public $code_modifiable_invalide;
75 public $code_modifiable_null;
102 $langs->load(
"members");
103 return $langs->trans(
"NoDescription");
124 $langs->load(
"members");
125 return $langs->trans(
"NoExample");
149 return $langs->trans(
"NotAvailable");
160 $langs->load(
"admin");
162 if ($this->version ==
'development') {
163 return $langs->trans(
"VersionDevelopment");
164 } elseif ($this->version ==
'experimental') {
165 return $langs->trans(
"VersionExperimental");
166 } elseif ($this->version ==
'dolibarr') {
168 } elseif ($this->version) {
169 return $this->version;
171 return $langs->trans(
"NotAvailable");
186 $langs->loadLangs(array(
"admin",
"companies"));
190 if (!empty($conf->global->MAIN_MEMBER_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) {
191 $strikestart =
'<strike>';
192 $strikeend =
'</strike> '.yn(1, 1, 2).
' ('.$langs->trans(
"ForcedToByAModule", $langs->transnoentities(
"yes")).
')';
196 $s .= $langs->trans(
"Name").
': <b>'.$this->
getName().
'</b><br>';
197 $s .= $langs->trans(
"Version").
': <b>'.$this->
getVersion().
'</b><br>';
198 $s .= $langs->trans(
"MemberCodeDesc").
'<br>';
199 $s .= $langs->trans(
"ValidityControledByModule").
': <b>'.$this->
getName().
'</b><br>';
201 $s .=
'<u>'.$langs->trans(
"ThisIsModuleRules").
':</u><br>';
203 $s .= $langs->trans(
"Required").
': '.$strikestart;
204 $s .=
yn(!$this->code_null, 1, 2).$strikeend;
206 $s .= $langs->trans(
"CanBeModifiedIfOk").
': ';
207 $s .=
yn($this->code_modifiable, 1, 2);
209 $s .= $langs->trans(
"CanBeModifiedIfKo").
': '.
yn($this->code_modifiable_invalide, 1, 2).
'<br>';
210 $s .= $langs->trans(
"AutomaticCode").
': '.
yn($this->code_auto, 1, 2).
'<br>';
213 if (empty($nextval)) {
214 $nextval = $langs->trans(
"Undefined");
216 $s .= $langs->trans(
"NextValue").
' ('.$langs->trans(
"Member").
'): <b>'.$nextval.
'</b><br>';
Parent class for documents generators.
Classe mere des modeles de numerotation des references de members.
getToolTip($langs, $soc)
Return description of module parameters.
getNextValue($objsoc, $object)
Renvoi prochaine valeur attribuee.
info()
Returns the default description of the numbering pattern.
getVersion()
Renvoi version du module numerotation.
getName()
Return name of module.
getExample()
Return an example of numbering.
canBeActivated()
Checks if the numbers already in the database do not cause conflicts that would prevent this numberin...
isEnabled()
Return if a module can be used or not.
Parent class to manage intervention document templates.
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation modules.
getListOfModels($db, $type, $maxfilenamelength=0)
Return list of activated modules usable for document generation.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.