From fe816445f5089df18cfda9c4f05a9fd9c3481bbf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 1 May 2023 13:09:09 +0200 Subject: [PATCH] Fix warnings --- htdocs/commande/class/commande.class.php | 11 +++++++++++ htdocs/core/class/commondocgenerator.class.php | 5 +++++ htdocs/product/class/product.class.php | 5 +++++ htdocs/product/stock/class/productlot.class.php | 14 ++++++++++++++ 4 files changed, 35 insertions(+) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 14bcd684334..f9cb9cfb03f 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -102,6 +102,11 @@ class Commande extends CommonOrder */ public $ref_client; + /** + * @var string Thirdparty ref of order + */ + public $ref_customer; + /** * @var int Contact ID */ @@ -1245,6 +1250,7 @@ class Commande extends CommonOrder $this->date_validation = ''; if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) { $this->ref_client = ''; + $this->ref_customer = ''; } // Do not clone ref_ext @@ -1383,6 +1389,7 @@ class Commande extends CommonOrder $this->fk_delivery_address = $object->fk_delivery_address; $this->contact_id = $object->contact_id; $this->ref_client = $object->ref_client; + $this->ref_customer = $object->ref_client; if (empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN)) { $this->note_private = $object->note_private; @@ -2949,6 +2956,7 @@ class Commande extends CommonOrder if (!$error) { $this->oldcopy = clone $this; $this->ref_client = $ref_client; + $this->ref_customer = $ref_client; } if (!$notrigger && empty($error)) { @@ -3337,6 +3345,9 @@ class Commande extends CommonOrder if (isset($this->ref_client)) { $this->ref_client = trim($this->ref_client); } + if (isset($this->ref_customer)) { + $this->ref_customer = trim($this->ref_customer); + } if (isset($this->note) || isset($this->note_private)) { $this->note_private = (isset($this->note_private) ? trim($this->note_private) : trim($this->note)); } diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index fadbc1dc62b..11f2fca8226 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -106,6 +106,11 @@ abstract class CommonDocGenerator public $emetteur; + /** + * @var array Array of columns + */ + public $cols; + /** * Constructor diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index f0b7bcaf6a2..45758dc0e2e 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -390,9 +390,14 @@ class Product extends CommonObject public $stats_contrat = array(); public $stats_facture = array(); public $stats_commande_fournisseur = array(); + public $stats_expedition = array(); public $stats_reception = array(); + public $stats_mo = array(); + public $stats_bom = array(); public $stats_mrptoconsume = array(); public $stats_mrptoproduce = array(); + public $stats_facturerec = array(); + public $stats_facture_fournisseur = array(); //! Size of image public $imgWidth; diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index 58328197d3f..14172ae808b 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -57,6 +57,20 @@ class Productlot extends CommonObject */ public $ismultientitymanaged = 1; + public $stats_propale; + public $stats_commande; + public $stats_contrat; + public $stats_facture; + public $stats_commande_fournisseur; + public $stats_expedition; + public $stats_reception; + public $stats_mo; + public $stats_bom; + public $stats_mrptoconsume; + public $stats_mrptoproduce; + public $stats_facturerec; + public $stats_facture_fournisseur; + /** * 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')