diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index 027b03a0df4bc..ddc424d9d08dd 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -312,12 +312,6 @@ parameters: count: 4 path: ../../htdocs/accountancy/class/accountancycategory.class.php - - - message: '#^Property AccountancyCategory\:\:\$sdcpermonth type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../htdocs/accountancy/class/accountancycategory.class.php - - message: '#^Property AccountancyCategory\:\:\$sens \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -1488,18 +1482,6 @@ parameters: count: 1 path: ../../htdocs/admin/mails.php - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 3 - path: ../../htdocs/admin/mails.php - - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 3 - path: ../../htdocs/admin/mails.php - - message: '#^Variable \$text in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -17382,24 +17364,6 @@ parameters: count: 2 path: ../../htdocs/core/tpl/list_print_total.tpl.php - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../htdocs/core/tpl/object_currency_amount.tpl.php - - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/core/tpl/object_currency_amount.tpl.php - - - - message: '#^Variable \$usercancreate might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/core/tpl/object_currency_amount.tpl.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -25026,18 +24990,6 @@ parameters: count: 2 path: ../../htdocs/modulebuilder/template/myobject_agenda.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_agenda.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_agenda.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -25059,19 +25011,7 @@ parameters: - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse - count: 3 - path: ../../htdocs/modulebuilder/template/myobject_card.php - - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_card.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 + count: 2 path: ../../htdocs/modulebuilder/template/myobject_card.php - @@ -25104,30 +25044,6 @@ parameters: count: 1 path: ../../htdocs/modulebuilder/template/myobject_card.php - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 5 - path: ../../htdocs/modulebuilder/template/myobject_card.php - - - - message: '#^Variable \$permissiontoadd in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_card.php - - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_contact.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_contact.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -25146,24 +25062,6 @@ parameters: count: 1 path: ../../htdocs/modulebuilder/template/myobject_contact.php - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 2 - path: ../../htdocs/modulebuilder/template/myobject_contact.php - - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_document.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_document.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -25194,18 +25092,6 @@ parameters: count: 1 path: ../../htdocs/modulebuilder/template/myobject_list.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_list.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_list.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -25224,24 +25110,6 @@ parameters: count: 1 path: ../../htdocs/modulebuilder/template/myobject_list.php - - - message: '#^Variable \$permissiontodelete in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_list.php - - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_note.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_note.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -32688,24 +32556,6 @@ parameters: count: 1 path: ../../htdocs/societe/paymentmodes.php - - - message: '#^Parameter \#4 \$month of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 3 - path: ../../htdocs/societe/paymentmodes.php - - - - message: '#^Parameter \#5 \$day of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 3 - path: ../../htdocs/societe/paymentmodes.php - - - - message: '#^Parameter \#6 \$year of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 3 - path: ../../htdocs/societe/paymentmodes.php - - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue @@ -32748,12 +32598,6 @@ parameters: count: 2 path: ../../htdocs/societe/price.php - - - message: '#^Variable \$extrafields might not be defined\.$#' - identifier: variable.undefined - count: 14 - path: ../../htdocs/societe/price.php - - message: '#^Variable \$prodcustprice might not be defined\.$#' identifier: variable.undefined @@ -34686,48 +34530,6 @@ parameters: count: 2 path: ../../htdocs/variants/list.php - - - message: '#^Cannot access property \$lines on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../htdocs/variants/tpl/productattributevalueline_create.tpl.php - - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/variants/tpl/productattributevalueline_create.tpl.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/variants/tpl/productattributevalueline_create.tpl.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/variants/tpl/productattributevalueline_create.tpl.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/variants/tpl/productattributevalueline_create.tpl.php - - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/variants/tpl/productattributevalueline_title.tpl.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/variants/tpl/productattributevalueline_title.tpl.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index d71dc306478c1..379e2b802e152 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2016 Jamal Elbaz * Copyright (C) 2016-2017 Alexandre Spangaro * Copyright (C) 2018-2024 Frédéric France - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -129,7 +129,7 @@ class AccountancyCategory // extends CommonObject public $sdc; /** - * @var array Sum debit credit per month + * @var array Sum debit credit per month */ public $sdcpermonth; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 02714bc87df7a..c54ca5dc0f4a8 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -55,7 +55,7 @@ $usersignature = $user->signature; // For action = test or send, we ensure that content is not html, even for signature, because for this we want a test with NO html. -if ($action == 'test' || ($action == 'send' && $trackid = 'test')) { +if ($action == 'test' || ($action == 'send' && $trackid == 'test')) { $usersignature = dol_string_nohtmltag($usersignature, 2); } @@ -1003,7 +1003,7 @@ function change_smtp_auth_method() { if (!getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) { if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') != 'mail' || !$linuxlike) { - if (function_exists('fsockopen') && $port && $server) { + if (function_exists('fsockopen') /* && $port && $server */) { // $port and $server can't be empty print ''.$langs->trans("DoTestServerAvailability").''; } } else { @@ -1044,19 +1044,19 @@ function change_smtp_auth_method() { // mthode php mail if (getDolGlobalString('MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD')) { // Not defined by default. Depend on platform. // List of string to add in SPF if the setup use the mail method. Example 'include:sendgrid.net include:spf.mydomain.com' - $text .= ($text ? '

' : '').$langs->trans("WarningPHPMailSPFDMARC"); + $text .= /* ($text ? '

' : ''). */$langs->trans("WarningPHPMailSPFDMARC"); } else { // MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS is list of IPs where email is sent from. Example: '1.2.3.4, [aaaa:bbbb:cccc:dddd]'. if (getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS')) { // List of IP shown as record to add in SPF if we use the mail method - $text .= ($text ? '

' : '').$langs->trans("WarningPHPMailSPFDMARC"); + $text .= /* ($text ? '

' : ''). */$langs->trans("WarningPHPMailSPFDMARC"); } } } else { // method smtps or swiftmail if (getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD')) { // Should be required only if you have preset the Dolibarr to use your own SMTP and you want to warn users to update their domain name to match your SMTP server. // List of string to add in SPF if we use the smtp method. Example 'include:spf.mydomain.com' - $text .= ($text ? '

' : '').$langs->trans("WarningPHPMailSPF", getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD')); + $text .= /* ($text ? '

' : ''). */$langs->trans("WarningPHPMailSPF", getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD')); } if (getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS')) { // Not defined by default. Depend on platform. // List of IP shown as record to add as allowed IP if we use the smtp method. Value is '1.2.3.4, [aaaa:bbbb:cccc:dddd]' diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 9316a38927b74..bb4027978b164 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -75,7 +75,7 @@ $result = $object->update_perso($id, $user); if ($result > 0) { - $object->oldcopy = dol_clone($object, 2); // @phan-suppres-current-line PhanTypeMismatchProperty + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty // Logo/Photo save $dir = $conf->societe->dir_output.'/contact/'.get_exdir($object->id, 0, 0, 1, $object, 'contact').'/photos'; diff --git a/htdocs/core/tpl/object_currency_amount.tpl.php b/htdocs/core/tpl/object_currency_amount.tpl.php index 73e7d78069f7d..5465d1d55e5c9 100644 --- a/htdocs/core/tpl/object_currency_amount.tpl.php +++ b/htdocs/core/tpl/object_currency_amount.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2024 Laurent Destailleur * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -24,8 +24,13 @@ * $langs */ /** + * @var CommonObject $object + * @var Conf $conf * @var Form $form * @var Translate $langs + * + * @var string $action + * @var int $usercancreate */ // Protection to avoid direct call of template if (empty($conf) || !is_object($conf)) { diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php index 05f1c17156c23..e1333cec3bc1f 100644 --- a/htdocs/modulebuilder/template/myobject_agenda.php +++ b/htdocs/modulebuilder/template/myobject_agenda.php @@ -146,7 +146,7 @@ // There is several ways to check permission. // Set $enablepermissioncheck to 1 to enable a minimum low level of checks -$enablepermissioncheck = 0; +$enablepermissioncheck = getDolGlobalInt('MYMODULE_ENABLE_PERMISSION_CHECK'); if ($enablepermissioncheck) { $permissiontoread = $user->hasRight('mymodule', 'myobject', 'read'); $permissiontoadd = $user->hasRight('mymodule', 'myobject', 'write'); diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 5b783ddbdcbc4..bcd37702167e4 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -150,7 +150,7 @@ // There is several ways to check permission. // Set $enablepermissioncheck to 1 to enable a minimum low level of checks -$enablepermissioncheck = 0; +$enablepermissioncheck = getDolGlobalInt('MYMODULE_ENABLE_PERMISSION_CHECK'); if ($enablepermissioncheck) { $permissiontoread = $user->hasRight('mymodule', 'myobject', 'read'); $permissiontoadd = $user->hasRight('mymodule', 'myobject', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php diff --git a/htdocs/modulebuilder/template/myobject_contact.php b/htdocs/modulebuilder/template/myobject_contact.php index 01e33e87a09d7..71082d7bb77d5 100644 --- a/htdocs/modulebuilder/template/myobject_contact.php +++ b/htdocs/modulebuilder/template/myobject_contact.php @@ -93,7 +93,7 @@ // There is several ways to check permission. // Set $enablepermissioncheck to 1 to enable a minimum low level of checks -$enablepermissioncheck = 0; +$enablepermissioncheck = getDolGlobalInt('MYMODULE_ENABLE_PERMISSION_CHECK'); if ($enablepermissioncheck) { $permissiontoread = $user->hasRight('mymodule', 'myobject', 'read'); $permissiontoadd = $user->hasRight('mymodule', 'myobject', 'write'); diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php index 9a9143c8392a1..c443e300e9cb2 100644 --- a/htdocs/modulebuilder/template/myobject_document.php +++ b/htdocs/modulebuilder/template/myobject_document.php @@ -140,7 +140,7 @@ // Permissions // (There are several ways to check permission.) // Set $enablepermissioncheck to 1 to enable a minimum low level of checks -$enablepermissioncheck = 0; +$enablepermissioncheck = getDolGlobalInt('MYMODULE_ENABLE_PERMISSION_CHECK'); if ($enablepermissioncheck) { $permissiontoread = $user->hasRight('mymodule', 'myobject', 'read'); $permissiontoadd = $user->hasRight('mymodule', 'myobject', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 2dd29e4144f04..6bde6bf10d175 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -203,7 +203,7 @@ // There is several ways to check permission. // Set $enablepermissioncheck to 1 to enable a minimum low level of checks -$enablepermissioncheck = 0; +$enablepermissioncheck = getDolGlobalInt('MYMODULE_ENABLE_PERMISSION_CHECK'); if ($enablepermissioncheck) { $permissiontoread = $user->hasRight('mymodule', 'myobject', 'read'); $permissiontoadd = $user->hasRight('mymodule', 'myobject', 'write'); @@ -274,6 +274,8 @@ $objectclass = 'MyObject'; $objectlabel = 'MyObject'; $uploaddir = $conf->mymodule->dir_output; + + global $error; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; // You can add more action here diff --git a/htdocs/modulebuilder/template/myobject_note.php b/htdocs/modulebuilder/template/myobject_note.php index eada8fdd0d26c..8d9f974a526eb 100644 --- a/htdocs/modulebuilder/template/myobject_note.php +++ b/htdocs/modulebuilder/template/myobject_note.php @@ -118,7 +118,7 @@ // There is several ways to check permission. // Set $enablepermissioncheck to 1 to enable a minimum low level of checks -$enablepermissioncheck = 0; +$enablepermissioncheck = getDolGlobalInt('MYMODULE_ENABLE_PERMISSION_CHECK'); if ($enablepermissioncheck) { $permissiontoread = $user->hasRight('mymodule', 'myobject', 'read'); $permissiontoadd = $user->hasRight('mymodule', 'myobject', 'write'); diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 6549601154234..275b4f6bb27d8 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -2182,7 +2182,7 @@ }); $("#dopayment_paybox").click(function(e){ $("#div_dopayment_paybox").css( \'cursor\', \'wait\' ); - e.stopPropagation(); + e.stopPropagation(); }); }); @@ -2212,7 +2212,7 @@ }); $("#dopayment_stripe").click(function(e){ $("#div_dopayment_stripe").css( \'cursor\', \'wait\' ); - e.stopPropagation(); + e.stopPropagation(); return true; }); }); @@ -2254,7 +2254,7 @@ }); $("#dopayment_paypal").click(function(e){ $("#div_dopayment_paypal").css( \'cursor\', \'wait\' ); - e.stopPropagation(); + e.stopPropagation(); return true; }); }); @@ -2296,32 +2296,32 @@ if (GETPOST('dopayment_stripe', 'alpha')) { // Personalized checkout print ''; + /** + * The CSS shown here will not be introduced in the Quickstart guide, but shows + * how you can use CSS to style your Element s container. + */ + .StripeElement { + background-color: white; + padding: 8px 12px; + border-radius: 4px; + border: 1px solid transparent; + box-shadow: 0 1px 3px 0 #e6ebf1; + -webkit-transition: box-shadow 150ms ease; + transition: box-shadow 150ms ease; + } + + .StripeElement--focus { + box-shadow: 0 1px 3px 0 #cfd7df; + } + + .StripeElement--invalid { + border-color: #fa755a; + } + + .StripeElement--webkit-autofill { + background-color: #fefde5 !important; + } + '; //print '
'; @@ -2380,8 +2380,8 @@ // $conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = 2 = use payment object (suggest both card payment mode but also sepa, ...) print ' - -
'; + + '; print ''; - $date_rum = dol_mktime(0, 0, 0, GETPOST('date_rummonth'), GETPOST('date_rumday'), GETPOST('date_rumyear')); + $date_rum = GETPOSTDATE('date_rum', '00:00:00'); print ''; print ''; @@ -2257,7 +2257,7 @@ print ''; print ''; - $date_rum = dol_mktime(0, 0, 0, GETPOST('date_rummonth'), GETPOST('date_rumday'), GETPOST('date_rumyear')); + $date_rum = GETPOSTDATE('date_rum', '00:00:00'); print ''; print ''; diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 5ae56bdd3d59a..24a7f838ad881 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -40,6 +40,7 @@ /** * @var Conf $conf * @var DoliDB $db + * @var ExtraFields $extrafields * @var HookManager $hookmanager * @var Societe $mysoc * @var Translate $langs diff --git a/htdocs/variants/tpl/productattributevalueline_create.tpl.php b/htdocs/variants/tpl/productattributevalueline_create.tpl.php index 0d5ee24fc8481..17d0824331889 100644 --- a/htdocs/variants/tpl/productattributevalueline_create.tpl.php +++ b/htdocs/variants/tpl/productattributevalueline_create.tpl.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2022 Open-Dsi + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,13 +25,22 @@ * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax) */ +/** + * @var CommonObject $this + * @var CommonObject $object + * @var HookManager $hookmanager + * @var Translate $langs + * + * @var string $action + */ + // Protection to avoid direct call of template if (empty($object) || !is_object($object)) { print "Error: this template page cannot be called directly as an URL"; exit; } -'@phan-var-force CommonObject $this +'@phan-var-force CommonObject $object @phan-var-force CommonObject $this'; global $forcetoshowtitlelines; diff --git a/htdocs/variants/tpl/productattributevalueline_title.tpl.php b/htdocs/variants/tpl/productattributevalueline_title.tpl.php index 79d4034422b5a..b970a1513a3b8 100644 --- a/htdocs/variants/tpl/productattributevalueline_title.tpl.php +++ b/htdocs/variants/tpl/productattributevalueline_title.tpl.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2022 Open-Dsi + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,6 +32,11 @@ print "Error, template page can't be called as URL"; exit(1); } +/** + * @var Translate $langs + * + * @var string $action + */ print "\n";
'; if (getDolGlobalString('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION')) { print '
'; @@ -2395,8 +2395,8 @@ if (getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION') == 1) { print '
- -
'; + + '; } if (getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION') == 2) { print '
@@ -2405,8 +2405,8 @@ } print ' - -
'; + + '; print '
'; print ''; diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 595943b584568..cacc2c3e002b3 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1,15 +1,15 @@ - * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2022 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2013 Peter Fontaine - * Copyright (C) 2015-2016 Marcos García - * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2018-2023 Thibault FOUCART - * Copyright (C) 2021 Alexandre Spangaro - * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2002-2004 Rodolphe Quiedeville + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2022 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2013 Peter Fontaine + * Copyright (C) 2015-2016 Marcos García + * Copyright (C) 2017 Ferran Marcet + * Copyright (C) 2018-2023 Thibault FOUCART + * Copyright (C) 2021 Alexandre Spangaro + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -199,7 +199,7 @@ $companybankaccount->owner_address = GETPOST('owner_address', 'alpha'); $companybankaccount->frstrecur = GETPOST('frstrecur', 'alpha'); $companybankaccount->rum = GETPOST('rum', 'alpha'); - $companybankaccount->date_rum = dol_mktime(0, 0, 0, GETPOST('date_rummonth'), GETPOST('date_rumday'), GETPOST('date_rumyear')); + $companybankaccount->date_rum = GETPOSTDATE('date_rum', '00:00:00'); if (empty($companybankaccount->rum)) { $companybankaccount->rum = $prelevement->buildRumNumber($object->code_client, $companybankaccount->datec, $companybankaccount->id); } @@ -331,7 +331,7 @@ $companybankaccount->owner_address = GETPOST('owner_address', 'alpha'); $companybankaccount->frstrecur = GETPOST('frstrecur', 'alpha'); $companybankaccount->rum = GETPOST('rum', 'alpha'); - $companybankaccount->date_rum = dol_mktime(0, 0, 0, GETPOSTINT('date_rummonth'), GETPOSTINT('date_rumday'), GETPOSTINT('date_rumyear')); + $companybankaccount->date_rum = GETPOSTDATE('date_rum', '00:00:00'); $companybankaccount->datec = dol_now(); //$companybankaccount->clos = GETPOSTINT('clos'); @@ -2088,7 +2088,7 @@ print '
'.$langs->trans("RUM").'
'.$langs->trans("DateRUM").''.$form->selectDate($date_rum ? $date_rum : $companybankaccount->date_rum, 'date_rum', 0, 0, 1, 'date_rum', 1, 1).'
'.$form->textwithpicto($langs->trans("RUM"), $langs->trans("RUMLong").'
'.$langs->trans("RUMWillBeGenerated")).'
'.$langs->trans("DateRUM").''.$form->selectDate($date_rum, 'date_rum', 0, 0, 1, 'date_rum', 1, 1).'