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>';
115 require_once DOL_DOCUMENT_ROOT .
'/fourn/class/fournisseur.commande.class.php';
116 require_once DOL_DOCUMENT_ROOT .
'/societe/class/societe.class.php';
119 $supplierorder->initAsSpecimen();
120 $thirdparty =
new Societe($db);
121 $thirdparty->initAsSpecimen();
123 $numExample = $this->
getNextValue($thirdparty, $supplierorder);
126 $numExample = $langs->trans(
'NotConfigured');
142 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
148 $this->error = $langs->trans(
'NotConfigured');
152 $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)
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.