24 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions.lib.php';
65 public function info($langs)
67 $langs->load(
"bills");
68 return $langs->trans(
"NoDescription");
78 return empty($this->
name) ? $this->
nom : $this->name;
88 $langs->load(
"bills");
89 return $langs->trans(
"NoExample");
102 return $langs->trans(
"Function_getNextValue_InModuleNotWorking");
112 $langs->load(
"admin");
114 if ($this->version ==
'development')
return $langs->trans(
"VersionDevelopment");
115 if ($this->version ==
'experimental')
return $langs->trans(
"VersionExperimental");
116 if ($this->version ==
'dolibarr')
return DOL_VERSION;
117 if ($this->version)
return $this->version;
118 return $langs->trans(
"NotAvailable");
133 $langs->load(
"admin");
136 $s .= $langs->trans(
"Name").
': <b>'.$this->
name.
'</b><br>';
137 $s .= $langs->trans(
"Version").
': <b>'.$this->
getVersion().
'</b><br>';
138 if ($type != -1) $s .= $langs->trans(
"ValidityControledByModule").
': <b>'.$this->
getNom($langs).
'</b><br>';
140 $s .=
'<u>'.$langs->trans(
"ThisIsModuleRules").
':</u><br>';
143 $s .= $langs->trans(
"RequiredIfProduct").
': ';
144 if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .=
'<strike>';
145 $s .=
yn(!$this->code_null, 1, 2);
146 if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .=
'</strike> '.yn(1, 1, 2).
' ('.$langs->trans(
"ForcedToByAModule", $langs->transnoentities(
"yes")).
')';
151 $s .= $langs->trans(
"RequiredIfService").
': ';
152 if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .=
'<strike>';
153 $s .=
yn(!$this->code_null, 1, 2);
154 if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .=
'</strike> '.yn(1, 1, 2).
' ('.$langs->trans(
"ForcedToByAModule", $langs->transnoentities(
"yes")).
')';
159 $s .= $langs->trans(
"Required").
': ';
160 if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .=
'<strike>';
161 $s .=
yn(!$this->code_null, 1, 2);
162 if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .=
'</strike> '.yn(1, 1, 2).
' ('.$langs->trans(
"ForcedToByAModule", $langs->transnoentities(
"yes")).
')';
170 $s .= $langs->trans(
"AutomaticCode").
': '.
yn($this->code_auto, 1, 2).
'<br>';
174 if (empty($nextval)) $nextval = $langs->trans(
"Undefined");
175 $s .= $langs->trans(
"NextValue").
': <b>'.$nextval.
'</b><br>';
getToolTip($langs, $soc, $type)
Return description of module parameters.
Parent class for barcode numbering models.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
getNom($langs)
Return model name.
$conf db name
Only used if Module[ID]Name translation string is not found.
isEnabled()
Return if a model can be used or not.
info($langs)
Return default description of numbering model.
if(!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'] s nom
getExample($langs)
Return a numbering example.
getVersion()
Return version of module.
getNextValue($objproduct, $type= '')
Return next value available.
Parent class for barcode document models.