29require_once DOL_DOCUMENT_ROOT.
'/core/modules/asset/modules_asset.php';
40 public $version =
'dolibarr';
50 public $name =
'advanced';
60 global $conf, $langs, $db;
62 $langs->load(
"bills");
64 $form =
new Form($db);
66 $text = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
67 $text .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
68 $text .=
'<input type="hidden" name="token" value="'.newToken().
'">';
69 $text .=
'<input type="hidden" name="action" value="updateMask">';
70 $text .=
'<input type="hidden" name="maskconst" value="ASSET_ADVANCED_MASK">';
71 $text .=
'<table class="nobordernopadding" width="100%">';
73 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Asset"), $langs->transnoentities(
"Asset"));
74 $tooltip .= $langs->trans(
"GenericMaskCodes2");
75 $tooltip .= $langs->trans(
"GenericMaskCodes3");
76 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Asset"), $langs->transnoentities(
"Asset"));
77 $tooltip .= $langs->trans(
"GenericMaskCodes5");
80 $text .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
81 $text .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="mask" value="'.
getDolGlobalString(
'ASSET_ADVANCED_MASK').
'">', $tooltip, 1, 1).
'</td>';
83 $text .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans(
"Modify").
'"></td>';
100 global $conf, $db, $langs, $mysoc;
102 $object =
new Asset($db);
103 $object->initAsSpecimen();
108 $numExample = $langs->trans(
'NotConfigured');
123 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
129 $this->error =
'NotConfigured';
133 $date = $object->date;
135 $numFinal =
get_next_value($db, $mask,
'asset',
'ref',
'',
null, $date);
Parent class to manage numbering of Asset.
Class to manage customer Bom numbering rules advanced.
info()
Returns the description of the numbering model.
getExample()
Return an example of numbering.
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 dolibarr global constant string value.