30require_once DOL_DOCUMENT_ROOT.
'/core/modules/commande/modules_commande.php';
42 public $version =
'dolibarr';
52 public $name =
'Saphir';
61 public function info($langs)
65 $langs->load(
"bills");
67 $form =
new Form($db);
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="maskconstorder" value="COMMANDE_SAPHIR_MASK">';
74 $texte .=
'<table class="nobordernopadding" width="100%">';
76 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Order"), $langs->transnoentities(
"Order"));
77 $tooltip .= $langs->trans(
"GenericMaskCodes2");
78 $tooltip .= $langs->trans(
"GenericMaskCodes3");
79 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Order"), $langs->transnoentities(
"Order"));
80 $tooltip .= $langs->trans(
"GenericMaskCodes5");
81 $tooltip .=
'<br>'.$langs->trans(
"GenericMaskCodes5b");
84 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
85 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskorder" value="'.
getDolGlobalString(
"COMMANDE_SAPHIR_MASK").
'">', $tooltip, 1, 1).
'</td>';
87 $texte .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button"value="'.$langs->trans(
"Modify").
'"></td>';
106 require_once DOL_DOCUMENT_ROOT .
'/commande/class/commande.class.php';
107 require_once DOL_DOCUMENT_ROOT .
'/societe/class/societe.class.php';
110 $order->initAsSpecimen();
111 $thirdparty =
new Societe($db);
112 $thirdparty->initAsSpecimen();
117 $numExample = $langs->trans(
'NotConfigured');
134 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
140 $this->error =
'NotConfigured';
153 $numFinal =
get_next_value($db, $mask,
'commande',
'ref',
'', $objsoc, $date,
'next',
false,
null, $entity);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Class to manage customers orders.
Parent class to manage numbering of Sale Orders.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage Sales Order numbering rules Saphir.
getExample()
Return an example of numbering.
info($langs)
Returns the description of the numbering model.
getNextValue($objsoc, $object)
Return next free value.
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)
dol_now($mode='auto')
Return date for now.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
getEntity($element, $shared=1, $currentobject=null)
Get list of entity id to use.