23require_once DOL_DOCUMENT_ROOT.
'/core/modules/inventory/modules_inventory.php';
35 public $version =
'dolibarr';
45 public $name =
'advanced';
50 public $position = 60;
59 public function info($langs)
63 $langs->load(
"bills");
67 $texte = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
68 $texte .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
69 $texte .=
'<input type="hidden" name="token" value="'.newToken().
'">';
70 $texte .=
'<input type="hidden" name="action" value="updateMask">';
71 $texte .=
'<input type="hidden" name="maskconstinventory" value="INVENTORY_ADVANCED_MASK">';
72 $texte .=
'<input type="hidden" name="page_y" value="">';
74 $texte .=
'<table class="nobordernopadding centpercent">';
76 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Inventory"), $langs->transnoentities(
"Inventory"));
77 $tooltip .= $langs->trans(
"GenericMaskCodes1");
79 $tooltip .= $langs->trans(
"GenericMaskCodes2");
81 $tooltip .= $langs->trans(
"GenericMaskCodes3");
82 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Inventory"), $langs->transnoentities(
"Inventory"));
83 $tooltip .= $langs->trans(
"GenericMaskCodes5");
86 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
87 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat" size="24" name="maskInventory" value="'.
getDolGlobalString(
'INVENTORY_ADVANCED_MASK').
'">', $tooltip, 1,
'help',
'valignmiddle', 0, 3, $this->
name).
'</td>';
89 $texte .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" value="'.$langs->trans(
"Save").
'" name="Button"></td>';
108 require_once DOL_DOCUMENT_ROOT.
'/product/inventory/class/inventory.class.php';
115 $numExample = $langs->trans(
'NotConfigured');
130 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
136 $this->error =
'NotConfigured';
if(! $sortfield) if(! $sortorder) $object
Parent class to manage numbering of Inventory.
Class to manage the mask based numbering rule for Inventory.
info($langs)
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, $objbookkeeping=null)
Return last or next value for a mask (according to area we should not reset)
dol_now($mode='gmt')
Return date for now.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
$conf db name
Only used if Module[ID]Name translation string is not found.