31require_once DOL_DOCUMENT_ROOT.
'/core/modules/workstation/modules_workstation.php';
43 public $version =
'dolibarr';
53 public $name =
'advanced';
62 public function info($langs)
66 $langs->load(
"bills");
68 $form =
new Form($db);
70 $texte = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
71 $texte .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
72 $texte .=
'<input type="hidden" name="token" value="'.newToken().
'">';
73 $texte .=
'<input type="hidden" name="action" value="updateMask">';
74 $texte .=
'<input type="hidden" name="maskconstWorkstation" value="WORKSTATION_WORKSTATION_ADVANCED_MASK">';
75 $texte .=
'<table class="nobordernopadding" width="100%">';
77 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Workstation"), $langs->transnoentities(
"Workstation"));
78 $tooltip .= $langs->trans(
"GenericMaskCodes2");
79 $tooltip .= $langs->trans(
"GenericMaskCodes3");
80 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Workstation"), $langs->transnoentities(
"Workstation"));
81 $tooltip .= $langs->trans(
"GenericMaskCodes5");
85 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
86 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskWorkstation" value="'.
getDolGlobalString(
'WORKSTATION_WORKSTATION_ADVANCED_MASK').
'">', $tooltip, 1, 1).
'</td>';
88 $texte .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button" value="'.$langs->trans(
"Modify").
'"></td>';
105 global
$conf, $db, $langs, $mysoc;
121 $numExample = $langs->trans(
'NotConfigured');
136 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
142 $this->error =
'NotConfigured';
148 $numFinal =
get_next_value($db, $mask,
'workstation_workstation',
'ref',
'',
null, $date);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Parent class to manage numbering of Workstation.
Class to manage customer Bom numbering rules advanced.
getNextValue($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)
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...