Documented missing properties and removed redundant documentation

This commit is contained in:
Marcos García de La Fuente
2015-03-04 10:03:40 +01:00
parent 87092f7069
commit 6124f6ac15
3 changed files with 95 additions and 43 deletions

View File

@@ -1596,12 +1596,12 @@ class Commande extends CommonOrder
$line = new OrderLine($this->db); $line = new OrderLine($this->db);
$line->rowid = $objp->rowid; // \deprecated $line->rowid = $objp->rowid;
$line->id = $objp->rowid; $line->id = $objp->rowid;
$line->fk_commande = $objp->fk_commande; $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->label = $objp->custom_label;
$line->desc = $objp->description; // Description ligne $line->desc = $objp->description;
$line->product_type = $objp->product_type; $line->product_type = $objp->product_type;
$line->qty = $objp->qty; $line->qty = $objp->qty;
$line->tva_tx = $objp->tva_tx; $line->tva_tx = $objp->tva_tx;
@@ -1627,11 +1627,11 @@ class Commande extends CommonOrder
$line->special_code = $objp->special_code; $line->special_code = $objp->special_code;
$line->fk_parent_line = $objp->fk_parent_line; $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->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_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->fk_product_type = $objp->fk_product_type; // Produit ou service
$line->date_start = $this->db->jdate($objp->date_start); $line->date_start = $this->db->jdate($objp->date_start);
@@ -3226,6 +3226,19 @@ class OrderLine extends CommonOrderLine
var $oldline; 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 // From llx_commandedet
var $fk_parent_line; var $fk_parent_line;
var $fk_facture; var $fk_facture;
@@ -3249,26 +3262,6 @@ class OrderLine extends CommonOrderLine
*/ */
var $remise; var $remise;
/**
* @deprecated
*/
var $price;
// From llx_product
/**
* @deprecated Use product_ref
*/
var $ref;
/**
* @deprecated Use product_label
*/
var $libelle;
var $product_ref;
var $product_label; // Label produit
var $product_desc; // Description produit
// Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html) // Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
// Start and end date of the line // Start and end date of the line
var $date_start; var $date_start;

View File

@@ -39,12 +39,49 @@ abstract class CommonOrder extends CommonObject
*/ */
abstract class CommonOrderLine extends CommonObjectLine 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 * Quantity
* @var int * @var int
*/ */
public $qty; public $qty;
/**
* @deprecated
*/
var $price;
/** /**
* Unit price before taxes * Unit price before taxes
* @var float * @var float

View File

@@ -242,14 +242,14 @@ class CommandeFournisseur extends CommonOrder
$line->id = $objp->rowid; $line->id = $objp->rowid;
$line->rowid = $objp->rowid; $line->rowid = $objp->rowid;
$line->desc = $objp->description; // Description ligne $line->desc = $objp->description;
$line->description = $objp->description; // Description ligne $line->description = $objp->description;
$line->qty = $objp->qty; $line->qty = $objp->qty;
$line->tva_tx = $objp->tva_tx; $line->tva_tx = $objp->tva_tx;
$line->localtax1_tx = $objp->localtax1_tx; $line->localtax1_tx = $objp->localtax1_tx;
$line->localtax2_tx = $objp->localtax2_tx; $line->localtax2_tx = $objp->localtax2_tx;
$line->subprice = $objp->subprice; // deprecated $line->subprice = $objp->subprice;
$line->pu_ht = $objp->subprice; // Unit price HT $line->pu_ht = $objp->subprice;
$line->remise_percent = $objp->remise_percent; $line->remise_percent = $objp->remise_percent;
$line->total_ht = $objp->total_ht; $line->total_ht = $objp->total_ht;
$line->total_tva = $objp->total_tva; $line->total_tva = $objp->total_tva;
@@ -258,16 +258,16 @@ class CommandeFournisseur extends CommonOrder
$line->total_ttc = $objp->total_ttc; $line->total_ttc = $objp->total_ttc;
$line->product_type = $objp->product_type; $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->libelle = $objp->product_label;
$line->product_label = $objp->product_label; // Label produit $line->product_label = $objp->product_label;
$line->product_desc = $objp->product_desc; // Description produit $line->product_desc = $objp->product_desc;
$line->ref = $objp->product_ref; // TODO deprecated $line->ref = $objp->product_ref;
$line->product_ref = $objp->product_ref; // Internal reference $line->product_ref = $objp->product_ref;
$line->ref_fourn = $objp->ref_supplier; // TODO deprecated $line->ref_fourn = $objp->ref_supplier;
$line->ref_supplier = $objp->ref_supplier; // Reference supplier $line->ref_supplier = $objp->ref_supplier;
$line->date_start = $this->db->jdate($objp->date_start); $line->date_start = $this->db->jdate($objp->date_start);
$line->date_end = $this->db->jdate($objp->date_end); $line->date_end = $this->db->jdate($objp->date_end);
@@ -2179,15 +2179,37 @@ class CommandeFournisseur extends CommonOrder
*/ */
class CommandeFournisseurLigne extends CommonOrderLine class CommandeFournisseurLigne extends CommonOrderLine
{ {
/**
* Unit price without taxes
* @var float
*/
public $pu_ht;
/**
* Unit price without taxes
* @var float
* @deprecated Use pu_ht
*/
public $subprice;
var $date_start; var $date_start;
var $date_end; var $date_end;
// From llx_product
var $libelle; // Label produit
var $product_desc; // Description produit
// From llx_product_fournisseur_price // 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;
/** /**