28require_once DOL_DOCUMENT_ROOT.
'/core/modules/holiday/modules_holiday.php';
36 public $name =
'Immaculate';
37 public $version =
'dolibarr';
39 public $position = 100;
56 public function info($langs)
60 $langs->load(
"bills");
62 $form =
new Form($db);
64 $texte = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
65 $texte .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
66 $texte .=
'<input type="hidden" name="token" value="'.newToken().
'">';
67 $texte .=
'<input type="hidden" name="action" value="updateMask">';
68 $texte .=
'<input type="hidden" name="maskconstholiday" value="HOLIDAY_IMMACULATE_MASK">';
69 $texte .=
'<input type="hidden" name="page_y" value="">';
71 $texte .=
'<table class="nobordernopadding centpercent">';
73 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Holiday"), $langs->transnoentities(
"Holiday"));
74 $tooltip .= $langs->trans(
"GenericMaskCodes1");
76 $tooltip .= $langs->trans(
"GenericMaskCodes2");
78 $tooltip .= $langs->trans(
"GenericMaskCodes3");
79 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Holiday"), $langs->transnoentities(
"Holiday"));
80 $tooltip .= $langs->trans(
"GenericMaskCodes5");
83 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
84 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskholiday" value="'.
getDolGlobalString(
'HOLIDAY_IMMACULATE_MASK').
'">', $tooltip, 1,
'help',
'valignmiddle', 0, 3, $this->
name).
'</td>';
85 $texte .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button" value="'.$langs->trans(
"Save").
'"></td>';
100 global $db, $langs, $user;
101 require_once DOL_DOCUMENT_ROOT .
'/holiday/class/holiday.class.php';
104 $holiday->initAsSpecimen();
106 $old_login = $user->login;
107 $user->login =
'UUUUUUU';
109 $user->login = $old_login;
112 $numExample = $langs->trans(
'NotConfigured');
129 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
134 $this->error =
'NotConfigured';
138 $numFinal =
get_next_value($db, $mask,
'holiday',
'ref',
'', $objsoc, $holiday->date_create);
Class of the module paid holiday.
Parent class for all holidays numbering modules.
Class to manage holiday numbering rules Immaculate.
__construct()
Constructor.
getExample()
Return numbering example.
getNextValue($objsoc, $holiday)
Return next value.
info($langs)
Return default description of numbering model.
get_next_value($db, $mask, $table, $field, $where='', $objsoc='', $date='', $mode='next', $bentityon=true, $objuser=null, $forceentity=null, $objbookkeeping=null)
Return last or next value for a mask (according to area we should not reset)
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
$conf db name
Only used if Module[ID]Name translation string is not found.