32require_once DOL_DOCUMENT_ROOT.
'/core/class/commondocgenerator.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/commonnumrefgenerator.class.php';
55 include_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
73 abstract public function write_file(
$object, $outputlangs, $srctemplatepath =
'', $mode =
'member', $nooutput = 0, $filename =
'tmp_cards');
93 $langs->loadLangs(array(
"admin",
"companies"));
97 if (
getDolGlobalString(
'MAIN_MEMBER_CODE_ALWAYS_REQUIRED') && !empty($this->code_null)) {
98 $strikestart =
'<strike>';
99 $strikeend =
'</strike> '.yn(1, 1, 2).
' ('.$langs->trans(
"ForcedToByAModule", $langs->transnoentities(
"yes")).
')';
103 $s .= $langs->trans(
"Name").
': <b>'.$this->
getName($langs).
'</b><br>';
104 $s .= $langs->trans(
"Version").
': <b>'.$this->
getVersion().
'</b><br>';
105 $s .= $langs->trans(
"MemberCodeDesc").
'<br>';
106 $s .= $langs->trans(
"ValidityControledByModule").
': <b>'.$this->
getName($langs).
'</b><br>';
108 $s .=
'<u>'.$langs->trans(
"ThisIsModuleRules").
':</u><br>';
110 $s .= $langs->trans(
"Required").
': '.$strikestart;
111 $s .=
yn($this->code_null ? 0 : 1, 1, 2).$strikeend;
113 $s .= $langs->trans(
"CanBeModifiedIfOk").
': ';
114 $s .=
yn($this->code_modifiable, 1, 2);
116 $s .= $langs->trans(
"CanBeModifiedIfKo").
': '.
yn($this->code_modifiable_invalide, 1, 2).
'<br>';
117 $s .= $langs->trans(
"AutomaticCode").
': '.
yn($this->code_auto, 1, 2).
'<br>';
120 if (empty($nextval)) {
121 $nextval = $langs->trans(
"Undefined");
123 $s .= $langs->trans(
"NextValue").
' ('.$langs->trans(
"Member").
'): <b>'.$nextval.
'</b><br>';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Parent class for documents (PDF, ODT, ...) generators.
Parent class for number ref generators.
getVersion()
Returns version of numbering module.
getName($langs)
Return model name.
Class mere des modeles de numerotation des references de members.
getToolTip($langs, $soc)
Return description of module parameters.
getNextValue($objsoc, $object)
Return next value.
getExample()
Return an example of numbering.
Parent class to manage intervention document templates.
write_file($object, $outputlangs, $srctemplatepath='', $mode='member', $nooutput=0, $filename='tmp_cards')
Function to build a document.
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, $format=1, $color=0)
Return yes or no in current language.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.