30require_once DOL_DOCUMENT_ROOT.
'/core/modules/asset/modules_asset.php';
41 public $version =
'dolibarr';
51 public $name =
'advanced';
60 public function info($langs)
64 $langs->load(
"bills");
66 $form =
new Form($db);
68 $text = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
69 $text .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
70 $text .=
'<input type="hidden" name="token" value="'.newToken().
'">';
71 $text .=
'<input type="hidden" name="action" value="updateMask">';
72 $text .=
'<input type="hidden" name="maskconst" value="ASSET_ADVANCED_MASK">';
73 $text .=
'<table class="nobordernopadding" width="100%">';
75 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Asset"), $langs->transnoentities(
"Asset"));
76 $tooltip .= $langs->trans(
"GenericMaskCodes2");
77 $tooltip .= $langs->trans(
"GenericMaskCodes3");
78 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Asset"), $langs->transnoentities(
"Asset"));
79 $tooltip .= $langs->trans(
"GenericMaskCodes5");
83 $text .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
84 $text .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="mask" value="'.
getDolGlobalString(
'ASSET_ADVANCED_MASK').
'">', $tooltip, 1, 1).
'</td>';
86 $text .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button"value="'.$langs->trans(
"Modify").
'"></td>';
111 $numExample = $langs->trans(
'NotConfigured');
126 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
132 $this->error =
'NotConfigured';
138 $numFinal =
get_next_value($db, $mask,
'asset',
'ref',
'',
'', $date);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Parent class to manage numbering of Asset.
Class to manage customer Bom numbering rules advanced.
getExample()
Return an example of numbering.
info($langs)
Returns the description of the numbering model.
getNextValue($object)
Return next free value.
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)
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.