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");
85 $tooltip .= $langs->trans(
"GenericMaskCodes3");
86 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Order"), $langs->transnoentities(
"Order"));
87 $tooltip .= $langs->trans(
"GenericMaskCodes5");
90 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
91 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskorder" value="'.
getDolGlobalString(
"COMMANDE_FOURNISSEUR_ORCHIDEE_MASK").
'">', $tooltip, 1, 1).
'</td>';
93 $texte .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button"value="'.$langs->trans(
"Modify").
'"></td>';
112 require_once DOL_DOCUMENT_ROOT .
'/fourn/class/fournisseur.commande.class.php';
113 require_once DOL_DOCUMENT_ROOT .
'/societe/class/societe.class.php';
116 $supplierorder->initAsSpecimen();
117 $thirdparty =
new Societe($db);
118 $thirdparty->initAsSpecimen();
120 $numExample = $this->
getNextValue($thirdparty, $supplierorder);
123 $numExample = $langs->trans(
'NotConfigured');
139 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
145 $this->error = $langs->trans(
'NotConfigured');
149 $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 suppliers orders 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 dolibarr global constant string value.