Standardize code: Property product_libelle renamed into product_label
Move common vars declaration into parent class.
This commit is contained in:
parent
ad461a098b
commit
fcd4645509
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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))
|
||||
{
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user