27require_once DOL_DOCUMENT_ROOT.
'/core/modules/expedition/modules_expedition.php';
38 public $version =
'dolibarr';
48 public $name =
'Ribera';
53 public $position = 20;
62 public function info($langs)
66 $langs->load(
"bills");
68 $form =
new Form($db);
70 $texte = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
71 $texte .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
72 $texte .=
'<input type="hidden" name="token" value="'.newToken().
'">';
73 $texte .=
'<input type="hidden" name="action" value="updateMask">';
74 $texte .=
'<input type="hidden" name="maskconstexpedition" value="EXPEDITION_RIBERA_MASK">';
75 $texte .=
'<input type="hidden" name="page_y" value="">';
77 $texte .=
'<table class="nobordernopadding centpercent">';
79 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Shipment"), $langs->transnoentities(
"Shipment"));
80 $tooltip .= $langs->trans(
"GenericMaskCodes1");
82 $tooltip .= $langs->trans(
"GenericMaskCodes2");
84 $tooltip .= $langs->trans(
"GenericMaskCodes3");
85 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Shipment"), $langs->transnoentities(
"Shipment"));
86 $tooltip .= $langs->trans(
"GenericMaskCodes5");
87 $tooltip .=
'<br>'.$langs->trans(
"GenericMaskCodes5b");
89 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
90 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskexpedition" value="'.
getDolGlobalString(
'EXPEDITION_RIBERA_MASK').
'">', $tooltip, 1,
'help',
'valignmiddle', 0, 3, $this->
name).
'</td>';
91 $texte .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button" value="'.$langs->trans(
"Save").
'"></td>';
108 require_once DOL_DOCUMENT_ROOT .
'/expedition/class/expedition.class.php';
109 require_once DOL_DOCUMENT_ROOT .
'/societe/class/societe.class.php';
112 $shipment->initAsSpecimen();
113 $thirdparty =
new Societe($db);
114 $thirdparty->initAsSpecimen();
116 $numExample = $this->
getNextValue($thirdparty, $shipment);
119 $numExample = $langs->trans(
'NotConfigured');
136 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
141 $this->error =
'NotConfigured';
145 $date = $shipment->date_shipping;
147 $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, $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.
$conf db name
Only used if Module[ID]Name translation string is not found.