31require_once DOL_DOCUMENT_ROOT.
'/core/modules/mrp/modules_mo.php';
43 public $version =
'dolibarr';
53 public $name =
'advanced';
62 public function info($langs)
66 $langs->load(
"bills");
68 $form =
new Form($db);
70 $text = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
71 $text .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
72 $text .=
'<input type="hidden" name="token" value="'.newToken().
'">';
73 $text .=
'<input type="hidden" name="action" value="updateMask">';
74 $text .=
'<input type="hidden" name="maskconstMo" value="MRP_MO_ADVANCED_MASK">';
75 $text .=
'<table class="nobordernopadding" width="100%">';
77 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Mo"), $langs->transnoentities(
"Mo"));
78 $tooltip .= $langs->trans(
"GenericMaskCodes2");
79 $tooltip .= $langs->trans(
"GenericMaskCodes3");
80 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Mo"), $langs->transnoentities(
"Mo"));
81 $tooltip .= $langs->trans(
"GenericMaskCodes5");
85 $text .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
86 $text .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskMo" value="'.
getDolGlobalString(
'MRP_MO_ADVANCED_MASK').
'">', $tooltip, 1, 1).
'</td>';
88 $text .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button"value="'.$langs->trans(
"Modify").
'"></td>';
107 require_once DOL_DOCUMENT_ROOT .
'/mrp/class/mo.class.php';
108 require_once DOL_DOCUMENT_ROOT .
'/product/class/product.class.php';
111 $mo->initAsSpecimen();
113 $product->initAsSpecimen();
119 $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,
'mrp_mo',
'ref',
'',
null, $date);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Parent class to manage numbering of MOs.
Class to manage products or services.
Class to manage MO numbering rules advanced.
getExample()
Return an example of numbering.
info($langs)
Returns the description of the numbering model.
getNextValue($objprod, $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.