32require_once DOL_DOCUMENT_ROOT.
'/core/modules/supplier_invoice/modules_facturefournisseur.php';
45 public $version =
'dolibarr';
57 public $nom =
'Tulip';
62 public $name =
'Tulip';
71 public function info($langs)
76 $langs->loadLangs(array(
"bills",
"admin"));
78 $form =
new Form($db);
80 $texte = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
81 $texte .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
82 $texte .=
'<input type="hidden" name="token" value="'.newToken().
'">';
83 $texte .=
'<input type="hidden" name="action" value="updateMask">';
84 $texte .=
'<input type="hidden" name="maskconstinvoice" value="SUPPLIER_INVOICE_TULIP_MASK">';
85 $texte .=
'<input type="hidden" name="maskconstreplacement" value="SUPPLIER_REPLACEMENT_TULIP_MASK">';
86 $texte .=
'<input type="hidden" name="maskconstcredit" value="SUPPLIER_CREDIT_TULIP_MASK">';
87 $texte .=
'<input type="hidden" name="maskconstdeposit" value="SUPPLIER_DEPOSIT_TULIP_MASK">';
88 $texte .=
'<input type="hidden" name="page_y" value="">';
90 $texte .=
'<table class="nobordernopadding centpercent">';
92 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Invoice"), $langs->transnoentities(
"Invoice"));
93 $tooltip .= $langs->trans(
"GenericMaskCodes1");
94 $tooltip .= $langs->trans(
"GenericMaskCodes2");
96 $tooltip .= $langs->trans(
"GenericMaskCodes3");
98 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Invoice"), $langs->transnoentities(
"Invoice"));
99 $tooltip .= $langs->trans(
"GenericMaskCodes5");
100 $tooltip .=
'<br>'.$langs->trans(
"GenericMaskCodes5b");
103 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
' ('.$langs->trans(
"InvoiceStandard").
')';
105 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskinvoice" value="'.
getDolGlobalString(
"SUPPLIER_INVOICE_TULIP_MASK").
'">', $tooltip, 1,
'help',
'', 0, 3,
'tooltipstandardtulip').
'</td>';
107 $texte .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button" value="'.$langs->trans(
"Save").
'"></td>';
112 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
' ('.$langs->trans(
"InvoiceAvoir").
'):</td>';
113 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskcredit" value="'.
getDolGlobalString(
"SUPPLIER_CREDIT_TULIP_MASK").
'">', $tooltip, 1,
'help',
'', 0, 3,
'tooltipcredittuplie').
'</td>';
118 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
' ('.$langs->trans(
"InvoiceReplacement").
'):</td>';
119 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskreplacement" value="'.
getDolGlobalString(
"SUPPLIER_REPLACEMENT_TULIP_MASK").
'">', $tooltip, 1,
'help',
'', 0, 3,
'tooltipreplacementtulip').
'</td>';
124 $texte .=
'<tr><td>'.$langs->trans(
"Mask").
' ('.$langs->trans(
"InvoiceDeposit").
'):</td>';
125 $texte .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskdeposit" value="'.
getDolGlobalString(
"SUPPLIER_DEPOSIT_TULIP_MASK").
'">', $tooltip, 1,
'help',
'', 0, 3,
'tooltipdownpaymenttulip').
'</td>';
128 $texte .=
'</table>';
141 global $langs, $mysoc;
143 $old_code_client = $mysoc->code_client;
144 $mysoc->code_client =
'CCCCCCCCCC';
146 $mysoc->code_client = $old_code_client;
149 $numExample = $langs->trans(
'NotConfigured');
166 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
183 $this->error =
'NotConfigured';
202 public function getNumRef($objsoc, $objforref, $mode =
'next')
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Parent Class of numbering models of suppliers invoices references.
Tulip Class of numbering models of suppliers invoices references.
info($langs)
Returns the description of the model numbering.
getExample()
Returns a numbering example.
getNumRef($objsoc, $objforref, $mode='next')
Return next free value.
getNextValue($objsoc, $object, $mode='next')
Return next value.
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)
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.