29 require_once DOL_DOCUMENT_ROOT.
'/core/class/commondocgenerator.class.php';
58 include_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
79 public function info($langs)
81 $langs->load(
"bills");
82 return $langs->trans(
"NoDescription");
92 return empty($this->
name) ? $this->
nom : $this->name;
103 return $langs->trans(
"NoExample");
127 return $langs->trans(
"Function_getNextValue_InModuleNotWorking");
138 $langs->load(
"admin");
140 if ($this->version ==
'development') {
141 return $langs->trans(
"VersionDevelopment");
143 if ($this->version ==
'experimental') {
144 return $langs->trans(
"VersionExperimental");
146 if ($this->version ==
'dolibarr') {
149 if ($this->version) {
150 return $this->version;
152 return $langs->trans(
"NotAvailable");
169 $resql = $db->query($sql);
171 $num = $db->num_rows(
$resql);
174 $row = $db->fetch_row(
$resql);
175 $liste[$row[0]] = $row[1];
196 $langs->load(
"admin");
199 if (!empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) {
200 $strikestart =
'<strike>';
201 $strikeend =
'</strike> '.yn(1, 1, 2).
' ('.$langs->trans(
"ForcedToByAModule", $langs->transnoentities(
"yes")).
')';
205 $s .= $langs->trans(
"Name").
': <b>'.$this->
getNom($langs).
'</b><br>';
206 $s .= $langs->trans(
"Version").
': <b>'.$this->
getVersion().
'</b><br>';
207 } elseif ($type == 0) {
208 $s .= $langs->trans(
"ProductCodeDesc").
'<br>';
209 } elseif ($type == 1) {
210 $s .= $langs->trans(
"ServiceCodeDesc").
'<br>';
213 $s .= $langs->trans(
"ValidityControledByModule").
': <b>'.$this->
getNom($langs).
'</b><br>';
216 $s .=
'<u>'.$langs->trans(
"ThisIsModuleRules").
':</u><br>';
218 $s .= $langs->trans(
"RequiredIfProduct").
': '.$strikestart;
219 $s .=
yn(!$this->code_null, 1, 2).$strikeend;
221 } elseif ($type == 1) {
222 $s .= $langs->trans(
"RequiredIfService").
': '.$strikestart;
223 $s .=
yn(!$this->code_null, 1, 2).$strikeend;
225 } elseif ($type == -1) {
226 $s .= $langs->trans(
"Required").
': '.$strikestart;
227 $s .=
yn(!$this->code_null, 1, 2).$strikeend;
230 $s .= $langs->trans(
"CanBeModifiedIfOk").
': ';
231 $s .=
yn($this->code_modifiable, 1, 2);
233 $s .= $langs->trans(
"CanBeModifiedIfKo").
': '.
yn($this->code_modifiable_invalide, 1, 2).
'<br>';
234 $s .= $langs->trans(
"AutomaticCode").
': '.
yn($this->code_auto, 1, 2).
'<br>';
236 if ($type == 0 || $type == -1) {
238 if (empty($nextval)) {
239 $nextval = $langs->trans(
"Undefined");
241 $s .= $langs->trans(
"NextValue").($type == -1 ?
' ('.$langs->trans(
"Product").
')' :
'').
': <b>'.$nextval.
'</b><br>';
243 if ($type == 1 || $type == -1) {
245 if (empty($nextval)) {
246 $nextval = $langs->trans(
"Undefined");
248 $s .= $langs->trans(
"NextValue").($type == -1 ?
' ('.$langs->trans(
"Service").
')' :
'').
': <b>'.$nextval.
'</b>';
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
getNom($langs)
Renvoi nom module.
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation modules.
verif_prefixIsUsed()
Check if mask/numbering use prefix.
getExample($langs)
Return an example of numbering.
canBeActivated()
Checks if the numbers already in the database do not cause conflicts that would prevent this numberin...
$conf db name
Only used if Module[ID]Name translation string is not found.
if(!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'] s nom
static liste_modeles($db, $maxfilenamelength=0)
Renvoi la liste des modeles de numérotation.
Class template for classes of numbering product.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
getVersion()
Return version of module.
Parent class to manage intervention document templates.
Parent class for documents generators.
info($langs)
Renvoi la description par defaut du modele de numerotation.
getListOfModels($db, $type, $maxfilenamelength=0)
Return list of activated modules usable for document generation.
getToolTip($langs, $product, $type)
Return description of module parameters.
getNextValue($objproduct=0, $type=-1)
Return next value available.