Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 21.0

This commit is contained in:
Laurent Destailleur (aka Eldy) 2025-01-24 21:20:44 +01:00
commit 2efc4a7a49
9 changed files with 37 additions and 59 deletions

View File

@ -5457,7 +5457,7 @@ parameters:
-
message: '#^Variable \$i might not be defined\.$#'
identifier: variable.undefined
count: 4
count: 3
path: ../../htdocs/compta/facture/card.php
-
@ -6582,12 +6582,6 @@ parameters:
count: 1
path: ../../htdocs/compta/sociales/card.php
-
message: '#^Variable \$resteapayer might not be defined\.$#'
identifier: variable.undefined
count: 3
path: ../../htdocs/compta/sociales/card.php
-
message: '#^Negated boolean expression is always true\.$#'
identifier: booleanNot.alwaysTrue
@ -9096,12 +9090,6 @@ parameters:
count: 1
path: ../../htdocs/core/class/commonobject.class.php
-
message: '#^Parameter \#17 \$pa_ht of method Commande\:\:updateline\(\) expects int, float given\.$#'
identifier: argument.type
count: 1
path: ../../htdocs/core/class/commonobject.class.php
-
message: '#^Parameter \#2 \$line of method CommonObject\:\:printObjectLine\(\) expects CommonObjectLine, CommonObject\|stdClass given\.$#'
identifier: argument.type
@ -20244,12 +20232,6 @@ parameters:
count: 2
path: ../../htdocs/fourn/commande/dispatch.php
-
message: '#^Variable \$reception might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/fourn/commande/dispatch.php
-
message: '#^If condition is always false\.$#'
identifier: if.alwaysFalse
@ -22854,12 +22836,6 @@ parameters:
count: 2
path: ../../htdocs/loan/class/loanschedule.class.php
-
message: '#^Negated boolean expression is always true\.$#'
identifier: booleanNot.alwaysTrue
count: 1
path: ../../htdocs/loan/class/paymentloan.class.php
-
message: '#^Property PaymentLoan\:\:\$amount_capital \(float\|int\) in isset\(\) is not nullable\.$#'
identifier: isset.property
@ -28734,12 +28710,6 @@ parameters:
count: 16
path: ../../htdocs/public/webportal/webportal.main.inc.php
-
message: '#^Variable \$logged_partnership might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/public/webportal/webportal.main.inc.php
-
message: '#^Negated boolean expression is always false\.$#'
identifier: booleanNot.alwaysFalse
@ -30315,7 +30285,7 @@ parameters:
-
message: '#^Ternary operator condition is always true\.$#'
identifier: ternary.alwaysTrue
count: 4
count: 3
path: ../../htdocs/societe/card.php
-
@ -32581,14 +32551,14 @@ parameters:
path: ../../htdocs/variants/class/ProductAttributeValue.class.php
-
message: '#^Loose comparison using \!\= between ''ErrorProductAlready…'' and ''ErrorProductAlready…'' will always evaluate to false\.$#'
identifier: notEqual.alwaysFalse
message: '#^Call to function is_array\(\) with array\<mixed, mixed\> will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../../htdocs/variants/class/ProductCombination.class.php
-
message: '#^Negated boolean expression is always false\.$#'
identifier: booleanNot.alwaysFalse
message: '#^Loose comparison using \!\= between ''ErrorProductAlready…'' and ''ErrorProductAlready…'' will always evaluate to false\.$#'
identifier: notEqual.alwaysFalse
count: 1
path: ../../htdocs/variants/class/ProductCombination.class.php
@ -33289,7 +33259,7 @@ parameters:
path: ../../htdocs/website/index.php
-
message: '#^Comparison operation "\>\=" between 1 and 0 is always true\.$#'
message: '#^Comparison operation "\>\=" between 0\|1 and 0 is always true\.$#'
identifier: greaterOrEqual.alwaysTrue
count: 1
path: ../../htdocs/website/samples/wrapper.php
@ -33297,12 +33267,6 @@ parameters:
-
message: '#^If condition is always false\.$#'
identifier: if.alwaysFalse
count: 3
path: ../../htdocs/website/samples/wrapper.php
-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
count: 1
path: ../../htdocs/website/samples/wrapper.php

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2025 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
@ -28,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
class MembersTypes extends DolibarrApi
{
/**
* @var array $FIELDS Mandatory fields, checked when create and update object
* @var string[] Mandatory fields, checked when create and update object
*/
public static $FIELDS = array(
'label',
@ -84,6 +85,8 @@ class MembersTypes extends DolibarrApi
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.libelle:like:'SO-%') and (t.subscription:=:'1')"
* @param string $properties Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names
* @return array Array of member type objects
* @phan-return AdherentType[]
* @phpstan-return AdherentType[]
*
* @throws RestException
*/
@ -143,7 +146,9 @@ class MembersTypes extends DolibarrApi
/**
* Create member type object
*
* @param array $request_data Request data
* @param array $request_data Request data
* @phan-param ?array<string,string> $request_data
* @phpstan-param ?array<string,string> $request_data
* @return int ID of member type
*/
public function post($request_data = null)
@ -175,7 +180,9 @@ class MembersTypes extends DolibarrApi
*
* @param int $id ID of member type to update
* @param array $request_data Datas
* @return int
* @phan-param ?array<string,string> $request_data
* @phpstan-param ?array<string,string> $request_data
* @return Object
*/
public function put($id, $request_data = null)
{
@ -227,6 +234,8 @@ class MembersTypes extends DolibarrApi
*
* @param int $id member type ID
* @return array
* @phan-return array<string,array{code:int,message:string}>
* @phpstan-return array<string,array{code:int,message:string}>
*/
public function delete($id)
{
@ -261,8 +270,8 @@ class MembersTypes extends DolibarrApi
/**
* Validate fields before creating an object
*
* @param array|null $data Data to validate
* @return array
* @param ?array<null|int|float|string> $data Data to validate
* @return array<string,null|int|float|string>
*
* @throws RestException
*/

View File

@ -4,7 +4,7 @@
* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2006 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 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
@ -1204,10 +1204,10 @@ class Conf extends stdClass
// For modules that want to disable top or left menu
if (!empty($this->global->MAIN_HIDE_TOP_MENU)) {
$this->dol_hide_topmenu = getDolGlobalString('MAIN_HIDE_TOP_MENU');
$this->dol_hide_topmenu = getDolGlobalInt('MAIN_HIDE_TOP_MENU');
}
if (!empty($this->global->MAIN_HIDE_LEFT_MENU)) {
$this->dol_hide_leftmenu = getDolGlobalString('MAIN_HIDE_LEFT_MENU');
$this->dol_hide_leftmenu = getDolGlobalInt('MAIN_HIDE_LEFT_MENU');
}
if (empty($this->global->MAIN_SIZE_SHORTLIST_LIMIT)) {

View File

@ -4,6 +4,7 @@
* 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2023 Benjamin Falière <benjamin.faliere@altairis.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025 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
@ -178,6 +179,7 @@ class InterfaceTicketEmail extends DolibarrTriggers
if (!getDolGlobalString('TICKET_DISABLE_ALL_MAILS')) {
// Send email to assigned user
$sendto = $userstat->email;
$old_MAIN_MAIL_AUTOCOPY_TO = '';
if (!getDolGlobalString('TICKET_DISABLE_MAIL_AUTOCOPY_TO')) {
$old_MAIN_MAIL_AUTOCOPY_TO = $conf->global->MAIN_MAIL_AUTOCOPY_TO;
$conf->global->MAIN_MAIL_AUTOCOPY_TO = '';
@ -192,8 +194,7 @@ class InterfaceTicketEmail extends DolibarrTriggers
}
}
} else {
$this->error = $userstat->error;
$this->errors = $userstat->errors;
$this->setErrorsFromObject($userstat);
}
}

View File

@ -1253,6 +1253,7 @@ CommercialAffected=Sales representative assigned
CommercialsDisaffected=Sales representatives unlinked
CommercialDisaffected=Sales representative unlinked
Message=Message
Emailing=Emailing
Progression=Progress
YourMessage=Your message
YourMessageHasBeenReceived=Your message has been received. We will answer or contact you as soon as possible.

View File

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2016-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
@ -84,9 +84,6 @@ if (empty($reshook)) {
$morehtmlright = '';
$form = new Form($db);
if (isModEnabled('project')) {
$formproject = new FormProjets($db);
}
$title = $langs->trans("Loan").' - '.$langs->trans("Notes");
$help_url = 'EN:Module_Loan|FR:Module_Emprunt';
@ -109,6 +106,7 @@ if ($id > 0) {
$morehtmlref .= $form->editfieldval("Label", 'label', $object->label, $object, 0, 'string', '', null, null, '', 1);
// Project
if (isModEnabled('project')) {
$formproject = new FormProjets($db);
$langs->loadLangs(array("projects"));
$morehtmlref .= '<br>'.$langs->trans('Project').' : ';
if ($user->hasRight('loan', 'write')) {

View File

@ -169,7 +169,6 @@ $ErrorCode = $ErrorShortMsg = $ErrorLongMsg = $ErrorSeverityCode = '';
$object = new stdClass(); // For triggers
/** @var CommonObject $object */
$error = 0;

View File

@ -162,6 +162,12 @@ class SocieteAccount extends CommonObject
* @var string
*/
public $site;
/**
* @var int
*/
public $fk_website;
/**
* @var ?string
*/

View File

@ -386,7 +386,7 @@ $form->select_comptes(getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'), 'S
print '</td></tr>';
// Param to record automatically payouts (received from IPN payout.payed and payout.created)
// Param to record automatically payouts (received from IPN payout.paid and payout.created)
print '<tr class="oddeven"><td>';
print $langs->trans("StripeAutoRecordPayout").'</td><td>';
if ($conf->use_javascript_ajax) {