27require_once DOL_DOCUMENT_ROOT.
'/core/modules/expedition/modules_expedition.php';
38 public $version =
'dolibarr';
50 public $nom =
'Ribera';
55 public $name =
'Ribera';
63 public function info($langs)
67 $langs->load(
"bills");
69 $form =
new Form($db);
71 $texte = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
72 $texte .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
73 $texte .=
'<input type="hidden" name="token" value="'.newToken().
'">';
74 $texte .=
'<input type="hidden" name="action" value="updateMask">';
75 $texte .=
'<input type="hidden" name="maskconstexpedition" value="EXPEDITION_RIBERA_MASK">';
76 $texte .=
'<table class="nobordernopadding" width="100%">';
78 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Shipment"), $langs->transnoentities(
"Shipment"));
79 $tooltip .= $langs->trans(
"GenericMaskCodes2");
80 $tooltip .= $langs->trans(
"GenericMaskCodes3");
81 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Shipment"), $langs->transnoentities(
"Shipment"));
82 $tooltip .= $langs->trans(
"GenericMaskCodes5");
83 $tooltip .=
'<br>'.$langs->trans(
"GenericMaskCodes5b");
85 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
86 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskexpedition" value="'.
getDolGlobalString(
'EXPEDITION_RIBERA_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>';
104 require_once DOL_DOCUMENT_ROOT .
'/expedition/class/expedition.class.php';
105 require_once DOL_DOCUMENT_ROOT .
'/societe/class/societe.class.php';
108 $shipment->initAsSpecimen();
109 $thirdparty =
new Societe($db);
110 $thirdparty->initAsSpecimen();
112 $numExample = $this->
getNextValue($thirdparty, $shipment);
115 $numExample = $langs->trans(
'NotConfigured');
132 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
137 $this->error =
'NotConfigured';
141 $date = $shipment->date_shipping;
143 $numFinal =
get_next_value($db, $mask,
'expedition',
'ref',
'', $objsoc, $date);
Parent Class of numbering models of sending receipts references.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage expedition numbering rules Ribera.
info($langs)
Return default description of numbering model.
getNextValue($objsoc, $shipment)
Return next value.
getExample()
Return numbering example.
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.