26require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions.lib.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/class/commonnumrefgenerator.class.php';
61 public function writeBarCode($code, $encoding, $readable =
'Y', $scale = 1, $nooutputiferror = 0)
87 return $langs->trans(
"Function_getNextValue_InModuleNotWorking");
100 $langs->loadLangs(array(
"admin",
"companies"));
103 $s .= $langs->trans(
"Name").
': <b>'.$this->
name.
'</b><br>';
104 $s .= $langs->trans(
"Version").
': <b>'.$this->
getVersion().
'</b><br>';
106 $s .= $langs->trans(
"ValidityControledByModule").
': <b>'.$this->
getName($langs).
'</b><br>';
109 $s .=
'<u>'.$langs->trans(
"ThisIsModuleRules").
':</u><br>';
111 $s .= $langs->trans(
"RequiredIfProduct").
': ';
112 if (
getDolGlobalString(
'MAIN_BARCODE_CODE_ALWAYS_REQUIRED') && !empty($this->code_null)) {
115 $s .=
yn(!$this->code_null, 1, 2);
116 if (
getDolGlobalString(
'MAIN_BARCODE_CODE_ALWAYS_REQUIRED') && !empty($this->code_null)) {
117 $s .=
'</strike> '.yn(1, 1, 2).
' ('.$langs->trans(
"ForcedToByAModule", $langs->transnoentities(
"yes")).
')';
122 $s .= $langs->trans(
"RequiredIfService").
': ';
123 if (
getDolGlobalString(
'MAIN_BARCODE_CODE_ALWAYS_REQUIRED') && !empty($this->code_null)) {
126 $s .=
yn(!$this->code_null, 1, 2);
127 if (
getDolGlobalString(
'MAIN_BARCODE_CODE_ALWAYS_REQUIRED') && !empty($this->code_null)) {
128 $s .=
'</strike> '.yn(1, 1, 2).
' ('.$langs->trans(
"ForcedToByAModule", $langs->transnoentities(
"yes")).
')';
133 $s .= $langs->trans(
"Required").
': ';
134 if (
getDolGlobalString(
'MAIN_BARCODE_CODE_ALWAYS_REQUIRED') && !empty($this->code_null)) {
137 $s .=
yn(!$this->code_null, 1, 2);
138 if (
getDolGlobalString(
'MAIN_BARCODE_CODE_ALWAYS_REQUIRED') && !empty($this->code_null)) {
139 $s .=
'</strike> '.yn(1, 1, 2).
' ('.$langs->trans(
"ForcedToByAModule", $langs->transnoentities(
"yes")).
')';
148 $s .= $langs->trans(
"AutomaticCode").
': '.
yn($this->code_auto, 1, 2).
'<br>';
152 if (empty($nextval)) {
153 $nextval = $langs->trans(
"Undefined");
155 $s .= $langs->trans(
"NextValue").
': <b>'.$nextval.
'</b><br>';
Parent class for number ref generators.
getVersion()
Returns version of numbering module.
getName($langs)
Return model name.
Parent class for barcode document generators (image)
isEnabled()
Return if a model can be used or not.
writeBarCode($code, $encoding, $readable='Y', $scale=1, $nooutputiferror=0)
Save an image file on disk (with no output)
Parent class for barcode numbering models.
getToolTip($langs, $soc, $type)
Return description of module parameters.
getNextValue($objcommon=null, $type='')
Return next value available.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
$conf db name
Only used if Module[ID]Name translation string is not found.