30require_once DOL_DOCUMENT_ROOT.
'/core/modules/mrp/modules_mo.php';
42 public $version =
'dolibarr';
52 public $name =
'advanced';
61 public function info($langs)
63 global $conf, $langs, $db;
65 $langs->load(
"bills");
67 $form =
new Form($db);
69 $text = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
70 $text .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
71 $text .=
'<input type="hidden" name="token" value="'.newToken().
'">';
72 $text .=
'<input type="hidden" name="action" value="updateMask">';
73 $text .=
'<input type="hidden" name="maskconstMo" value="MRP_MO_ADVANCED_MASK">';
74 $text .=
'<table class="nobordernopadding" width="100%">';
76 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Mo"), $langs->transnoentities(
"Mo"));
77 $tooltip .= $langs->trans(
"GenericMaskCodes2");
78 $tooltip .= $langs->trans(
"GenericMaskCodes3");
79 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Mo"), $langs->transnoentities(
"Mo"));
80 $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="maskMo" value="'.
getDolGlobalString(
'MRP_MO_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>';
105 require_once DOL_DOCUMENT_ROOT .
'/mrp/class/mo.class.php';
106 require_once DOL_DOCUMENT_ROOT .
'/product/class/product.class.php';
109 $mo->initAsSpecimen();
111 $product->initAsSpecimen();
117 $numExample = $langs->trans(
'NotConfigured');
134 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
140 $this->error =
'NotConfigured';
146 $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 dolibarr global constant string value.