mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
fix phpdoc (#32097)
* fix phpdoc * Update accountancycategory.class.php * fix phpstan * fix phpstan * fix phpstan * fix phan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
38da445ff7
commit
1b6ee9e654
|
|
@ -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\<mixed\>\|string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 3
|
||||
path: ../../htdocs/societe/paymentmodes.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#5 \$day of function dol_mktime expects int, array\<mixed\>\|string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 3
|
||||
path: ../../htdocs/societe/paymentmodes.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#6 \$year of function dol_mktime expects int, array\<mixed\>\|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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
|
||||
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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<string,float> Sum debit credit per month
|
||||
*/
|
||||
public $sdcpermonth;
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ if (!$user->admin) {
|
|||
|
||||
$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 @@ if ($action == 'edit') {
|
|||
|
||||
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 '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=testconnect&token='.newToken().'&date='.dol_now().'#formmailaftertstconnect">'.$langs->trans("DoTestServerAvailability").'</a>';
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1044,19 +1044,19 @@ if ($action == 'edit') {
|
|||
// 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 ? '<br><br>' : '').$langs->trans("WarningPHPMailSPFDMARC");
|
||||
$text .= /* ($text ? '<br><br>' : ''). */$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 ? '<br><br>' : '').$langs->trans("WarningPHPMailSPFDMARC");
|
||||
$text .= /* ($text ? '<br><br>' : ''). */$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 ? '<br><br>' : '').$langs->trans("WarningPHPMailSPF", getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD'));
|
||||
$text .= /* ($text ? '<br><br>' : ''). */$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]'
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ if ($action == 'update' && !GETPOST("cancel") && $user->hasRight('societe', 'con
|
|||
|
||||
$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';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Copyright (C) 2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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)) {
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
|
||||
// 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');
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'inclu
|
|||
|
||||
// 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
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'inclu
|
|||
|
||||
// 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');
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// 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
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ $arrayfields = dol_sort_array($arrayfields, 'position');
|
|||
|
||||
// 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 @@ if (empty($reshook)) {
|
|||
$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
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
|
||||
// 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');
|
||||
|
|
|
|||
|
|
@ -2182,7 +2182,7 @@ if ($action != 'dopayment') {
|
|||
});
|
||||
$("#dopayment_paybox").click(function(e){
|
||||
$("#div_dopayment_paybox").css( \'cursor\', \'wait\' );
|
||||
e.stopPropagation();
|
||||
e.stopPropagation();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
@ -2212,7 +2212,7 @@ if ($action != 'dopayment') {
|
|||
});
|
||||
$("#dopayment_stripe").click(function(e){
|
||||
$("#div_dopayment_stripe").css( \'cursor\', \'wait\' );
|
||||
e.stopPropagation();
|
||||
e.stopPropagation();
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
|
@ -2254,7 +2254,7 @@ if ($action != 'dopayment') {
|
|||
});
|
||||
$("#dopayment_paypal").click(function(e){
|
||||
$("#div_dopayment_paypal").css( \'cursor\', \'wait\' );
|
||||
e.stopPropagation();
|
||||
e.stopPropagation();
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
|
@ -2296,32 +2296,32 @@ if (preg_match('/^dopayment/', $action)) { // If we chose/clicked on the payme
|
|||
if (GETPOST('dopayment_stripe', 'alpha')) {
|
||||
// Personalized checkout
|
||||
print '<style>
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
/**
|
||||
* 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--focus {
|
||||
box-shadow: 0 1px 3px 0 #cfd7df;
|
||||
}
|
||||
|
||||
.StripeElement--invalid {
|
||||
border-color: #fa755a;
|
||||
}
|
||||
.StripeElement--invalid {
|
||||
border-color: #fa755a;
|
||||
}
|
||||
|
||||
.StripeElement--webkit-autofill {
|
||||
background-color: #fefde5 !important;
|
||||
}
|
||||
</style>';
|
||||
.StripeElement--webkit-autofill {
|
||||
background-color: #fefde5 !important;
|
||||
}
|
||||
</style>';
|
||||
|
||||
//print '<br>';
|
||||
|
||||
|
|
@ -2380,8 +2380,8 @@ if (preg_match('/^dopayment/', $action)) { // If we chose/clicked on the payme
|
|||
// $conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = 2 = use payment object (suggest both card payment mode but also sepa, ...)
|
||||
|
||||
print '
|
||||
<table id="dolpaymenttable" summary="Payment form" class="center centpercent">
|
||||
<tbody><tr><td class="textpublicpayment">';
|
||||
<table id="dolpaymenttable" summary="Payment form" class="center centpercent">
|
||||
<tbody><tr><td class="textpublicpayment">';
|
||||
|
||||
if (getDolGlobalString('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION')) {
|
||||
print '<div id="payment-request-button"><!-- A Stripe Element will be inserted here. --></div>';
|
||||
|
|
@ -2395,8 +2395,8 @@ if (preg_match('/^dopayment/', $action)) { // If we chose/clicked on the payme
|
|||
|
||||
if (getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION') == 1) {
|
||||
print '<div id="card-element">
|
||||
<!-- a Stripe Element will be inserted here. -->
|
||||
</div>';
|
||||
<!-- a Stripe Element will be inserted here. -->
|
||||
</div>';
|
||||
}
|
||||
if (getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION') == 2) {
|
||||
print '<div id="payment-element">
|
||||
|
|
@ -2405,8 +2405,8 @@ if (preg_match('/^dopayment/', $action)) { // If we chose/clicked on the payme
|
|||
}
|
||||
|
||||
print '<!-- Used to display form errors -->
|
||||
<div id="card-errors" role="alert"></div>
|
||||
</div>';
|
||||
<div id="card-errors" role="alert"></div>
|
||||
</div>';
|
||||
|
||||
print '<br>';
|
||||
print '<button class="button buttonpayment" style="text-align: center; padding-left: 0; padding-right: 0;" id="buttontopay" data-secret="'.(is_object($paymentintent) ? $paymentintent->client_secret : '').'">'.$langs->trans("ValidatePayment").'</button>';
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?php
|
||||
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr>
|
||||
* Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2023 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr>
|
||||
* Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2023 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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 @@ if (empty($reshook)) {
|
|||
$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 @@ if (empty($reshook)) {
|
|||
$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 @@ if ($socid && $action == 'edit' && $permissiontoaddupdatepaymentinformation) {
|
|||
print '<tr><td class="titlefield">'.$langs->trans("RUM").'</td>';
|
||||
print '<td><input class="minwidth300" type="text" name="rum" value="'.dol_escape_htmltag($companybankaccount->rum).'"></td></tr>';
|
||||
|
||||
$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 '<tr><td class="titlefield">'.$langs->trans("DateRUM").'</td>';
|
||||
print '<td>'.$form->selectDate($date_rum ? $date_rum : $companybankaccount->date_rum, 'date_rum', 0, 0, 1, 'date_rum', 1, 1).'</td></tr>';
|
||||
|
|
@ -2257,7 +2257,7 @@ if ($socid && $action == 'create' && $permissiontoaddupdatepaymentinformation) {
|
|||
print '<tr><td class="titlefieldcreate">'.$form->textwithpicto($langs->trans("RUM"), $langs->trans("RUMLong").'<br>'.$langs->trans("RUMWillBeGenerated")).'</td>';
|
||||
print '<td colspan="4"><input type="text" class="minwidth300" name="rum" value="'.GETPOST('rum', 'alpha').'"></td></tr>';
|
||||
|
||||
$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 '<tr><td class="titlefieldcreate">'.$langs->trans("DateRUM").'</td>';
|
||||
print '<td colspan="4">'.$form->selectDate($date_rum, 'date_rum', 0, 0, 1, 'date_rum', 1, 1).'</td></tr>';
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
|||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var ExtraFields $extrafields
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2022 Open-Dsi <support@open-dsi.fr>
|
||||
/* Copyright (C) 2022 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2022 Open-Dsi <support@open-dsi.fr>
|
||||
/* Copyright (C) 2022 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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 @@ if (empty($object) || !is_object($object)) {
|
|||
print "Error, template page can't be called as URL";
|
||||
exit(1);
|
||||
}
|
||||
/**
|
||||
* @var Translate $langs
|
||||
*
|
||||
* @var string $action
|
||||
*/
|
||||
|
||||
print "<!-- BEGIN PHP TEMPLATE productattributevalueline_title.tpl.php -->\n";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user