From 54b6b199c729bdf61211182e5e8962d12655b3e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Wed, 4 Mar 2015 10:03:40 +0100 Subject: [PATCH] Documented missing properties and removed redundant documentation (cherry picked from commit 6124f6a) --- htdocs/commande/class/commande.class.php | 25 ++++++-- htdocs/core/class/commonorder.class.php | 37 ++++++++++++ .../class/fournisseur.commande.class.php | 58 +++++++++++++------ 3 files changed, 96 insertions(+), 24 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index cdf73d58c7e..a79483bd979 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1604,12 +1604,12 @@ class Commande extends CommonOrder $line = new OrderLine($this->db); - $line->rowid = $objp->rowid; // \deprecated + $line->rowid = $objp->rowid; $line->id = $objp->rowid; $line->fk_commande = $objp->fk_commande; - $line->commande_id = $objp->fk_commande; // \deprecated + $line->commande_id = $objp->fk_commande; $line->label = $objp->custom_label; - $line->desc = $objp->description; // Description ligne + $line->desc = $objp->description; $line->product_type = $objp->product_type; $line->qty = $objp->qty; $line->tva_tx = $objp->tva_tx; @@ -1635,11 +1635,11 @@ class Commande extends CommonOrder $line->special_code = $objp->special_code; $line->fk_parent_line = $objp->fk_parent_line; - $line->ref = $objp->product_ref; // TODO deprecated + $line->ref = $objp->product_ref; $line->product_ref = $objp->product_ref; - $line->libelle = $objp->product_label; // TODO deprecated + $line->libelle = $objp->product_label; $line->product_label = $objp->product_label; - $line->product_desc = $objp->product_desc; // Description produit + $line->product_desc = $objp->product_desc; $line->fk_product_type = $objp->fk_product_type; // Produit ou service $line->date_start = $this->db->jdate($objp->date_start); @@ -3236,6 +3236,19 @@ class OrderLine extends CommonOrderLine var $oldline; + /** + * Id of parent order + * @var int + */ + public $fk_commande; + + /** + * Id of parent order + * @var int + * @deprecated Use fk_commande + */ + public $commande_id; + // From llx_commandedet var $fk_parent_line; var $fk_facture; diff --git a/htdocs/core/class/commonorder.class.php b/htdocs/core/class/commonorder.class.php index eadf34d5583..b4882af8a58 100644 --- a/htdocs/core/class/commonorder.class.php +++ b/htdocs/core/class/commonorder.class.php @@ -39,12 +39,49 @@ abstract class CommonOrder extends CommonObject */ abstract class CommonOrderLine extends CommonObjectLine { + /** + * Product ref + * @var string + * @deprecated Use product_ref + */ + public $ref; + + /** + * Product ref + * @var string + */ + public $product_ref; + + /** + * Product label + * @var string + * @deprecated Use product_label + */ + public $libelle; + + /** + * Product label + * @var string + */ + public $product_label; + + /** + * Product description + * @var string + */ + public $product_desc; + /** * Quantity * @var int */ public $qty; + /** + * @deprecated + */ + var $price; + /** * Unit price before taxes * @var float diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index bc2e1e564b2..f3738fca2b4 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -241,14 +241,14 @@ class CommandeFournisseur extends CommonOrder $line->id = $objp->rowid; $line->rowid = $objp->rowid; - $line->desc = $objp->description; // Description ligne - $line->description = $objp->description; // Description ligne + $line->desc = $objp->description; + $line->description = $objp->description; $line->qty = $objp->qty; $line->tva_tx = $objp->tva_tx; $line->localtax1_tx = $objp->localtax1_tx; $line->localtax2_tx = $objp->localtax2_tx; - $line->subprice = $objp->subprice; // deprecated - $line->pu_ht = $objp->subprice; // Unit price HT + $line->subprice = $objp->subprice; + $line->pu_ht = $objp->subprice; $line->remise_percent = $objp->remise_percent; $line->total_ht = $objp->total_ht; $line->total_tva = $objp->total_tva; @@ -257,16 +257,16 @@ class CommandeFournisseur extends CommonOrder $line->total_ttc = $objp->total_ttc; $line->product_type = $objp->product_type; - $line->fk_product = $objp->fk_product; // Id du produit + $line->fk_product = $objp->fk_product; - $line->libelle = $objp->product_label; // TODO deprecated - $line->product_label = $objp->product_label; // Label produit - $line->product_desc = $objp->product_desc; // Description produit + $line->libelle = $objp->product_label; + $line->product_label = $objp->product_label; + $line->product_desc = $objp->product_desc; - $line->ref = $objp->product_ref; // TODO deprecated - $line->product_ref = $objp->product_ref; // Internal reference - $line->ref_fourn = $objp->ref_supplier; // TODO deprecated - $line->ref_supplier = $objp->ref_supplier; // Reference supplier + $line->ref = $objp->product_ref; + $line->product_ref = $objp->product_ref; + $line->ref_fourn = $objp->ref_supplier; + $line->ref_supplier = $objp->ref_supplier; $line->date_start = $this->db->jdate($objp->date_start); $line->date_end = $this->db->jdate($objp->date_end); @@ -2233,16 +2233,38 @@ class CommandeFournisseurLigne extends CommonOrderLine { public $element='commande_fournisseurdet'; public $table_element='commande_fournisseurdet'; + + /** + * Unit price without taxes + * @var float + */ + public $pu_ht; - var $date_start; + /** + * Unit price without taxes + * @var float + * @deprecated Use pu_ht + */ + public $subprice; + + + var $date_start; var $date_end; - // From llx_product - var $libelle; // Label produit - var $product_desc; // Description produit - // From llx_product_fournisseur_price - var $ref_fourn; // Ref supplier + + /** + * Supplier ref + * @var string + * @deprecated Use ref_supplier + */ + public $ref_fourn; + + /** + * Supplier reference + * @var string + */ + public $ref_supplier; /**