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 .=
'<input type="hidden" name="page_y" value="">';
83 $texte .=
'<table class="nobordernopadding centpercent">';
85 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Order"), $langs->transnoentities(
"Order"));
86 $tooltip .= $langs->trans(
"GenericMaskCodes1");
87 $tooltip .= $langs->trans(
"GenericMaskCodes2");
89 $tooltip .= $langs->trans(
"GenericMaskCodes3");
91 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Order"), $langs->transnoentities(
"Order"));
92 $tooltip .= $langs->trans(
"GenericMaskCodes5");
93 $tooltip .=
'<br>'.$langs->trans(
"GenericMaskCodes5b");
96 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
97 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskorder" value="'.
getDolGlobalString(
"COMMANDE_FOURNISSEUR_ORCHIDEE_MASK").
'">', $tooltip, 1,
'help',
'', 0, 3,
'tooltiporchidee').
'</td>';
99 $texte .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button" value="'.$langs->trans(
"Save").
'"></td>';
103 $texte .=
'</table>';
118 require_once DOL_DOCUMENT_ROOT .
'/fourn/class/fournisseur.commande.class.php';
119 require_once DOL_DOCUMENT_ROOT .
'/societe/class/societe.class.php';
122 $supplierorder->initAsSpecimen();
123 $thirdparty =
new Societe($db);
124 $thirdparty->initAsSpecimen();
126 $numExample = $this->
getNextValue($thirdparty, $supplierorder);
129 $numExample = $langs->trans(
'NotConfigured');
145 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
151 $this->error = $langs->trans(
'NotConfigured');
155 $numFinal =
get_next_value($db, $mask,
'commande_fournisseur',
'ref',
'', $objsoc,
$object->date_commande);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Class to manage predefined suppliers products.
Parent Class of numbering models of supplier order references.
Class to manage third parties objects (customers, suppliers, prospects...)
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, $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.