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 $texte = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
70 $texte .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
71 $texte .=
'<input type="hidden" name="token" value="'.newToken().
'">';
72 $texte .=
'<input type="hidden" name="action" value="updateMask">';
73 $texte .=
'<input type="hidden" name="maskconstMo" value="MRP_MO_ADVANCED_MASK">';
74 $texte .=
'<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 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
84 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskMo" value="'.
getDolGlobalString(
'MRP_MO_ADVANCED_MASK').
'">', $tooltip, 1, 1).
'</td>';
86 $texte .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button"value="'.$langs->trans(
"Modify").
'"></td>';
103 global $conf, $langs, $mysoc;
105 $old_code_client = $mysoc->code_client;
106 $old_code_type = $mysoc->typent_code;
107 $mysoc->code_client =
'CCCCCCCCCC';
108 $mysoc->typent_code =
'TTTTTTTTTT';
110 $mysoc->code_client = $old_code_client;
111 $mysoc->typent_code = $old_code_type;
114 $numExample = $langs->trans(
'NotConfigured');
130 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
136 $this->error =
'NotConfigured';
140 $date = ($object->date_mo ? $object->date_mo : $object->date);
142 $numFinal =
get_next_value($db, $mask,
'mrp_mo',
'ref',
'',
null, $date);
Parent class to manage numbering of MOs.
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.