浏览代码

Fix some warnings -technical debt- (#26514)

* fix-warnings

* fix the last commit

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Mohamed DAOUD 1 年之前
父节点
当前提交
eba4756156

+ 9 - 0
htdocs/core/modules/rapport/pdf_paiement.class.php

@@ -53,6 +53,15 @@ class pdf_paiement extends CommonDocGenerator
 
 	public $doc_type;
 
+	/**
+	 * @var int
+	 */
+	public $year;
+
+	/**
+	 * @var int
+	 */
+	public $month;
 
 	/**
 	 *  Constructor

+ 5 - 0
htdocs/core/modules/societe/mod_codecompta_aquarium.php

@@ -36,6 +36,11 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
 	 */
 	public $name = 'Aquarium';
 
+	/**
+	 * @var string
+	 */
+	public $code;
+
 	/**
 	 * Dolibarr version of the loaded document
 	 * @var string

+ 7 - 0
htdocs/core/modules/societe/mod_codecompta_digitaria.php

@@ -57,6 +57,13 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
 
 	public $position = 30;
 
+	/**
+	 * @var string
+	 */
+	public $code;
+	public $customeraccountancycodecharacternumber;
+	public $supplieraccountancycodecharacternumber;
+
 
 	/**
 	 * 	Constructor

+ 5 - 0
htdocs/core/modules/societe/mod_codecompta_panicum.php

@@ -35,6 +35,11 @@ class mod_codecompta_panicum extends ModeleAccountancyCode
 	 */
 	public $name = 'Panicum';
 
+	/**
+	 * @var string
+	 */
+	public $code;
+
 	/**
 	 * Dolibarr version of the loaded document
 	 * @var string

+ 25 - 0
htdocs/core/modules/societe/modules_societe.class.php

@@ -59,6 +59,25 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator
  */
 abstract class ModeleThirdPartyCode extends CommonNumRefGenerator
 {
+
+	/**
+	 * @var int Automatic numbering
+	 */
+	public $code_auto;
+
+	/**
+	 * @var string Editable code
+	 */
+	public $code_modifiable;
+
+	public $code_modifiable_invalide; // Modified code if it is invalid
+
+	/**
+	 * @var int Code facultatif
+	 */
+	public $code_null;
+
+
 	/**
 	 *  Return next value available
 	 *
@@ -192,6 +211,12 @@ abstract class ModeleThirdPartyCode extends CommonNumRefGenerator
  */
 abstract class ModeleAccountancyCode extends CommonNumRefGenerator
 {
+
+	/**
+	 * @var string
+	 */
+	public $code;
+
 	/**
 	 *  Return description of module parameters
 	 *

+ 13 - 3
htdocs/don/class/don.class.php

@@ -113,6 +113,17 @@ class Don extends CommonObject
 	public $phone;
 	public $phone_mobile;
 
+
+	/**
+	 * @var string
+	 */
+	public $mode_reglement;
+
+	/**
+	 * @var string
+	 */
+	public $mode_reglement_code;
+
 	/**
 	 * @var int 0 or 1
 	 */
@@ -628,8 +639,8 @@ class Don extends CommonObject
 	public function fetch($id, $ref = '')
 	{
 		$sql = "SELECT d.rowid, d.datec, d.date_valid, d.tms as datem, d.datedon,";
-		$sql .= " d.fk_soc as socid,d.firstname, d.lastname, d.societe, d.amount, d.fk_statut as status, d.address, d.zip, d.town, ";
-		$sql .= " d.fk_country, d.country as country_olddata, d.public, d.amount, d.fk_payment, d.paid, d.note_private, d.note_public, d.email, d.phone, ";
+		$sql .= " d.fk_soc as socid, d.firstname, d.lastname, d.societe, d.amount, d.fk_statut as status, d.address, d.zip, d.town, ";
+		$sql .= " d.fk_country, d.public, d.amount, d.fk_payment, d.paid, d.note_private, d.note_public, d.email, d.phone, ";
 		$sql .= " d.phone_mobile, d.fk_projet as fk_project, d.model_pdf,";
 		$sql .= " p.ref as project_ref,";
 		$sql .= " cp.libelle as payment_label, cp.code as payment_code,";
@@ -672,7 +683,6 @@ class Don extends CommonObject
 				$this->country_id         = $obj->fk_country;
 				$this->country_code       = $obj->country_code;
 				$this->country            = $obj->country;
-				$this->country_olddata    = $obj->country_olddata; // deprecated
 				$this->email              = $obj->email;
 				$this->phone              = $obj->phone;
 				$this->phone_mobile       = $obj->phone_mobile;

+ 17 - 0
htdocs/expedition/class/expedition.class.php

@@ -151,6 +151,23 @@ class Expedition extends CommonObject
 	// A denormalized value
 	public $trueSize;
 
+	public $livraison_id;
+
+	/**
+	 * @var double
+	 */
+	public $multicurrency_subprice;
+
+	public $size_units;
+
+	public $sizeH;
+
+	public $sizeS;
+
+	public $sizeW;
+
+	public $weight;
+
 	/**
 	 * @var integer|string Date delivery planed
 	 */

+ 17 - 0
htdocs/expensereport/class/expensereport.class.php

@@ -74,6 +74,18 @@ class ExpenseReport extends CommonObject
 
 	public $date_fin;
 
+	/**
+	 * @var int|string
+	 */
+	public $date_approbation;
+
+	/**
+	 * @var int ID
+	 */
+	public $fk_user;
+
+	public $user_approve_id;
+
 	/**
 	 * 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=paid, 99=denied
 	 *
@@ -2824,6 +2836,11 @@ class ExpenseReportLine extends CommonObjectLine
 	public $value_unit;
 	public $date;
 
+	/**
+	 * @var int|string
+	 */
+	public $dates;
+
 	/**
 	 * @var int ID
 	 */

+ 15 - 0
htdocs/expensereport/class/paymentexpensereport.class.php

@@ -86,6 +86,21 @@ class PaymentExpenseReport extends CommonObject
 	public $type_code;
 	public $type_label;
 
+	/**
+	 * @var int
+	 */
+	public $bank_account;
+
+	/**
+	 * @var int
+	 */
+	public $bank_line;
+
+	/**
+	 * @var string
+	 */
+	public $label;
+
 
 	/**
 	 *	Constructor

+ 10 - 0
htdocs/exports/class/export.class.php

@@ -35,6 +35,16 @@ class Export
 	 */
 	public $db;
 
+	/**
+	 * @var int
+	 */
+	public $id;
+
+	public $array_export_icon;
+
+	public $array_export_perms;
+
+
 	/**
 	 * @var string Last error message
 	 */

+ 24 - 4
htdocs/fichinter/class/fichinterrec.class.php

@@ -50,13 +50,14 @@ class FichinterRec extends Fichinter
 	/**
 	 * {@inheritdoc}
 	 */
-	protected $table_ref_field = 'titre';
+	protected $table_ref_field = 'title';
 
 	/**
 	 * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
 	 */
 	public $picto = 'intervention';
 
+
 	/**
 	 * @var string title
 	 */
@@ -67,6 +68,25 @@ class FichinterRec extends Fichinter
 	public $tva;
 	public $total;
 
+	/**
+	 * @var int
+	 */
+	public $auto_validate;
+
+	/**
+	 * @var int Frequency
+	 */
+	public $frequency;
+
+	public $id_origin;
+
+	public $statuts_logo;
+
+	/**
+	 * @var string Unit frequency
+	 */
+	public $unit_frequency;
+
 	/**
 	 * @var int Proposal Id
 	 */
@@ -156,7 +176,7 @@ class FichinterRec extends Fichinter
 
 		if ($result > 0) {
 			$sql = "INSERT INTO ".MAIN_DB_PREFIX."fichinter_rec (";
-			$sql .= "titre";
+			$sql .= "title";
 			$sql .= ", fk_soc";
 			$sql .= ", entity";
 			$sql .= ", datec";
@@ -268,7 +288,7 @@ class FichinterRec extends Fichinter
 	 */
 	public function fetch($rowid = 0, $ref = '', $ref_ext = '')
 	{
-		$sql = 'SELECT f.titre as title, f.fk_soc';
+		$sql = 'SELECT f.title as title, f.fk_soc';
 		$sql .= ', f.datec, f.duree, f.fk_projet, f.fk_contrat, f.description';
 		$sql .= ', f.note_private, f.note_public, f.fk_user_author';
 		$sql .= ', f.frequency, f.unit_frequency, f.date_when, f.date_last_gen, f.nb_gen_done, f.nb_gen_max, f.auto_validate';
@@ -277,7 +297,7 @@ class FichinterRec extends Fichinter
 		if ($rowid > 0) {
 			$sql .= " WHERE f.rowid = ".((int) $rowid);
 		} elseif ($ref) {
-			$sql .= " WHERE f.titre = '".$this->db->escape($ref)."'";
+			$sql .= " WHERE f.title = '".$this->db->escape($ref)."'";
 		}
 
 		dol_syslog(get_class($this)."::fetch rowid=".$rowid, LOG_DEBUG);