From 2a7f9378c93911aeb0e0a35c9cc817b910408ab0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Dec 2023 20:49:32 +0100 Subject: [PATCH] Doc --- ChangeLog | 4 +++- htdocs/fourn/class/fournisseur.facture-rec.class.php | 11 +++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d0da9d7a87b..a5d8b7c967e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -251,7 +251,9 @@ The following changes may create regressions for some external modules, but were * Endpoint for API /partnershipapi and /recruitment has been renamed into /partnerships and /recruitments to follow name conventions. * Hidden option ACCOUNTANCY_AUTOFIX_MISSING_LINK_TO_USEr_ON_SALARY_BANK_PAYMENT has been renamed into ACCOUNTANCY_AUTOFIX_MISSING_LINK_TO_USER_ON_SALARY_BANK_PAYMENT * The delete() method of AdherentType, Contact, Delivery, MultiCurrency, CurrencyRate now need $user as first parameter. - +* A very high number of class properties (with old name in french) are now deprecated in favor of the property name in english. + + ***** ChangeLog for 18.0.3 compared to 18.0.2 ***** FIX: #25793 Cannot add time spent (#26405) FIX: #26100 Ticket - On edit, list of closed project must be excluded (#26223) diff --git a/htdocs/fourn/class/fournisseur.facture-rec.class.php b/htdocs/fourn/class/fournisseur.facture-rec.class.php index ac232bd2eb1..ae0521a615e 100644 --- a/htdocs/fourn/class/fournisseur.facture-rec.class.php +++ b/htdocs/fourn/class/fournisseur.facture-rec.class.php @@ -83,6 +83,11 @@ class FactureFournisseurRec extends CommonInvoice public $ref_supplier; public $socid; + /** + * @deprecated + */ + public $fk_soc; + public $suspended; // status /** @@ -491,8 +496,10 @@ class FactureFournisseurRec extends CommonInvoice $sql .= " titre = '" . (!empty($this->title) ? $this->db->escape($this->title) : "")."'," ; $sql .= " ref_supplier = '". (!empty($this->ref_supplier) ? $this->db->escape($this->ref_supplier) : "")."',"; $sql .= " entity = ". (!empty($this->entity) ? ((int) $this->entity) : 1) . ','; - if ($this->fk_soc > 0) { - $sql .= " fk_soc = ". (int) $this->fk_soc. ','; + if (!empty($this->socid) && $this->socid > 0) { + $sql .= " fk_soc = ". ((int) $this->socid). ','; + } elseif (!empty($this->fk_soc) && $this->fk_soc > 0) { // For backward compatibility + $sql .= " fk_soc = ". ((int) $this->fk_soc). ','; } $sql .= " suspended = ". (!empty($this->suspended) ? ((int) $this->suspended) : 0) . ','; $sql .= " libelle = ". (!empty($this->libelle) ? "'".$this->db->escape($this->libelle)."'" : 'NULL') . ",";