From d0a4541b28985f945946c3a03c968fe2c62aba39 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Thu, 4 Sep 2025 15:00:47 +0200 Subject: [PATCH 1/3] Fix CI --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 071c187bc37..62d5c79eb8f 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -454,13 +454,13 @@ abstract class CommonObject public $mode_reglement_id; /** - * @var int Payment terms ID + * @var ?int Payment terms ID * @see setPaymentTerms() */ public $cond_reglement_id; /** - * @var int Demand reason ID + * @var ?int Demand reason ID */ public $demand_reason_id; From 5832cfc19828586b5bb061baed48227eec0a381c Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Thu, 4 Sep 2025 15:36:54 +0200 Subject: [PATCH 2/3] Fix CI --- htdocs/core/class/commoninvoice.class.php | 10 +++++----- htdocs/core/class/commonobject.class.php | 2 +- htdocs/fourn/class/fournisseur.commande.class.php | 12 ++++++------ htdocs/fourn/class/fournisseur.facture-rec.class.php | 4 ++-- htdocs/fourn/facture/card.php | 10 +++++----- htdocs/societe/class/societe.class.php | 4 ++-- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index fc85474bf05..fe5109273bf 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -81,24 +81,24 @@ abstract class CommonInvoice extends CommonObject public $date_lim_reglement; /** - * @var ?int + * @var ?int Payment term ID */ public $cond_reglement_id; // Id in llx_c_paiement /** - * @var string|int Code in llx_c_paiement + * @var string|int Code in llx_c_paiement */ public $cond_reglement_code; // Code in llx_c_paiement /** - * @var string + * @var string Label in llx_c_paiement */ public $cond_reglement_label; /** - * @var string Code in llx_c_paiement + * @var string Label for doc in llx_c_paiement */ public $cond_reglement_doc; /** - * @var ?int + * @var ?int Payment method ID (cheque, cash, ...) */ public $mode_reglement_id; /** diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 62d5c79eb8f..5a276f290e2 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -448,7 +448,7 @@ abstract class CommonObject public $barcode_type_coder; /** - * @var int Payment method ID (cheque, cash, ...) + * @var ?int Payment method ID (cheque, cash, ...) * @see setPaymentMethods() */ public $mode_reglement_id; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 1709f062f91..2cc0a1fbe1b 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -221,32 +221,32 @@ class CommandeFournisseur extends CommonOrder public $fk_project; /** - * @var int Payment conditions ID + * @var ?int Payment conditions ID */ public $cond_reglement_id; /** - * @var string Payment conditions code + * @var string Payment conditions code */ public $cond_reglement_code; /** - * @var string Payment conditions label + * @var string Payment conditions label */ public $cond_reglement_label; /** - * @var string Payment conditions label on documents + * @var string Payment conditions label on documents */ public $cond_reglement_doc; /** - * @var int Account ID + * @var int Account ID */ public $fk_account; /** - * @var int Payment choice ID + * @var ?int Payment choice ID */ public $mode_reglement_id; diff --git a/htdocs/fourn/class/fournisseur.facture-rec.class.php b/htdocs/fourn/class/fournisseur.facture-rec.class.php index 7c4e7075d18..c34c74545ee 100644 --- a/htdocs/fourn/class/fournisseur.facture-rec.class.php +++ b/htdocs/fourn/class/fournisseur.facture-rec.class.php @@ -152,7 +152,7 @@ class FactureFournisseurRec extends CommonInvoice public $fk_project; /** - * @var int + * @var ?int Payment method ID (cheque, cash, ...) */ public $mode_reglement_id; /** @@ -168,7 +168,7 @@ class FactureFournisseurRec extends CommonInvoice */ public $cond_reglement_doc; /** - * @var int + * @var int Payment term ID */ public $cond_reglement_id; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 9087cd0ad54..33e75052479 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -910,8 +910,8 @@ if (empty($reshook)) { $object->date_echeance = $datedue; $object->note_public = GETPOST('note_public', 'restricthtml'); $object->note_private = GETPOST('note_private', 'restricthtml'); - $object->cond_reglement_id = GETPOST('cond_reglement_id'); - $object->mode_reglement_id = GETPOST('mode_reglement_id'); + $object->cond_reglement_id = GETPOSTINT('cond_reglement_id'); + $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); $object->fk_account = GETPOSTINT('fk_account'); $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; $object->fk_project = ($tmpproject > 0) ? $tmpproject : null; @@ -1012,7 +1012,7 @@ if (empty($reshook)) { $object->ref_supplier = GETPOST('ref_supplier', 'alphanohtml'); $object->model_pdf = GETPOST('model', 'alphanohtml'); $object->fk_project = GETPOSTINT('projectid'); - $object->cond_reglement_id = (GETPOSTINT('type') == 3 ? 1 : GETPOST('cond_reglement_id')); + $object->cond_reglement_id = (GETPOSTINT('type') == 3 ? 1 : GETPOSTINT('cond_reglement_id')); $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); $object->fk_account = GETPOSTINT('fk_account'); $object->amount = (float) price2num(GETPOST('amount')); // FIXME: FactureFournisseur::$amount is deprecated and not used? @@ -1080,8 +1080,8 @@ if (empty($reshook)) { $object->date_echeance = $datedue; $object->note_public = GETPOST('note_public', 'restricthtml'); $object->note_private = GETPOST('note_private', 'restricthtml'); - $object->cond_reglement_id = GETPOST('cond_reglement_id'); - $object->mode_reglement_id = GETPOST('mode_reglement_id'); + $object->cond_reglement_id = GETPOSTINT('cond_reglement_id'); + $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); $object->fk_account = GETPOSTINT('fk_account'); $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; $object->fk_project = ($tmpproject > 0) ? $tmpproject : null; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 924ff7b988e..376ac87b836 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -574,11 +574,11 @@ class Societe extends CommonObject public $remise_supplier_percent; /** - * @var int + * @var ?int Default Payment method ID (cheque, cash, ...) */ public $mode_reglement_id; /** - * @var int + * @var ?int Default Payment term */ public $cond_reglement_id; /** From dd05531744530d9dba3f6e934385ee847a9653b4 Mon Sep 17 00:00:00 2001 From: Pratush Raj <82569386+pratushraj@users.noreply.github.com> Date: Thu, 4 Sep 2025 20:14:41 +0530 Subject: [PATCH 3/3] #35216 (#35217) Co-authored-by: Laurent Destailleur --- htdocs/comm/mailing/cibles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 1c1cd8eb9af..ec93e7dd24f 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -113,7 +113,7 @@ if (empty($action) && empty($object->id)) { accessforbidden('Object not found'); } -$permissiontoread = $user->hasRight('maling', 'lire'); +$permissiontoread = $user->hasRight('mailing', 'lire'); $permissiontocreate = $user->hasRight('mailing', 'creer'); $permissiontovalidatesend = $user->hasRight('mailing', 'valider'); $permissiontodelete = $user->hasRight('mailing', 'supprimer');