29require_once DOL_DOCUMENT_ROOT.
'/core/modules/supplier_order/modules_commandefournisseur.php';
41 public $version =
'dolibarr';
53 public $nom =
'Orchidee';
58 public $name =
'Orchidee';
67 public function info($langs)
72 $langs->loadLangs(array(
"bills",
"admin"));
74 $form =
new Form($db);
76 $texte = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
77 $texte .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
78 $texte .=
'<input type="hidden" name="token" value="'.newToken().
'">';
79 $texte .=
'<input type="hidden" name="action" value="updateMask">';
80 $texte .=
'<input type="hidden" name="maskconstorder" value="COMMANDE_FOURNISSEUR_ORCHIDEE_MASK">';
81 $texte .=
'<table class="nobordernopadding" width="100%">';
83 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Order"), $langs->transnoentities(
"Order"));
84 $tooltip .= $langs->trans(
"GenericMaskCodes2");
86 $tooltip .= $langs->trans(
"GenericMaskCodes3");
88 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Order"), $langs->transnoentities(
"Order"));
89 $tooltip .= $langs->trans(
"GenericMaskCodes5");
90 $tooltip .=
'<br>'.$langs->trans(
"GenericMaskCodes5b");
93 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
94 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskorder" value="'.
getDolGlobalString(
"COMMANDE_FOURNISSEUR_ORCHIDEE_MASK").
'">', $tooltip, 1, 1,
'', 0, 3,
'tooltiporchidee').
'</td>';
96 $texte .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button"value="'.$langs->trans(
"Modify").
'"></td>';
100 $texte .=
'</table>';
113 global $conf, $langs, $mysoc;
115 $old_code_client = $mysoc->code_client;
116 $mysoc->code_client =
'CCCCCCCCCC';
118 $mysoc->code_client = $old_code_client;
121 $numExample = $langs->trans(
'NotConfigured');
137 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
143 $this->error =
'NotConfigured';
147 $numFinal =
get_next_value($db, $mask,
'commande_fournisseur',
'ref',
'', $objsoc,
$object->date_commande);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Parent Class of numbering models of suppliers orders references.
Class providing the 'Orchidee' numbering models for supplier orders.
info($langs)
Returns the description of the numbering model.
getNextValue($objsoc, $object)
Return next 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)
Return last or next value for a mask (according to area we should not reset)
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.