28 require
'../../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/stripe/lib/stripe.lib.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/product/class/html.formproduct.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/stripe/class/stripe.class.php';
35 $servicename =
'Stripe';
38 $langs->loadLangs(array(
'admin',
'other',
'paypal',
'paybox',
'stripe'));
42 $action =
GETPOST(
'action',
'aZ09');
49 if ($action ==
'setvalue' && $user->admin)
53 if (empty($conf->stripeconnect->enabled)) {
54 $result =
dolibarr_set_const($db,
"STRIPE_TEST_PUBLISHABLE_KEY",
GETPOST(
'STRIPE_TEST_PUBLISHABLE_KEY',
'alpha'),
'chaine', 0,
'', $conf->entity);
57 $result =
dolibarr_set_const($db,
"STRIPE_TEST_SECRET_KEY",
GETPOST(
'STRIPE_TEST_SECRET_KEY',
'alpha'),
'chaine', 0,
'', $conf->entity);
60 $result =
dolibarr_set_const($db,
"STRIPE_TEST_WEBHOOK_ID",
GETPOST(
'STRIPE_TEST_WEBHOOK_ID',
'alpha'),
'chaine', 0,
'', $conf->entity);
63 $result =
dolibarr_set_const($db,
"STRIPE_TEST_WEBHOOK_KEY",
GETPOST(
'STRIPE_TEST_WEBHOOK_KEY',
'alpha'),
'chaine', 0,
'', $conf->entity);
66 $result =
dolibarr_set_const($db,
"STRIPE_LIVE_PUBLISHABLE_KEY",
GETPOST(
'STRIPE_LIVE_PUBLISHABLE_KEY',
'alpha'),
'chaine', 0,
'', $conf->entity);
69 $result =
dolibarr_set_const($db,
"STRIPE_LIVE_SECRET_KEY",
GETPOST(
'STRIPE_LIVE_SECRET_KEY',
'alpha'),
'chaine', 0,
'', $conf->entity);
72 $result =
dolibarr_set_const($db,
"STRIPE_LIVE_WEBHOOK_ID",
GETPOST(
'STRIPE_LIVE_WEBHOOK_ID',
'alpha'),
'chaine', 0,
'', $conf->entity);
75 $result =
dolibarr_set_const($db,
"STRIPE_LIVE_WEBHOOK_KEY",
GETPOST(
'STRIPE_LIVE_WEBHOOK_KEY',
'alpha'),
'chaine', 0,
'', $conf->entity);
79 $result =
dolibarr_set_const($db,
"ONLINE_PAYMENT_CREDITOR",
GETPOST(
'ONLINE_PAYMENT_CREDITOR',
'alpha'),
'chaine', 0,
'', $conf->entity);
82 $result =
dolibarr_set_const($db,
"STRIPE_BANK_ACCOUNT_FOR_PAYMENTS",
GETPOST(
'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS',
'int'),
'chaine', 0,
'', $conf->entity);
85 $result =
dolibarr_set_const($db,
"STRIPE_USER_ACCOUNT_FOR_ACTIONS",
GETPOST(
'STRIPE_USER_ACCOUNT_FOR_ACTIONS',
'int'),
'chaine', 0,
'', $conf->entity);
89 $result =
dolibarr_set_const($db,
"STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS",
GETPOST(
'STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS',
'int'),
'chaine', 0,
'', $conf->entity);
92 $result =
dolibarr_set_const($db,
"ONLINE_PAYMENT_CSS_URL",
GETPOST(
'ONLINE_PAYMENT_CSS_URL',
'alpha'),
'chaine', 0,
'', $conf->entity);
95 $result =
dolibarr_set_const($db,
"ONLINE_PAYMENT_MESSAGE_FORM",
GETPOST(
'ONLINE_PAYMENT_MESSAGE_FORM',
'alpha'),
'chaine', 0,
'', $conf->entity);
98 $result =
dolibarr_set_const($db,
"ONLINE_PAYMENT_MESSAGE_OK",
GETPOST(
'ONLINE_PAYMENT_MESSAGE_OK',
'alpha'),
'chaine', 0,
'', $conf->entity);
101 $result =
dolibarr_set_const($db,
"ONLINE_PAYMENT_MESSAGE_KO",
GETPOST(
'ONLINE_PAYMENT_MESSAGE_KO',
'alpha'),
'chaine', 0,
'', $conf->entity);
104 $result =
dolibarr_set_const($db,
"ONLINE_PAYMENT_SENDEMAIL",
GETPOST(
'ONLINE_PAYMENT_SENDEMAIL'),
'chaine', 0,
'', $conf->entity);
113 $result =
dolibarr_set_const($db,
"PAYMENT_SECURITY_TOKEN",
GETPOST(
'PAYMENT_SECURITY_TOKEN',
'alpha'),
'chaine', 0,
'', $conf->entity);
117 if (empty($conf->use_javascript_ajax)) {
118 $result =
dolibarr_set_const($db,
"PAYMENT_SECURITY_TOKEN_UNIQUE",
GETPOST(
'PAYMENT_SECURITY_TOKEN_UNIQUE',
'alpha'),
'chaine', 0,
'', $conf->entity);
133 if ($action ==
"setlive")
135 $liveenable =
GETPOST(
'value',
'int');
136 $res =
dolibarr_set_const($db,
"STRIPE_LIVE", $liveenable,
'yesno', 0,
'', $conf->entity);
150 $form =
new Form($db);
153 llxHeader(
'', $langs->trans(
"StripeSetup"));
155 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
160 print '<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
161 print '<input type="hidden" name="token" value="'.newToken().
'">';
162 print '<input type="hidden" name="action" value="setvalue">';
166 $stripearrayofwebhookevents = array(
'account.updated',
'payout.created',
'payout.paid',
'charge.pending',
'charge.refunded',
'charge.succeeded',
'charge.failed',
'payment_intent.succeeded',
'payment_intent.payment_failed',
'payment_method.attached',
'payment_method.updated',
'payment_method.card_automatically_updated',
'payment_method.detached',
'source.chargeable',
'customer.deleted');
168 print '<span class="opacitymedium">'.$langs->trans(
"StripeDesc").
"</span><br>\n";
172 print '<div class="div-table-responsive-no-min">';
173 print '<table class="noborder centpercent">';
174 print '<tr class="liste_titre">';
175 print '<td>'.$langs->trans(
"AccountParameter").
'</td>';
176 print '<td>'.$langs->trans(
"Value").
'</td>';
180 print '<tr class="oddeven">';
182 print $langs->trans(
"StripeLiveEnabled").
'</td><td>';
183 if ($conf->use_javascript_ajax) {
186 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
187 print $form->selectarray(
"STRIPE_LIVE", $arrval, $conf->global->STRIPE_LIVE);
189 print '</td><td></td></tr>';
191 if (empty($conf->stripeconnect->enabled))
193 print '<tr class="oddeven"><td>';
194 print '<span class="fieldrequired">'.$langs->trans(
"STRIPE_TEST_PUBLISHABLE_KEY").
'</span></td><td>';
195 print '<input class="minwidth300" type="text" name="STRIPE_TEST_PUBLISHABLE_KEY" value="'.$conf->global->STRIPE_TEST_PUBLISHABLE_KEY.
'">';
196 print ' <span class="opacitymedium">'.$langs->trans(
"Example").
': pk_test_xxxxxxxxxxxxxxxxxxxxxxxx</span>';
197 print '</td><td></td></tr>';
199 print '<tr class="oddeven"><td>';
200 print '<span class="titlefield fieldrequired">'.$langs->trans(
"STRIPE_TEST_SECRET_KEY").
'</span></td><td>';
201 print '<input class="minwidth300" type="text" name="STRIPE_TEST_SECRET_KEY" value="'.$conf->global->STRIPE_TEST_SECRET_KEY.
'">';
202 print ' <span class="opacitymedium">'.$langs->trans(
"Example").
': sk_test_xxxxxxxxxxxxxxxxxxxxxxxx<</span>';
203 print '</td><td></td></tr>';
205 print '<tr class="oddeven"><td>';
206 print '<span class="titlefield">'.$langs->trans(
"STRIPE_TEST_WEBHOOK_KEY").
'</span></td><td>';
207 if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
208 print '<input class="minwidth300" type="text" name="STRIPE_TEST_WEBHOOK_ID" value="'.$conf->global->STRIPE_TEST_WEBHOOK_ID.
'">';
209 print ' <span class="opacitymedium">'.$langs->trans(
"Example").
': we_xxxxxxxxxxxxxxxxxxxxxxxx</span><br>';
211 print '<input class="minwidth300" type="text" name="STRIPE_TEST_WEBHOOK_KEY" value="'.$conf->global->STRIPE_TEST_WEBHOOK_KEY.
'">';
212 print ' <span class="opacitymedium">'.$langs->trans(
"Example").
': whsec_xxxxxxxxxxxxxxxxxxxxxxxx</span>';
213 $out =
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForTestWebhook").
'</span> ';
215 $out .=
'<input type="text" id="onlinetestwebhookurl" class="minwidth500" value="'.$url.
'" disabled>';
219 if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
221 if (!empty($conf->global->STRIPE_TEST_WEBHOOK_KEY) && !empty($conf->global->STRIPE_TEST_SECRET_KEY) && !empty($conf->global->STRIPE_TEST_WEBHOOK_ID))
223 \Stripe\Stripe::setApiKey($conf->global->STRIPE_TEST_SECRET_KEY);
224 $endpoint = \Stripe\WebhookEndpoint::retrieve($conf->global->STRIPE_TEST_WEBHOOK_ID);
225 $endpoint->enabled_events = $stripearrayofwebhookevents;
226 if (
GETPOST(
'webhook',
'alpha') == $conf->global->STRIPE_TEST_WEBHOOK_ID) {
227 if (!
GETPOST(
'status',
'alpha')) {
228 $endpoint->disabled =
true;
230 $endpoint->disabled =
false;
233 $endpoint->url =
dol_buildpath(
'/public/stripe/ipn.php?test', 3);
235 if ($endpoint->status ==
'enabled')
237 print '<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=ipn&webhook='.$endpoint->id.
'&status=0">';
240 print '<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=ipn&webhook='.$endpoint->id.
'&status=1">';
250 print '<tr class="oddeven"><td>'.$langs->trans(
"StripeConnect").
'</td>';
251 print '<td><b>'.$langs->trans(
"StripeConnect_Mode").
'</b><br/>';
252 print $langs->trans(
"STRIPE_APPLICATION_FEE_PLATFORM").
' ';
253 print price($conf->global->STRIPE_APPLICATION_FEE_PERCENT);
255 print price($conf->global->STRIPE_APPLICATION_FEE);
256 print ' '.$langs->getCurrencySymbol($conf->currency).
' '.$langs->trans(
"minimum").
' '.
price($conf->global->STRIPE_APPLICATION_FEE_MINIMAL).
' '.$langs->getCurrencySymbol($conf->currency);
257 print '</td><td></td></tr>';
260 if (empty($conf->stripeconnect->enabled))
262 print '<tr class="oddeven"><td>';
263 print '<span class="fieldrequired">'.$langs->trans(
"STRIPE_LIVE_PUBLISHABLE_KEY").
'</span></td><td>';
264 print '<input class="minwidth300" type="text" name="STRIPE_LIVE_PUBLISHABLE_KEY" value="'.$conf->global->STRIPE_LIVE_PUBLISHABLE_KEY.
'">';
265 print ' <span class="opacitymedium">'.$langs->trans(
"Example").
': pk_live_xxxxxxxxxxxxxxxxxxxxxxxx</span>';
266 print '</td><td></td></tr>';
268 print '<tr class="oddeven"><td>';
269 print '<span class="fieldrequired">'.$langs->trans(
"STRIPE_LIVE_SECRET_KEY").
'</span></td><td>';
270 print '<input class="minwidth300" type="text" name="STRIPE_LIVE_SECRET_KEY" value="'.$conf->global->STRIPE_LIVE_SECRET_KEY.
'">';
271 print ' <span class="opacitymedium">'.$langs->trans(
"Example").
': sk_live_xxxxxxxxxxxxxxxxxxxxxxxx</span>';
272 print '</td><td></td></tr>';
274 print '<tr class="oddeven"><td>';
275 print '<span class="titlefield">'.$langs->trans(
"STRIPE_LIVE_WEBHOOK_KEY").
'</span></td><td>';
276 if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
277 print '<input class="minwidth300" type="text" name="STRIPE_LIVE_WEBHOOK_ID" value="'.$conf->global->STRIPE_LIVE_WEBHOOK_ID.
'">';
278 print ' <span class="opacitymedium">'.$langs->trans(
"Example").
': we_xxxxxxxxxxxxxxxxxxxxxxxx</span><br>';
280 print '<input class="minwidth300" type="text" name="STRIPE_LIVE_WEBHOOK_KEY" value="'.$conf->global->STRIPE_LIVE_WEBHOOK_KEY.
'">';
281 print ' <span class="opacitymedium">'.$langs->trans(
"Example").
': whsec_xxxxxxxxxxxxxxxxxxxxxxxx</span>';
282 $out =
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForLiveWebhook").
'</span> ';
284 $out .=
'<input type="text" id="onlinelivewebhookurl" class="minwidth500" value="'.$url.
'" disabled>';
288 if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
290 if (!empty($conf->global->STRIPE_LIVE_WEBHOOK_KEY) && !empty($conf->global->STRIPE_LIVE_SECRET_KEY) && !empty($conf->global->STRIPE_LIVE_WEBHOOK_ID))
292 \Stripe\Stripe::setApiKey($conf->global->STRIPE_LIVE_SECRET_KEY);
293 $endpoint = \Stripe\WebhookEndpoint::retrieve($conf->global->STRIPE_LIVE_WEBHOOK_ID);
294 $endpoint->enabled_events = $stripearrayofwebhookevents;
295 if (
GETPOST(
'webhook',
'alpha') == $conf->global->STRIPE_LIVE_WEBHOOK_ID) {
296 if (empty(
GETPOST(
'status',
'alpha'))) {
297 $endpoint->disabled =
true;
299 $endpoint->disabled =
false;
304 if ($endpoint->status ==
'enabled')
306 print '<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=ipn&webhook='.$endpoint->id.
'&status=0">';
309 print '<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=ipn&webhook='.$endpoint->id.
'&status=1">';
319 print '<tr class="oddeven"><td>'.$langs->trans(
"StripeConnect").
'</td>';
320 print '<td>'.$langs->trans(
"StripeConnect_Mode").
'</td><td></td></tr>';
330 print '<div class="div-table-responsive-no-min">';
331 print '<table class="noborder centpercent">';
332 print '<tr class="liste_titre">';
333 print '<td>'.$langs->trans(
"UsageParameter").
'</td>';
334 print '<td>'.$langs->trans(
"Value").
'</td>';
337 print '<tr class="oddeven"><td>';
338 print $langs->trans(
"PublicVendorName").
'</td><td>';
339 print '<input class="minwidth300" type="text" name="ONLINE_PAYMENT_CREDITOR" value="'.$conf->global->ONLINE_PAYMENT_CREDITOR.
'">';
340 print ' <span class="opacitymedium">'.$langs->trans(
"Example").
': '.$mysoc->name.
'</span>';
343 print '<tr class="oddeven"><td>';
344 print $langs->trans(
"StripeUserAccountForActions").
'</td><td>';
345 print img_picto(
'',
'user').$form->select_dolusers($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS,
'STRIPE_USER_ACCOUNT_FOR_ACTIONS', 0);
348 print '<tr class="oddeven"><td>';
349 print $langs->trans(
"BankAccount").
'</td><td>';
351 $form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS,
'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0,
'', 1);
354 if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
356 print '<tr class="oddeven"><td>';
357 print $langs->trans(
"BankAccountForBankTransfer").
'</td><td>';
358 $form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS,
'STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS', 0,
'', 1);
363 if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
365 print '<tr class="oddeven"><td>';
366 print $langs->trans(
"STRIPE_PAYMENT_REQUEST_API").
'</td><td>';
367 if ($conf->use_javascript_ajax) {
370 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
371 print $form->selectarray(
"STRIPE_PAYMENT_REQUEST_API", $arrval, $conf->global->STRIPE_PAYMENT_REQUEST_API);
377 if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
379 print '<tr class="oddeven"><td>';
380 print $langs->trans(
"STRIPE_SEPA_DIRECT_DEBIT").
'</td><td>';
381 if ($conf->use_javascript_ajax) {
384 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
385 print $form->selectarray(
"STRIPE_SEPA_DIRECT_DEBIT", $arrval, $conf->global->STRIPE_SEPA_DIRECT_DEBIT);
391 if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
393 print '<tr class="oddeven"><td>';
394 print $langs->trans(
"STRIPE_IDEAL").
'</td><td>';
395 if ($conf->use_javascript_ajax) {
398 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
399 print $form->selectarray(
"STRIPE_IDEAL", $arrval, $conf->global->STRIPE_SEPA_DIRECT_DEBIT);
401 print ' <span class="opacitymedium">'.$langs->trans(
"ExampleOnlyForNLCustomers").
'</span>';
414 print '<tr class="oddeven"><td>';
415 print $langs->trans(
"CSSUrlForPaymentForm").
'</td><td>';
416 print '<input size="64" type="text" name="ONLINE_PAYMENT_CSS_URL" value="'.$conf->global->ONLINE_PAYMENT_CSS_URL.
'">';
417 print ' <span class="opacitymedium">'.$langs->trans(
"Example").
': http://mysite/mycss.css</span>';
420 print '<tr class="oddeven"><td>';
421 print $langs->trans(
"MessageForm").
'</td><td>';
422 $doleditor =
new DolEditor(
'ONLINE_PAYMENT_MESSAGE_FORM', $conf->global->ONLINE_PAYMENT_MESSAGE_FORM,
'', 100,
'dolibarr_details',
'In',
false,
true,
true, ROWS_2,
'90%');
423 $doleditor->Create();
426 print '<tr class="oddeven"><td>';
427 print $langs->trans(
"MessageOK").
'</td><td>';
428 $doleditor =
new DolEditor(
'ONLINE_PAYMENT_MESSAGE_OK', $conf->global->ONLINE_PAYMENT_MESSAGE_OK,
'', 100,
'dolibarr_details',
'In',
false,
true,
true, ROWS_2,
'90%');
429 $doleditor->Create();
432 print '<tr class="oddeven"><td>';
433 print $langs->trans(
"MessageKO").
'</td><td>';
434 $doleditor =
new DolEditor(
'ONLINE_PAYMENT_MESSAGE_KO', $conf->global->ONLINE_PAYMENT_MESSAGE_KO,
'', 100,
'dolibarr_details',
'In',
false,
true,
true, ROWS_2,
'90%');
435 $doleditor->Create();
438 print '<tr class="oddeven"><td>';
439 print $langs->trans(
"ONLINE_PAYMENT_SENDEMAIL").
'</td><td>';
440 print '<input class="minwidth200" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="'.$conf->global->ONLINE_PAYMENT_SENDEMAIL.
'">';
441 print ' <span class="opacitymedium">'.$langs->trans(
"Example").
': myemail@myserver.com, Payment service <myemail2@myserver2.com></span>';
449 print '<div class="div-table-responsive-no-min">';
450 print '<table class="noborder centpercent">';
452 print '<tr class="liste_titre">';
453 print '<td>'.$langs->trans(
"UrlGenerationParameters").
'</td>';
454 print '<td>'.$langs->trans(
"Value").
'</td>';
458 print '<tr class="oddeven"><td>';
459 print $langs->trans(
"SecurityToken").
'</td><td>';
460 print '<input class="minwidth300" type="text" id="PAYMENT_SECURITY_TOKEN" name="PAYMENT_SECURITY_TOKEN" value="'.$conf->global->PAYMENT_SECURITY_TOKEN.
'">';
461 if (!empty($conf->use_javascript_ajax)) {
462 print ' '.img_picto($langs->trans(
'Generate'),
'refresh',
'id="generate_token" class="linkobject"');
464 if (!empty($conf->global->PAYMENT_SECURITY_ACCEPT_ANY_TOKEN)) {
465 $langs->load(
"errors");
466 print img_warning($langs->trans(
"WarningTheHiddenOptionIsOn",
'PAYMENT_SECURITY_ACCEPT_ANY_TOKEN'),
'',
'pictowarning marginleftonly');
470 print '<tr class="oddeven"><td>';
471 print $langs->trans(
"SecurityTokenIsUnique").
'</td><td>';
472 if ($conf->use_javascript_ajax) {
475 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
476 print $form->selectarray(
"PAYMENT_SECURITY_TOKEN_UNIQUE", $arrval, $conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE);
485 print '<div class="center"><input type="submit" class="button button-save" value="'.$langs->trans(
"Save").
'"></div>';
494 include DOL_DOCUMENT_ROOT.
'/core/tpl/onlinepaymentlinks.tpl.php';
496 print info_admin($langs->trans(
"ExampleOfTestCreditCard",
'4242424242424242 (no 3DSecure) or 4000000000003063 (3DSecure required) or 4000002760003184 (3DSecure2 required on all transaction) or 4000003800000446 (3DSecure2 required the off-seesion allowed)',
'4000000000000101',
'4000000000000069',
'4000000000000341'));
498 if (!empty($conf->use_javascript_ajax))
500 print "\n".
'<script type="text/javascript">';
501 print '$(document).ready(function () {
503 $("#apidoca").click(function() {
504 console.log("We click on apidoca show/hide");
506 $("#apidoca").hide();
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dolibarr_set_const($db, $name, $value, $type= 'chaine', $visible=0, $note= '', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
img_warning($titlealt= 'default', $moreatt= '', $morecss= 'pictowarning')
Show warning logo.
price($amount, $form=0, $outlangs= '', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code= '')
Function to format a value into an amount for visual output Function used into PDF and HTML pages...
stripeadmin_prepare_head()
Define head array for tabs of stripe tools setup pages.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, $strict=0, $forcereload=0, $marginleftonlyshort=2, $forcenoajax=0)
On/off button for constant.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
ajax_autoselect($htmlname, $addlink= '')
Make content of an input box selected when we click into input field.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Class to manage a WYSIWYG editor.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin= '1', $morecss= '', $textfordropdown= '')
Show information for admin users or standard users.