From 47b6374abcf517bc35d70cb7c5abd1ef7e916d56 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 4 Sep 2018 13:45:20 +0200 Subject: [PATCH] Standardize and update code --- htdocs/adherents/class/adherent.class.php | 89 ++++++++++--------- .../class/productcustomerprice.class.php | 39 ++++---- 2 files changed, 68 insertions(+), 60 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index f9a02252387..fdb0a03aa00 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -53,66 +53,69 @@ class Adherent extends CommonObject public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - var $mesgs; + public $mesgs; - var $login; + public $login; //! Clear password in memory - var $pass; + public $pass; //! Clear password in database (defined if DATABASE_PWD_ENCRYPTED=0) - var $pass_indatabase; + public $pass_indatabase; //! Encrypted password in database (always defined) - var $pass_indatabase_crypted; + public $pass_indatabase_crypted; - var $societe; - var $company; - var $address; - var $zip; - var $town; + public $societe; + public $company; + public $address; + public $zip; + public $town; - var $state_id; // Id of department - var $state_code; // Code of department - var $state; // Label of department + public $state_id; // Id of department + public $state_code; // Code of department + public $state; // Label of department - var $email; - var $skype; - var $phone; - var $phone_perso; - var $phone_mobile; + public $email; + public $skype; + public $phone; + public $phone_perso; + public $phone_mobile; - var $morphy; - var $public; - var $statut; // -1:brouillon, 0:resilie, >=1:valide,paye - var $photo; + public $morphy; + public $public; + public $statut; // -1:brouillon, 0:resilie, >=1:valide,paye + public $photo; - var $datec; - var $datem; - var $datefin; - var $datevalid; - var $birth; + public $datec; + public $datem; + public $datefin; + public $datevalid; + public $birth; - var $note_public; - var $note_private; + public $note_public; + public $note_private; - var $typeid; // Id type adherent - var $type; // Libelle type adherent - var $need_subscription; + public $typeid; // Id type adherent + public $type; // Libelle type adherent + public $need_subscription; - var $user_id; - var $user_login; + public $user_id; + public $user_login; - var $fk_soc; + /** + * @var int Thirdparty ID + */ + public $fk_soc; // Fields loaded by fetch_subscriptions() - var $first_subscription_date; - var $first_subscription_amount; - var $last_subscription_date; - var $last_subscription_date_start; - var $last_subscription_date_end; - var $last_subscription_amount; - var $subscriptions=array(); + public $first_subscription_date; + public $first_subscription_amount; + public $last_subscription_date; + public $last_subscription_date_start; + public $last_subscription_date_end; + public $last_subscription_amount; + public $subscriptions=array(); - var $oldcopy; // To contains a clone of this when we need to save old properties of object + public $oldcopy; // To contains a clone of this when we need to save old properties of object /** * @var int Entity diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 29327293723..667e63b3ecc 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -38,29 +38,34 @@ class Productcustomerprice extends CommonObject */ public $table_element = 'product_customer_price'; - var $entity; - var $datec = ''; - var $tms = ''; - var $fk_product; - var $fk_soc; - var $price; - var $price_ttc; - var $price_min; - var $price_min_ttc; - var $price_base_type; - var $tva_tx; - var $recuperableonly; - var $localtax1_type; - var $localtax1_tx; - var $localtax2_type; - var $localtax2_tx; + public $entity; + public $datec = ''; + public $tms = ''; + public $fk_product; + + /** + * @var int Thirdparty ID + */ + public $fk_soc; + + public $price; + public $price_ttc; + public $price_min; + public $price_min_ttc; + public $price_base_type; + public $tva_tx; + public $recuperableonly; + public $localtax1_type; + public $localtax1_tx; + public $localtax2_type; + public $localtax2_tx; /** * @var int User ID */ public $fk_user; - var $lines = array (); + public $lines = array (); /** * Constructor