30 require_once DOL_DOCUMENT_ROOT .
'/core/modules/supplier_invoice/modules_facturefournisseur.php';
73 $langs->loadLangs(array(
"bills",
"admin"));
75 $form =
new Form($this->db);
77 $texte = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
78 $texte.=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
79 $texte.=
'<input type="hidden" name="token" value="'.$_SESSION[
'newtoken'].
'">';
80 $texte.=
'<input type="hidden" name="action" value="updateMask">';
81 $texte.=
'<input type="hidden" name="maskconstinvoice" value="SUPPLIER_INVOICE_TULIP_MASK">';
82 $texte.=
'<input type="hidden" name="maskconstreplacement" value="SUPPLIER_REPLACEMENT_TULIP_MASK">';
83 $texte.=
'<input type="hidden" name="maskconstcredit" value="SUPPLIER_CREDIT_TULIP_MASK">';
84 $texte.=
'<input type="hidden" name="maskconstdeposit" value="SUPPLIER_DEPOSIT_TULIP_MASK">';
85 $texte.=
'<table class="nobordernopadding" width="100%">';
87 $tooltip=$langs->trans(
"GenericMaskCodes",$langs->transnoentities(
"Invoice"),$langs->transnoentities(
"Invoice"));
88 $tooltip.=$langs->trans(
"GenericMaskCodes2");
89 $tooltip.=$langs->trans(
"GenericMaskCodes3");
90 $tooltip.=$langs->trans(
"GenericMaskCodes4a",$langs->transnoentities(
"Invoice"),$langs->transnoentities(
"Invoice"));
91 $tooltip.=$langs->trans(
"GenericMaskCodes5");
94 $texte.=
'<tr><td>'.$langs->trans(
"Mask").
' ('.$langs->trans(
"InvoiceStandard").
')';
96 $texte.=
'<td align="right">'.$form->textwithpicto(
'<input type="text" class="flat" size="24" name="maskinvoice" value="'.$conf->global->SUPPLIER_INVOICE_TULIP_MASK.
'">',$tooltip,1,1).
'</td>';
98 $texte.=
'<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans(
"Modify").
'" name="Button"></td>';
103 $texte.=
'<tr><td>'.$langs->trans(
"Mask").
' ('.$langs->trans(
"InvoiceAvoir").
'):</td>';
104 $texte.=
'<td align="right">'.$form->textwithpicto(
'<input type="text" class="flat" size="24" name="maskcredit" value="'.$conf->global->SUPPLIER_CREDIT_TULIP_MASK.
'">',$tooltip,1,1).
'</td>';
107 if ($conf->global->MAIN_FEATURE_LEVEL >= 2)
110 $texte.=
'<tr><td>'.$langs->trans(
"Mask").
' ('.$langs->trans(
"InvoiceReplacement").
'):</td>';
111 $texte.=
'<td align="right">'.$form->textwithpicto(
'<input type="text" class="flat" size="24" name="maskreplacement" value="'.$conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK.
'">',$tooltip,1,1).
'</td>';
116 $texte.=
'<tr><td>'.$langs->trans(
"Mask").
' ('.$langs->trans(
"InvoiceDeposit").
'):</td>';
117 $texte.=
'<td align="right">'.$form->textwithpicto(
'<input type="text" class="flat" size="24" name="maskdeposit" value="'.$conf->global->SUPPLIER_DEPOSIT_TULIP_MASK.
'">',$tooltip,1,1).
'</td>';
134 global $conf,$langs,$mysoc;
136 $old_code_client=$mysoc->code_client;
137 $mysoc->code_client=
'CCCCCCCCCC';
139 $mysoc->code_client=$old_code_client;
143 $numExample = $langs->trans(
'NotConfigured');
160 require_once DOL_DOCUMENT_ROOT .
'/core/lib/functions2.lib.php';
164 if (is_object($object) && $object->type == 1)
166 $mask=$conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK;
169 $mask=$conf->global->SUPPLIER_INVOICE_TULIP_MASK;
172 else if (is_object($object) && $object->type == 2) $mask=$conf->global->SUPPLIER_CREDIT_TULIP_MASK;
173 else if (is_object($object) && $object->type == 3) $mask=$conf->global->SUPPLIER_DEPOSIT_TULIP_MASK;
174 else $mask=$conf->global->SUPPLIER_INVOICE_TULIP_MASK;
177 $this->error=
'NotConfigured';
182 $numFinal=
get_next_value($db,$mask,
'facture_fourn',
'ref',
'',$objsoc,$object->date);
Parent Class of numbering models of suppliers invoices references.
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)
Tulip Class of numbering models of suppliers invoices references.
getNumRef($objsoc, $objforref, $mode='next')
Return next free value.
$version
Dolibarr version of the loaded document string.
info()
Returns the description of the model numbering.
getNextValue($objsoc, $object, $mode='next')
Return next value.
getExample()
Returns a numbering example.