30 require_once DOL_DOCUMENT_ROOT.
'/core/class/commondocgenerator.class.php';
57 include_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
93 $langs->load(
"members");
94 return $langs->trans(
"NoDescription");
115 $langs->load(
"members");
116 return $langs->trans(
"NoExample");
140 return $langs->trans(
"NotAvailable");
151 $langs->load(
"admin");
153 if ($this->version ==
'development') {
154 return $langs->trans(
"VersionDevelopment");
155 } elseif ($this->version ==
'experimental') {
156 return $langs->trans(
"VersionExperimental");
157 } elseif ($this->version ==
'dolibarr') {
159 } elseif ($this->version) {
160 return $this->version;
162 return $langs->trans(
"NotAvailable");
177 $langs->loadLangs(array(
"admin",
"companies"));
181 if (!empty($conf->global->MAIN_MEMBER_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) {
182 $strikestart =
'<strike>';
183 $strikeend =
'</strike> '.yn(1, 1, 2).
' ('.$langs->trans(
"ForcedToByAModule", $langs->transnoentities(
"yes")).
')';
187 $s .= $langs->trans(
"Name").
': <b>'.$this->
getName().
'</b><br>';
188 $s .= $langs->trans(
"Version").
': <b>'.$this->
getVersion().
'</b><br>';
189 $s .= $langs->trans(
"MemberCodeDesc").
'<br>';
190 $s .= $langs->trans(
"ValidityControledByModule").
': <b>'.$this->
getName().
'</b><br>';
192 $s .=
'<u>'.$langs->trans(
"ThisIsModuleRules").
':</u><br>';
194 $s .= $langs->trans(
"Required").
': '.$strikestart;
195 $s .=
yn(!$this->code_null, 1, 2).$strikeend;
197 $s .= $langs->trans(
"CanBeModifiedIfOk").
': ';
198 $s .=
yn($this->code_modifiable, 1, 2);
200 $s .= $langs->trans(
"CanBeModifiedIfKo").
': '.
yn($this->code_modifiable_invalide, 1, 2).
'<br>';
201 $s .= $langs->trans(
"AutomaticCode").
': '.
yn($this->code_auto, 1, 2).
'<br>';
204 if (empty($nextval)) {
205 $nextval = $langs->trans(
"Undefined");
207 $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.