31require_once DOL_DOCUMENT_ROOT.
'/core/modules/accountancy/modules_accountancy.php';
43 public $version =
'dolibarr';
53 public $name =
'Helium';
58 public $position = 60;
67 public function info($langs)
71 $langs->load(
"bills");
75 $texte = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
76 $texte .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
77 $texte .=
'<input type="hidden" name="token" value="'.newToken().
'">';
78 $texte .=
'<input type="hidden" name="action" value="updateMask">';
79 $texte .=
'<input type="hidden" name="maskconstbookkeeping" value="BOOKKEEPING_HELIUM_MASK">';
80 $texte .=
'<input type="hidden" name="page_y" value="">';
82 $texte .=
'<table class="nobordernopadding centpercent">';
84 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Bookkeeping"), $langs->transnoentities(
"Bookkeeping"));
85 $tooltip .= $langs->trans(
"GenericMaskCodes1");
88 $tooltip .= $langs->trans(
"GenericMaskCodes3");
90 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Bookkeeping"), $langs->transnoentities(
"Bookkeeping"));
91 $tooltip .= $langs->trans(
"GenericMaskCodes5");
95 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
96 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskbookkeeping" value="'.
getDolGlobalString(
"BOOKKEEPING_HELIUM_MASK").
'">', $tooltip, 1,
'help',
'valignmiddle', 0, 3, $this->
name).
'</td>';
98 $texte .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button" value="'.$langs->trans(
"Save").
'"></td>';
102 $texte .=
'</table>';
117 require_once DOL_DOCUMENT_ROOT .
'/accountancy/class/bookkeeping.class.php';
120 $bookkeeping->initAsSpecimen();
125 $numExample = $langs->trans(
'NotConfigured');
141 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
147 $this->error =
'NotConfigured';
153 $entity =
$conf->entity;
155 $numFinal =
get_next_value(
$db, $mask,
'accounting_bookkeeping',
'ref',
'',
'',
$object->doc_date,
'next',
false,
null, (
string) $entity,
$object);
if(! $sortfield) if(! $sortorder) $object
Class to manage Ledger (General Ledger and Subledger)
Parent class to manage numbering of Sale Orders.
Class to manage Bookkeeping numbering rules Helium, configurable numbering model.
getNextValue(BookKeeping $object)
Return next free value.
info($langs)
Returns the description of the numbering model.
getExample()
Return an example of numbering.
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.