From bb18982f7885a74781090face331ad99cdceb8f4 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 23:24:59 +0200 Subject: [PATCH] Standardize and Update code --- .../class/supplier_proposal.class.php | 100 ++++++++++-------- htdocs/ticket/class/ticket.class.php | 5 +- htdocs/ticket/class/ticketlogs.class.php | 5 +- 3 files changed, 61 insertions(+), 49 deletions(-) diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index a9b44339930..547e9e9efcf 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -49,12 +49,12 @@ class SupplierProposal extends CommonObject * @var string ID to identify managed object */ public $element='supplier_proposal'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='supplier_proposal'; - + public $table_element_line='supplier_proposaldet'; public $fk_element='fk_supplier_proposal'; public $picto='propal'; @@ -2658,7 +2658,7 @@ class SupplierProposalLine extends CommonObjectLine * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ @@ -2668,31 +2668,32 @@ class SupplierProposalLine extends CommonObjectLine * @var string ID to identify managed object */ public $element='supplier_proposaldet'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='supplier_proposaldet'; - var $oldline; + public $oldline; // From llx_supplier_proposaldet - var $rowid; // deprecated - + public $rowid; // deprecated + /** * @var int ID */ public $id; - - var $fk_supplier_proposal; - var $fk_parent_line; - var $desc; // Description ligne - var $fk_product; // Id produit predefini + + public $fk_supplier_proposal; + public $fk_parent_line; + public $desc; // Description ligne + public $fk_product; // Id produit predefini + /** * @deprecated * @see product_type */ - var $fk_product_type; + public $fk_product_type; /** * Product type * @var int @@ -2700,89 +2701,94 @@ class SupplierProposalLine extends CommonObjectLine */ public $product_type = Product::TYPE_PRODUCT; - var $qty; - var $tva_tx; - var $subprice; - var $remise_percent; - var $fk_remise_except; + public $qty; + public $tva_tx; + public $subprice; + public $remise_percent; + public $fk_remise_except; - var $rang = 0; + public $rang = 0; - var $fk_fournprice; - var $pa_ht; - var $marge_tx; - var $marque_tx; + public $fk_fournprice; + public $pa_ht; + public $marge_tx; + public $marque_tx; - var $special_code; // Tag for special lines (exlusive tags) + public $special_code; // Tag for special lines (exlusive tags) // 1: frais de port // 2: ecotaxe // 3: option line (when qty = 0) - var $info_bits = 0; // Liste d'options cumulables: + public $info_bits = 0; // Liste d'options cumulables: // Bit 0: 0 si TVA normal - 1 si TVA NPR // Bit 1: 0 ligne normale - 1 si ligne de remise fixe - var $total_ht; // Total HT de la ligne toute quantite et incluant la remise ligne - var $total_tva; // Total TVA de la ligne toute quantite et incluant la remise ligne - var $total_ttc; // Total TTC de la ligne toute quantite et incluant la remise ligne + public $total_ht; // Total HT de la ligne toute quantite et incluant la remise ligne + public $total_tva; // Total TVA de la ligne toute quantite et incluant la remise ligne + public $total_ttc; // Total TTC de la ligne toute quantite et incluant la remise ligne /** * @deprecated * @see remise_percent, fk_remise_except */ - var $remise; + public $remise; + /** * @deprecated * @see subprice */ - var $price; + public $price; // From llx_product /** * @deprecated * @see product_ref */ - var $ref; + public $ref; + /** * Product reference * @var string */ public $product_ref; + /** * @deprecated * @see product_label */ - var $libelle; + public $libelle; + /** * Product label * @var string */ public $product_label; + /** * Product description * @var string */ public $product_desc; - var $localtax1_tx; // Local tax 1 - var $localtax2_tx; // Local tax 2 - var $localtax1_type; // Local tax 1 type - var $localtax2_type; // Local tax 2 type - var $total_localtax1; // Line total local tax 1 - var $total_localtax2; // Line total local tax 2 + public $localtax1_tx; // Local tax 1 + public $localtax2_tx; // Local tax 2 + public $localtax1_type; // Local tax 1 type + public $localtax2_type; // Local tax 2 type + public $total_localtax1; // Line total local tax 1 + public $total_localtax2; // Line total local tax 2 - var $skip_update_total; // Skip update price total for special lines + public $skip_update_total; // Skip update price total for special lines - var $ref_fourn; - var $ref_supplier; + public $ref_fourn; + public $ref_supplier; // Multicurrency - var $fk_multicurrency; - var $multicurrency_code; - var $multicurrency_subprice; - var $multicurrency_total_ht; - var $multicurrency_total_tva; - var $multicurrency_total_ttc; + public $fk_multicurrency; + public $multicurrency_code; + public $multicurrency_subprice; + public $multicurrency_total_ht; + public $multicurrency_total_tva; + public $multicurrency_total_ttc; /** * Class line Contructor diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 74f5c825e6c..3f3b08b1cba 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2488,7 +2488,10 @@ class Ticket extends CommonObject */ class TicketsLine { - public $id; + /** + * @var int ID + */ + public $id; /** * @var string $ref Ticket reference diff --git a/htdocs/ticket/class/ticketlogs.class.php b/htdocs/ticket/class/ticketlogs.class.php index e006759ed51..c5e77bc9dae 100644 --- a/htdocs/ticket/class/ticketlogs.class.php +++ b/htdocs/ticket/class/ticketlogs.class.php @@ -57,7 +57,10 @@ class Ticketlogs// extends CommonObject */ public $table_element = 'ticketlogs'; //!< Name of table without prefix where object is stored - public $id; + /** + * @var int ID + */ + public $id; public $fk_track_id; public $fk_user_create;