30require_once DOL_DOCUMENT_ROOT.
'/core/modules/bom/modules_bom.php';
42 public $version =
'dolibarr';
52 public $name =
'advanced';
61 public function info($langs)
65 $langs->load(
"bills");
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="maskconstBom" value="BOM_ADVANCED_MASK">';
74 $texte .=
'<input type="hidden" name="page_y" value="">';
76 $texte .=
'<table class="nobordernopadding centpercent">';
78 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Bom"), $langs->transnoentities(
"Bom"));
79 $tooltip .= $langs->trans(
"GenericMaskCodes1");
81 $tooltip .= $langs->trans(
"GenericMaskCodes2");
83 $tooltip .= $langs->trans(
"GenericMaskCodes3");
84 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Bom"), $langs->transnoentities(
"Bom"));
85 $tooltip .= $langs->trans(
"GenericMaskCodes5");
89 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
90 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskBom" value="'.
getDolGlobalString(
'BOM_ADVANCED_MASK').
'">', $tooltip, 1,
'help',
'valignmiddle', 0, 3, $this->
name).
'</td>';
92 $texte .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button" value="'.$langs->trans(
"Save").
'"></td>';
111 $old_code_client =
$mysoc->code_client;
112 $old_code_type =
$mysoc->typent_code;
113 $mysoc->code_client =
'CCCCCCCCCC';
114 $mysoc->typent_code =
'TTTTTTTTTT';
116 $mysoc->code_client = $old_code_client;
117 $mysoc->typent_code = $old_code_type;
120 $numExample = $langs->trans(
'NotConfigured');
136 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
142 $this->error =
'NotConfigured';
if(! $sortfield) if(! $sortorder) $object
Parent class to manage numbering of BOMs.
Class to manage customer Bom numbering rules advanced.
info($langs)
Returns the description of the numbering model.
getNextValue($objprod, $object)
Return next free value.
getExample()
Return an example of numbering.
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)
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
$conf db name
Only used if Module[ID]Name translation string is not found.