27require_once DOL_DOCUMENT_ROOT.
'/core/modules/reception/modules_reception.php';
34 public $version =
'dolibarr';
39 public $nom =
'Moonstone';
47 public function info($langs)
51 $langs->load(
"bills");
53 $form =
new Form($db);
55 $texte = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
56 $texte .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
57 $texte .=
'<input type="hidden" name="token" value="'.newToken().
'">';
58 $texte .=
'<input type="hidden" name="action" value="updateMask">';
59 $texte .=
'<input type="hidden" name="maskconstreception" value="RECEPTION_MOONSTONE_MASK">';
60 $texte .=
'<table class="nobordernopadding" width="100%">';
62 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Reception"), $langs->transnoentities(
"Reception"));
63 $tooltip .= $langs->trans(
"GenericMaskCodes2");
64 $tooltip .= $langs->trans(
"GenericMaskCodes3");
65 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Reception"), $langs->transnoentities(
"Reception"));
66 $tooltip .= $langs->trans(
"GenericMaskCodes5");
67 $tooltip .=
'<br>'.$langs->trans(
"GenericMaskCodes5b");
69 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
70 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskreception" value="'.
getDolGlobalString(
"RECEPTION_MOONSTONE_MASK").
'">', $tooltip, 1, 1).
'</td>';
71 $texte .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button" value="'.$langs->trans(
"Modify").
'"></td>';
86 global $langs, $mysoc;
88 $old_code_client = $mysoc->code_client;
89 $old_code_type = $mysoc->typent_code;
90 $mysoc->code_client =
'CCCCCCCCCC';
91 $mysoc->typent_code =
'TTTTTTTTTT';
93 $mysoc->code_client = $old_code_client;
94 $mysoc->typent_code = $old_code_type;
97 $numExample = $langs->trans(
'NotConfigured');
113 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
118 $this->error =
'NotConfigured';
122 if (!empty($reception)) {
123 $date = $reception->date_reception;
128 $numFinal =
get_next_value($db, $mask,
'reception',
'ref',
'', $objsoc, $date);
Parent Class of numbering models of sending receipts references.
Class to manage reception numbering rules Moonstone.
info($langs)
Return default description of numbering model.
getNextValue($objsoc, $reception)
Return next value.
getExample()
Return numbering example.
get_next_value($db, $mask, $table, $field, $where='', $objsoc='', $date='', $mode='next', $bentityon=true, $objuser=null, $forceentity=null)
Return last or next value for a mask (according to area we should not reset)
dol_now($mode='auto')
Return date for now.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.