diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index f2aab587169..70df565cd2b 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3994,11 +3994,6 @@ class OrderLine extends CommonOrderLine public $fk_parent_line; public $fk_facture; - /** - * @var string Order lines label - */ - public $label; - public $ref_ext; public $fk_remise_except; @@ -4049,7 +4044,7 @@ class OrderLine extends CommonOrderLine $sql .= ' cd.info_bits, cd.total_ht, cd.total_tva, cd.total_localtax1, cd.total_localtax2, cd.total_ttc, cd.fk_product_fournisseur_price as fk_fournprice, cd.buy_price_ht as pa_ht, cd.rang, cd.special_code,'; $sql .= ' cd.fk_unit,'; $sql .= ' cd.fk_multicurrency, cd.multicurrency_code, cd.multicurrency_subprice, cd.multicurrency_total_ht, cd.multicurrency_total_tva, cd.multicurrency_total_ttc,'; - $sql .= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc, p.tobatch as product_tobatch,'; + $sql .= ' p.ref as product_ref, p.label as product_label, p.description as product_desc, p.tobatch as product_tobatch,'; $sql .= ' cd.date_start, cd.date_end'; $sql .= ' FROM '.MAIN_DB_PREFIX.'commandedet as cd'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON cd.fk_product = p.rowid'; @@ -4093,9 +4088,9 @@ class OrderLine extends CommonOrderLine $this->rang = $objp->rang; $this->ref = $objp->product_ref; // deprecated - $this->product_ref = $objp->product_ref; - $this->libelle = $objp->product_libelle; // deprecated - $this->product_label = $objp->product_libelle; + + $this->product_ref = $objp->product_ref; + $this->product_label = $objp->product_label; $this->product_desc = $objp->product_desc; $this->product_tobatch = $objp->product_tobatch; $this->fk_unit = $objp->fk_unit; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 8ec349c79f4..0c6b438b376 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -4738,10 +4738,7 @@ class FactureLigne extends CommonInvoiceLine public $fk_facture; //! Id parent line public $fk_parent_line; - /** - * @deprecated - */ - public $label; + //! Description ligne public $desc; public $ref_ext; // External reference of the line @@ -4771,21 +4768,6 @@ class FactureLigne extends CommonInvoiceLine public $date_start; public $date_end; - // From llx_product - /** - * @deprecated - * @see $product_ref - */ - public $ref; // Product ref (deprecated) - public $product_ref; // Product ref - /** - * @deprecated - * @see $product_label - */ - public $libelle; // Product label (deprecated) - public $product_label; // Product label - public $product_desc; // Description produit - public $skip_update_total; // Skip update price total for special lines /** @@ -4825,7 +4807,7 @@ class FactureLigne extends CommonInvoiceLine $sql .= ' fd.multicurrency_total_ht,'; $sql .= ' fd.multicurrency_total_tva,'; $sql .= ' fd.multicurrency_total_ttc,'; - $sql .= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc'; + $sql .= ' p.ref as product_ref, p.label as product_label, p.description as product_desc'; $sql .= ' FROM '.MAIN_DB_PREFIX.'facturedet as fd'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON fd.fk_product = p.rowid'; $sql .= ' WHERE fd.rowid = '.$rowid; @@ -4871,10 +4853,11 @@ class FactureLigne extends CommonInvoiceLine $this->marque_tx = $marginInfos[2]; $this->ref = $objp->product_ref; // deprecated - $this->product_ref = $objp->product_ref; - $this->libelle = $objp->product_libelle; // deprecated - $this->product_label = $objp->product_libelle; + + $this->product_ref = $objp->product_ref; + $this->product_label = $objp->product_label; $this->product_desc = $objp->product_desc; + $this->fk_unit = $objp->fk_unit; $this->fk_user_modif = $objp->fk_user_modif; $this->fk_user_author = $objp->fk_user_author; diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 98890744701..920dd42f515 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -815,6 +815,47 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php'; */ abstract class CommonInvoiceLine extends CommonObjectLine { + /** + * Custom label of line. Not used by default. + * @deprecated + */ + public $label; + + /** + * @deprecated + * @see $product_ref + */ + public $ref; // Product ref (deprecated) + /** + * @deprecated + * @see $product_label + */ + public $libelle; // Product label (deprecated) + + /** + * Type of the product. 0 for product 1 for service + * @var int + */ + public $product_type = 0; + + /** + * Product ref + * @var string + */ + public $product_ref; + + /** + * Product label + * @var string + */ + public $product_label; + + /** + * Product description + * @var string + */ + public $product_desc; + /** * Quantity * @var double @@ -827,12 +868,6 @@ abstract class CommonInvoiceLine extends CommonObjectLine */ public $subprice; - /** - * Type of the product. 0 for product 1 for service - * @var int - */ - public $product_type = 0; - /** * Id of corresponding product * @var int diff --git a/htdocs/core/class/commonorder.class.php b/htdocs/core/class/commonorder.class.php index 83d20e99b95..8874175a138 100644 --- a/htdocs/core/class/commonorder.class.php +++ b/htdocs/core/class/commonorder.class.php @@ -38,6 +38,12 @@ abstract class CommonOrder extends CommonObject */ abstract class CommonOrderLine extends CommonObjectLine { + /** + * Custom label of line. Not used by default. + * @deprecated + */ + public $label; + /** * Product ref * @var string @@ -46,12 +52,6 @@ abstract class CommonOrderLine extends CommonObjectLine */ public $ref; - /** - * Product ref - * @var string - */ - public $product_ref; - /** * Product label * @var string @@ -60,6 +60,12 @@ abstract class CommonOrderLine extends CommonObjectLine */ public $libelle; + /** + * Product ref + * @var string + */ + public $product_ref; + /** * Product label * @var string diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 300a5032a2c..df0bb21a318 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3291,11 +3291,6 @@ class CommandeFournisseurLigne extends CommonOrderLine */ public $fk_facture; - /** - * @var string supplier order line label - */ - public $label; - public $rang = 0; public $special_code = 0; @@ -3316,7 +3311,6 @@ class CommandeFournisseurLigne extends CommonOrderLine */ public $ref_supplier; public $remise; - public $product_libelle; /** @@ -3344,7 +3338,7 @@ class CommandeFournisseurLigne extends CommonOrderLine $sql .= ' cd.remise, cd.remise_percent, cd.subprice,'; $sql .= ' cd.info_bits, cd.total_ht, cd.total_tva, cd.total_ttc,'; $sql .= ' cd.total_localtax1, cd.total_localtax2,'; - $sql .= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc,'; + $sql .= ' p.ref as product_ref, p.label as product_label, p.description as product_desc,'; $sql .= ' cd.date_start, cd.date_end, cd.fk_unit,'; $sql .= ' cd.multicurrency_subprice, cd.multicurrency_total_ht, cd.multicurrency_total_tva, cd.multicurrency_total_ttc'; if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) @@ -3387,8 +3381,9 @@ class CommandeFournisseurLigne extends CommonOrderLine $this->special_code = $objp->special_code; $this->ref = $objp->product_ref; + $this->product_ref = $objp->product_ref; - $this->product_libelle = $objp->product_libelle; + $this->product_label = $objp->product_label; $this->product_desc = $objp->product_desc; if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 589c4e82fc9..1761215705b 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -98,12 +98,18 @@ class FactureFournisseur extends CommonInvoice */ public $ref; - public $label; - public $libelle; // @deprecated - - public $product_ref; + /** + * @var string Ref supplier + */ public $ref_supplier; + + /** + * @var string Label of invoice + */ + public $label; + public $socid; + //Check constants for types public $type = self::TYPE_STANDARD;