From ba6a48360e0e1889cfd4ef4c2350b1d1a6652762 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 30 Aug 2018 12:26:59 +0200 Subject: [PATCH 01/30] Standardize and update code --- .../class/accountancycategory.class.php | 67 ++++++++++++++----- 1 file changed, 52 insertions(+), 15 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 1f81767f80d..4bb7e5aaf66 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -30,19 +30,11 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; */ class AccountancyCategory // extends CommonObject { -<<<<<<< HEAD - /** - * @var DoliDB Database handler. - */ - public $db; - -======= /** * @var DoliDB Database handler. */ public $db; ->>>>>>> upstream/develop /** * @var string Error string * @see errors @@ -64,24 +56,69 @@ class AccountancyCategory // extends CommonObject */ public $table_element='c_accounting_category'; - public $id; - public $code; - /** - * @var string proper name for given parameter - */ - public $label; - + * @var int ID + */ + public $id; + + /** + * @var mixed Sample property 1 + */ + public $code; + + /** + * @var string proper name for given parameter + */ + public $label; + + /** + * @var mixed Sample property 1 + */ public $range_account; + + /** + * @var mixed Sample property 1 + */ public $sens; + + /** + * @var mixed Sample property 1 + */ public $category_type; + + /** + * @var mixed Sample property 1 + */ public $formula; + + /** + * @var mixed Sample property 1 + */ public $position; + + /** + * @var mixed Sample property 1 + */ public $fk_country; + + /** + * @var mixed Sample property 1 + */ public $active; + /** + * @var mixed Sample property 1 + */ public $lines_cptbk; + + /** + * @var mixed Sample property 1 + */ public $lines_display; + + /** + * @var mixed Sample property 1 + */ public $sdc; From e96e3bdf42e2b594ac560626b6d0494666ff9141 Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Thu, 30 Aug 2018 14:19:21 +0200 Subject: [PATCH 02/30] Update accountancycategory.class.php --- .../class/accountancycategory.class.php | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 4bb7e5aaf66..3673f6df204 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -30,10 +30,10 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; */ class AccountancyCategory // extends CommonObject { - /** - * @var DoliDB Database handler. - */ - public $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error string @@ -57,21 +57,21 @@ class AccountancyCategory // extends CommonObject public $table_element='c_accounting_category'; /** - * @var int ID - */ - public $id; + * @var int ID + */ + public $id; /** * @var mixed Sample property 1 */ public $code; - /** - * @var string proper name for given parameter - */ - public $label; + /** + * @var string proper name for given parameter + */ + public $label; - /** + /** * @var mixed Sample property 1 */ public $range_account; From 5ec22d9fadf19a4e79b5caceadc5527b62f7af8d Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Thu, 30 Aug 2018 14:25:25 +0200 Subject: [PATCH 03/30] Update accountingaccount.class.php --- .../class/accountingaccount.class.php | 37 +++++++------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 08ae8359c96..1447ff0e7b4 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -79,35 +79,24 @@ class AccountingAccount extends CommonObject var $account_number; var $account_parent; var $account_category; -<<<<<<< HEAD - - /** - * @var string proper name for given parameter + + /** + * @var string Label of account */ public $label; - - var $fk_user_author; - var $fk_user_modif; - var $active; // duplicate with status -======= - /** - * @var string Label of account - */ - public $label; + /** + * @var int ID + */ + public $fk_user_author; - /** - * @var int ID - */ - public $fk_user_author; + /** + * @var int ID + */ + public $fk_user_modif; - /** - * @var int ID - */ - public $fk_user_modif; - - var $active; // duplicate with status ->>>>>>> upstream/develop + var $active; // duplicate with status + var $status; From 7973489f8a6c363049ec52df606e003c254557e9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 31 Aug 2018 17:18:08 +0200 Subject: [PATCH 04/30] fix display comment issue --- .../class/accountancycategory.class.php | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 3673f6df204..8b53c87f5fa 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -30,10 +30,10 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; */ class AccountancyCategory // extends CommonObject { - /** - * @var DoliDB Database handler. - */ - public $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error string @@ -57,21 +57,21 @@ class AccountancyCategory // extends CommonObject public $table_element='c_accounting_category'; /** - * @var int ID - */ - public $id; + * @var int ID + */ + public $id; /** * @var mixed Sample property 1 */ public $code; - /** - * @var string proper name for given parameter - */ - public $label; + /** + * @var string proper name for given parameter + */ + public $label; - /** + /** * @var mixed Sample property 1 */ public $range_account; From 9e880d3e72bc30109b03684eeff332ca879b9615 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 31 Aug 2018 17:55:31 +0200 Subject: [PATCH 05/30] Standardize and update code --- .../action/class/actioncommreminder.class.php | 11 ++++++++--- .../compta/salaries/class/paymentsalary.class.php | 15 ++++++++++----- htdocs/core/class/discount.class.php | 9 +++++++-- .../class/fournisseur.commande.dispatch.class.php | 5 +++++ htdocs/user/class/user.class.php | 10 +++++++--- 5 files changed, 37 insertions(+), 13 deletions(-) diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php index ce32234be56..2a5c3bf709c 100644 --- a/htdocs/comm/action/class/actioncommreminder.class.php +++ b/htdocs/comm/action/class/actioncommreminder.class.php @@ -34,17 +34,17 @@ class ActionCommReminder extends CommonObject * @var string ID to identify managed object */ public $element = 'actioncomm_reminder'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'actioncomm_reminder'; - + /** * @var array Does actioncommreminder support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 0; - + /** * @var string String with name of icon for actioncommreminder. Must be the part after the 'object_' into object_actioncommreminder.png */ @@ -84,7 +84,12 @@ class ActionCommReminder extends CommonObject public $rowid; public $dateremind; public $typeremind; + + /** + * @var int User ID + */ public $fk_user; + public $offsetvalue; public $offsetunit; public $status; diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 0de5bc2a67a..97d787fa097 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -44,19 +44,24 @@ class PaymentSalary extends CommonObject public $picto='payment'; public $tms; + + /** + * @var int User ID + */ public $fk_user; + public $datep; public $datev; public $amount; public $fk_project; public $type_payment; public $num_payment; - + /** - * @var string proper name for given parameter - */ - public $label; - + * @var string proper name for given parameter + */ + public $label; + public $datesp; public $dateep; public $fk_bank; diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index b3cfb73654b..ca90a545645 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -32,7 +32,7 @@ class DiscountAbsolute * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ @@ -45,7 +45,12 @@ class DiscountAbsolute public $amount_tva; // public $amount_ttc; // public $tva_tx; // Vat rate - public $fk_user; // Id utilisateur qui accorde la remise + + /** + * @var int User ID Id utilisateur qui accorde la remise + */ + public $fk_user; + public $description; // Description libre public $datec; // Date creation public $fk_facture_line; // Id invoice line when a discount is used into an invoice line (for absolute discounts) diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index f5933b453ed..f45f45b6f4b 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -67,7 +67,12 @@ class CommandeFournisseurDispatch extends CommonObject public $fk_commandefourndet; public $qty; public $fk_entrepot; + + /** + * @var int User ID + */ public $fk_user; + public $datec=''; public $comment; public $status; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 40c6a6b9f19..268f4a6c95b 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -44,12 +44,12 @@ class User extends CommonObject * @var string ID to identify managed object */ public $element='user'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='user'; - + public $fk_element='fk_user'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe @@ -103,6 +103,10 @@ class User extends CommonObject public $contactid; public $fk_member; + + /** + * @var int User ID + */ public $fk_user; public $clicktodial_url; @@ -1541,7 +1545,7 @@ class User extends CommonObject $adh->zip=$this->zip; $adh->state_id=$this->state_id; $adh->country_id=$this->country_id; - + $adh->email=$this->email; $adh->skype=$this->skype; $adh->phone=$this->office_phone; From 2f307aae21ee8bf647dbc5939a5b6338989edd1d Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 31 Aug 2018 18:06:17 +0200 Subject: [PATCH 06/30] Standardize and update code --- htdocs/bookmarks/class/bookmark.class.php | 12 ++++++++---- .../compta/deplacement/class/deplacement.class.php | 11 ++++++++--- htdocs/holiday/class/holiday.class.php | 10 +++++++--- .../product/class/productcustomerprice.class.php | 14 ++++++++++++-- 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index 9491b10c267..95e6b3c3088 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -32,12 +32,12 @@ class Bookmark extends CommonObject * @var string ID to identify managed object */ public $element='bookmark'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='bookmark'; - + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto = 'bookmark'; @@ -50,8 +50,12 @@ class Bookmark extends CommonObject * @var int ID */ public $id; - - var $fk_user; + + /** + * @var int User ID + */ + public $fk_user; + var $datec; var $url; var $target; // 0=replace, 1=new window diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index d9172219abe..44820c64a1c 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -35,12 +35,12 @@ class Deplacement extends CommonObject * @var string ID to identify managed object */ public $element='deplacement'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='deplacement'; - + public $table_element_line = ''; public $fk_element = ''; public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe @@ -48,7 +48,12 @@ class Deplacement extends CommonObject var $datec; // Creation date var $dated; var $fk_user_author; - var $fk_user; + + /** + * @var int User ID + */ + public $fk_user; + var $km; var $socid; var $statut; // 0=draft, 1=validated diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 833b46b2bca..89d60be7569 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -36,12 +36,12 @@ class Holiday extends CommonObject * @var string ID to identify managed object */ public $element='holiday'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='holiday'; - + public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe var $fk_element = 'fk_holiday'; public $picto = 'holiday'; @@ -52,7 +52,11 @@ class Holiday extends CommonObject */ var $rowid; - var $fk_user; + /** + * @var int User ID + */ + public $fk_user; + var $date_create=''; var $description; var $date_debut=''; // Date start in PHP server TZ diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 4155045ec29..533a36638ce 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -54,7 +54,12 @@ class Productcustomerprice extends CommonObject var $localtax1_tx; var $localtax2_type; var $localtax2_tx; - var $fk_user; + + /** + * @var int User ID + */ + public $fk_user; + var $lines = array (); /** @@ -978,7 +983,12 @@ class PriceByCustomerLine var $recuperableonly; var $localtax1_tx; var $localtax2_tx; - var $fk_user; + + /** + * @var int User ID + */ + public $fk_user; + var $import_key; var $socname; var $prodref; From 70ae8c6081ac20c622823330431b01353b3ed21b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 31 Aug 2018 18:27:16 +0200 Subject: [PATCH 07/30] Standardize and update code --- .../accountancy/class/bookkeeping.class.php | 9 ++++-- htdocs/adherents/class/adherent.class.php | 3 ++ htdocs/core/class/comment.class.php | 3 ++ .../core/class/emailsenderprofile.class.php | 11 +++++-- htdocs/core/class/link.class.php | 12 +++++--- htdocs/cron/class/cronjob.class.php | 6 +++- htdocs/ecm/class/ecmfiles.class.php | 18 ++++++++--- htdocs/hrm/class/establishment.class.php | 8 +++-- .../template/class/myobject.class.php | 21 ++++++++----- .../class/multicurrency.class.php | 30 +++++++++---------- .../inventory/class/inventory.class.php | 17 +++++++---- .../product/stock/class/productlot.class.php | 8 ++--- htdocs/societe/class/societe.class.php | 3 ++ htdocs/societe/class/societeaccount.class.php | 11 +++++-- htdocs/stripe/class/stripe.class.php | 5 ++++ htdocs/user/class/user.class.php | 4 +++ htdocs/user/class/usergroup.class.php | 9 ++++-- htdocs/website/class/website.class.php | 28 ++++++++--------- 18 files changed, 135 insertions(+), 71 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index a3a91cdc8e5..aae6374cb50 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -35,22 +35,25 @@ class BookKeeping extends CommonObject * @var string Error code (or message) */ public $error; - + /** * @var string[] Error codes (or messages) */ public $errors = array(); - + /** * @var string Id to identify managed objects */ public $element = 'accountingbookkeeping'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'accounting_bookkeeping'; + /** + * @var int Entity + */ public $entity; /** diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index bf4fe0d73c2..67aa88c6e03 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -114,6 +114,9 @@ class Adherent extends CommonObject var $oldcopy; // To contains a clone of this when we need to save old properties of object + /** + * @var int Entity + */ public $entity; /** diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index 9cc4b8be192..40402eb9717 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -42,6 +42,9 @@ class Comment extends CommonObject public $fk_user_author; + /** + * @var int Entity + */ public $entity; public $import_key; diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index e0ff56d6736..33f5032c6e3 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -39,17 +39,17 @@ class EmailSenderProfile extends CommonObject * @var string ID to identify managed object */ public $element = 'emailsenderprofile'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'c_email_senderprofile'; - + /** * @var array Does emailsenderprofile support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 1; - + /** * @var string String with name of icon for emailsenderprofile */ @@ -89,7 +89,12 @@ class EmailSenderProfile extends CommonObject 'active' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'notnull'=>-1, 'index'=>1), ); public $rowid; + + /** + * @var int Entity + */ public $entity; + public $label; public $email; public $date_creation; diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index 951c6e75b02..e9f8c7d9a15 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -32,21 +32,25 @@ class Link extends CommonObject * @var string ID to identify managed object */ public $element = 'link'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'links'; - public $entity; + /** + * @var int Entity + */ + public $entity; + public $datea; public $url; - + /** * @var string proper name for given parameter */ public $label; - + public $objecttype; public $objectid; diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 53acd0976b4..f2b23abad65 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -42,7 +42,11 @@ class Cronjob extends CommonObject public $picto = 'cron'; - public $entity; + /** + * @var int Entity + */ + public $entity; + public $jobtype; public $tms=''; public $datec=''; diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index d6eff8e697b..056bcd94337 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -40,18 +40,23 @@ class EcmFiles extends CommonObject * @var string Id to identify managed objects */ public $element = 'ecmfiles'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'ecm_files'; - + public $picto = 'generic'; public $ref; // hash of file path public $label; // hash of file content (md5_file(dol_osencode($destfull)) public $share; // hash for file sharing, empty by default (example: getRandomPassword(true)) + + /** + * @var int Entity + */ public $entity; + public $filename; public $filepath; public $fullpath_orig; @@ -68,7 +73,7 @@ class EcmFiles extends CommonObject public $acl; public $src_object_type; public $src_object_id; - + /** * Constructor @@ -339,7 +344,7 @@ class EcmFiles extends CommonObject else { $sql .= ' AND t.rowid = '.$this->db->escape($id); // rowid already unique } - + $this->db->plimit(1); // When we search on src or on hash of content (hashforfile) to solve hash conflict when several files has same content, we take first one only $this->db->order('t.rowid', 'ASC'); @@ -830,7 +835,12 @@ class EcmFiles extends CommonObject class EcmfilesLine { public $label; + + /** + * @var int Entity + */ public $entity; + public $filename; public $filepath; public $fullpath_orig; diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 195e48bb222..8fb13046ee4 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -32,12 +32,12 @@ class Establishment extends CommonObject * @var string ID to identify managed object */ public $element='establishment'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='establishment'; - + public $table_element_line = ''; public $fk_element = 'fk_establishment'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe @@ -52,6 +52,10 @@ class Establishment extends CommonObject public $zip; public $town; public $status; // 0=open, 1=closed + + /** + * @var int Entity + */ public $entity; public $country_id; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 15e7a7f84dd..3228305ac70 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -36,22 +36,22 @@ class MyObject extends CommonObject * @var string ID to identify managed object */ public $element = 'myobject'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'mymodule_myobject'; - + /** * @var int Does myobject support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 0; - + /** * @var int Does myobject support extrafields ? 0=No, 1=Yes */ public $isextrafieldmanaged = 1; - + /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png */ @@ -103,7 +103,12 @@ class MyObject extends CommonObject public $rowid; public $ref; + + /** + * @var int Entity + */ public $entity; + public $label; public $amount; public $status; @@ -122,22 +127,22 @@ class MyObject extends CommonObject * @var int Name of subtable line */ //public $table_element_line = 'myobjectdet'; - + /** * @var int Field with ID of parent key if this field has a parent */ //public $fk_element = 'fk_myobject'; - + /** * @var int Name of subtable class that manage subtable lines */ //public $class_element_line = 'MyObjectline'; - + /** * @var array Array of child tables (child tables to delete before deleting a record) */ //protected $childtables=array('myobjectdet'); - + /** * @var MyObjectLine[] Array of subtable lines */ diff --git a/htdocs/multicurrency/class/multicurrency.class.php b/htdocs/multicurrency/class/multicurrency.class.php index c7822961570..3206c7c566f 100644 --- a/htdocs/multicurrency/class/multicurrency.class.php +++ b/htdocs/multicurrency/class/multicurrency.class.php @@ -42,12 +42,12 @@ class MultiCurrency extends CommonObject * @var string Id to identify managed objects */ public $element = 'multicurrency'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'multicurrency'; - + /** * @var string Name of table without prefix where object is stored */ @@ -62,32 +62,32 @@ class MultiCurrency extends CommonObject * @var mixed Sample property 1 */ public $id; - + /** * @var mixed Sample property 1 */ public $code; - + /** * @var mixed Sample property 2 */ public $name; - + /** - * @var mixed Sample property 2 + * @var int Entity */ public $entity; - + /** * @var mixed Sample property 2 */ public $date_create; - + /** * @var mixed Sample property 2 */ public $fk_user; - + /** * @var mixed Sample property 2 */ @@ -695,32 +695,32 @@ class CurrencyRate extends CommonObjectLine * @var string Id to identify managed objects */ public $element = 'multicurrency_rate'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'multicurrency_rate'; - + /** * @var int ID */ public $id; - + /** * @var double Rate */ public $rate; - + /** * @var date Date synchronisation */ public $date_sync; - + /** * @var int Id of currency */ public $fk_multicurrency; - + /** * @var int Id of entity */ diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index 7ba2d5cf5f1..fe57698619e 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -38,7 +38,7 @@ class Inventory extends CommonObject * @var string ID to identify managed object */ public $element = 'inventory'; - + /** * @var string Name of table without prefix where object is stored */ @@ -48,7 +48,7 @@ class Inventory extends CommonObject * @var array Does inventory support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 1; - + /** * @var string String with name of icon for inventory */ @@ -101,7 +101,12 @@ class Inventory extends CommonObject public $rowid; public $ref; + + /** + * @var int Entity + */ public $entity; + public $fk_warehouse; public $date_inventory; public $title; @@ -123,22 +128,22 @@ class Inventory extends CommonObject * @var int Name of subtable line */ //public $table_element_line = 'inventorydet'; - + /** * @var int Field with ID of parent key if this field has a parent */ //public $fk_element = 'fk_inventory'; - + /** * @var int Name of subtable class that manage subtable lines */ //public $class_element_line = 'Inventoryline'; - + /** * @var array Array of child tables (child tables to delete before deleting a record) */ //protected $childtables=array('inventorydet'); - + /** * @var InventoryLine[] Array of subtable lines */ diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index 1ed59eb058f..c0718924f5f 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -39,7 +39,7 @@ class Productlot extends CommonObject * @var string Id to identify managed objects */ public $element = 'productlot'; - + /** * @var string Name of table without prefix where object is stored */ @@ -55,9 +55,10 @@ class Productlot extends CommonObject public $lines = array(); /** + * @var int Entity */ - public $entity; + public $fk_product; public $batch; public $eatby = ''; @@ -68,9 +69,6 @@ class Productlot extends CommonObject public $fk_user_modif; public $import_key; - /** - */ - /** * Constructor diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 845a19cba58..5d75ab688cf 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -90,6 +90,9 @@ class Societe extends CommonObject ); + /** + * @var int Entity + */ public $entity; /** diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index e4c38893e58..76ecf52bc30 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -39,17 +39,17 @@ class SocieteAccount extends CommonObject * @var string ID to identify managed object */ public $element = 'societeaccount'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'societe_account'; - + /** * @var array Does societeaccount support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 0; - + /** * @var string String with name of icon for societeaccount. Must be the part after the 'object_' into object_myobject.png */ @@ -100,7 +100,12 @@ class SocieteAccount extends CommonObject 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'notnull'=>1, 'index'=>1, 'default'=>1, 'arrayofkeyval'=>array('1'=>'Active','0'=>'Disabled')), ); public $rowid; + + /** + * @var int Entity + */ public $entity; + public $key_account; public $login; public $pass_encoding; diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index b8472d0b821..969a0e1ab9c 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -33,7 +33,12 @@ class Stripe extends CommonObject public $fk_key; public $id; public $mode; + + /** + * @var int Entity + */ public $entity; + public $statut; public $type; public $code; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 268f4a6c95b..a9f1419378f 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -76,6 +76,10 @@ class User extends CommonObject public $admin; public $login; public $api_key; + + /** + * @var int Entity + */ public $entity; //! Clear password in memory diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 8f89b4a2e35..6b08b7b732e 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -39,16 +39,19 @@ class UserGroup extends CommonObject * @var string ID to identify managed object */ public $element='usergroup'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='usergroup'; - + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto='group'; - public $entity; // Entity of group + /** + * @var int Entity of group + */ + public $entity; public $name; // Name of group /** diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index be6770743bc..442ad133b97 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -39,57 +39,57 @@ class Website extends CommonObject * @var string Id to identify managed objects */ public $element = 'website'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'website'; - + /** * @var array Does website support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 1; - + /** * @var string String with name of icon for website. Must be the part after the 'object_' into object_myobject.png */ public $picto = 'globe'; /** - * @var int + * @var int Entity */ public $entity; - + /** - * @var string + * @var string Ref */ public $ref; - + /** - * @var string + * @var string description */ public $description; - + /** - * @var int + * @var int Status */ public $status; - + /** * @var mixed */ public $date_creation; - + /** * @var mixed */ public $tms = ''; - + /** * @var integer */ public $fk_default_home; - + /** * @var string */ From edaa575435228f1226c7db9b274af3d344c4d5f6 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 31 Aug 2018 18:36:15 +0200 Subject: [PATCH 08/30] Standardize and update code --- htdocs/compta/bank/class/account.class.php | 24 +++++++++++-------- .../bank/class/paymentvarious.class.php | 16 ++++++++----- htdocs/contrat/class/contrat.class.php | 18 ++++++++------ htdocs/core/class/notify.class.php | 11 ++++++--- 4 files changed, 43 insertions(+), 26 deletions(-) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 46c3e168a1b..f8ab6517f92 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -40,12 +40,12 @@ class Account extends CommonObject * @var string ID to identify managed object */ public $element = 'bank_account'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'bank_account'; - + public $picto = 'account'; /** @@ -1645,30 +1645,34 @@ class AccountLine extends CommonObject * @var string Error code (or message) */ public $error=''; - + /** * @var DoliDB Database handler. */ public $db; - + /** * @var string ID to identify managed object */ public $element='bank'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='bank'; - + var $picto = 'generic'; /** * @var int ID */ public $id; - - var $ref; + + /** + * @var string Ref + */ + public $ref; + var $datec; var $dateo; @@ -1677,12 +1681,12 @@ class AccountLine extends CommonObject */ var $datev; var $amount; - + /** * @var string proper name for given parameter */ public $label; - + var $note; var $fk_user_author; var $fk_user_rappro; diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 90ec1558981..6b1d35cc910 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -34,20 +34,24 @@ class PaymentVarious extends CommonObject * @var string ID to identify managed object */ public $element='variouspayment'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='payment_various'; - + public $picto = 'bill'; /** * @var int ID */ public $id; - - var $ref; + + /** + * @var string Ref + */ + public $ref; + var $tms; var $datep; var $datev; @@ -55,12 +59,12 @@ class PaymentVarious extends CommonObject var $amount; var $type_payment; var $num_payment; - + /** * @var string proper name for given parameter */ public $label; - + var $accountancy_code; var $fk_project; var $fk_bank; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 537d18245fd..26a32fe8468 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -45,22 +45,22 @@ class Contrat extends CommonObject * @var string ID to identify managed object */ public $element='contrat'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='contrat'; - + public $table_element_line='contratdet'; public $fk_element='fk_contrat'; public $picto='contract'; - + /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * @var int */ public $ismultientitymanaged = 1; - + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user * @var integer @@ -2465,7 +2465,7 @@ class ContratLigne extends CommonObjectLine * @var string ID to identify managed object */ public $element='contratdet'; - + /** * @var string Name of table without prefix where object is stored */ @@ -2475,8 +2475,12 @@ class ContratLigne extends CommonObjectLine * @var int ID */ public $id; - - var $ref; + + /** + * @var string Ref + */ + public $ref; + var $tms; var $fk_contrat; diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index f5c0020bac1..bcab80dc19f 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -34,12 +34,12 @@ class Notify * @var int ID */ public $id; - + /** * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ @@ -51,7 +51,12 @@ class Notify public $errors = array(); var $author; - var $ref; + + /** + * @var string Ref + */ + public $ref; + var $date; var $duree; var $note; From bb05e80a877a889cd7286e275b515f40c73f4b2c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 31 Aug 2018 18:47:25 +0200 Subject: [PATCH 09/30] Standardize and update code --- htdocs/asset/class/asset.class.php | 27 +++++++++++-------- .../cheque/class/remisecheque.class.php | 8 ++++-- htdocs/cron/class/cronjob.class.php | 4 +++ htdocs/ecm/class/ecmdirectory.class.php | 12 ++++++--- htdocs/ecm/class/ecmfiles.class.php | 6 ++++- .../fourn/class/fournisseur.facture.class.php | 7 ++++- htdocs/hrm/class/establishment.class.php | 7 ++++- .../template/class/myobject.class.php | 4 +++ .../inventory/class/inventory.class.php | 4 +++ htdocs/societe/class/societe.class.php | 4 +++ 10 files changed, 63 insertions(+), 20 deletions(-) diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 93ee5014dc2..6a9e6c7c485 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -35,22 +35,22 @@ class Asset extends CommonObject * @var string ID to identify managed object */ public $element = 'asset'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'asset'; - + /** * @var int Does module support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 0; - + /** * @var int Does asset support extrafields ? 0=No, 1=Yes */ public $isextrafieldmanaged = 1; - + /** * @var string String with name of icon for asset. Must be the part after the 'object_' into object_asset.png */ @@ -96,14 +96,19 @@ class Asset extends CommonObject 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Active', '-1'=>'Cancel')), ); public $rowid; - public $ref; - public $entity; - + /** - * @var string proper name for given parameter - */ - public $label; - + * @var string Ref + */ + public $ref; + + public $entity; + + /** + * @var string proper name for given parameter + */ + public $label; + public $amount; public $fk_soc; public $description; diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index ceb376f7a37..dbf2d688aca 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -37,12 +37,12 @@ class RemiseCheque extends CommonObject * @var string ID to identify managed object */ public $element='chequereceipt'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='bordereau_cheque'; - + public $picto = 'payment'; var $num; @@ -56,6 +56,10 @@ class RemiseCheque extends CommonObject public $account_label; public $author_id; public $nbcheque; + + /** + * @var string Ref + */ public $ref; /** diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index f2b23abad65..28853b6a740 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -1334,6 +1334,10 @@ class Cronjobline { public $id; + + /** + * @var string Ref + */ public $ref; public $tms=''; diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 3e3559847b8..539baf9460a 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -31,12 +31,12 @@ class EcmDirectory // extends CommonObject * @var string ID to identify managed object */ public $element='ecm_directories'; - + /** * @var string Name of table without prefix where object is stored */ //public $table_element='ecm_directories'; - + var $picto = 'dir'; /** @@ -48,7 +48,7 @@ class EcmDirectory // extends CommonObject * @var string proper name for given parameter */ public $label; - + var $fk_parent; var $description; var $cachenbofdoc=-1; // By default cache initialized with value 'not calculated' @@ -56,6 +56,10 @@ class EcmDirectory // extends CommonObject var $date_m; public $fk_user_m; public $fk_user_c; + + /** + * @var string Ref + */ public $ref; var $cats=array(); @@ -70,7 +74,7 @@ class EcmDirectory // extends CommonObject * @var string Error code (or message) */ public $error; - + /** * @var string[] Error codes (or messages) */ diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 056bcd94337..25dc979a5db 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -48,7 +48,11 @@ class EcmFiles extends CommonObject public $picto = 'generic'; - public $ref; // hash of file path + /** + * @var string Ref hash of file path + */ + public $ref; + public $label; // hash of file content (md5_file(dol_osencode($destfull)) public $share; // hash for file sharing, empty by default (example: getRandomPassword(true)) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 3d889e51c51..1eece0f0316 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -73,7 +73,12 @@ class FactureFournisseur extends CommonInvoice protected $table_ref_field = 'ref'; public $rowid; - public $ref; + + /** + * @var string Ref + */ + public $ref; + public $product_ref; public $ref_supplier; public $socid; diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 8fb13046ee4..90b06d9fd0f 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -44,7 +44,12 @@ class Establishment extends CommonObject public $picto='building'; public $id; - public $ref; + + /** + * @var string Ref + */ + public $ref; + public $rowid; public $name; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 3228305ac70..58d2e1c0fe0 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -102,6 +102,10 @@ class MyObject extends CommonObject ); public $rowid; + + /** + * @var string Ref + */ public $ref; /** diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index fe57698619e..fc8bc8bb9e6 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -100,6 +100,10 @@ class Inventory extends CommonObject ); public $rowid; + + /** + * @var string Ref + */ public $ref; /** diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 5d75ab688cf..2d4c3c3df07 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -377,7 +377,11 @@ class Societe extends CommonObject */ public $default_lang; + /** + * @var string Ref + */ public $ref; + public $ref_int; /** * External user reference. From 3a8bde227b199167f1c16f3670a675eb7b1560eb Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 31 Aug 2018 19:26:08 +0200 Subject: [PATCH 10/30] Standardize and update code --- htdocs/asset/class/asset.class.php | 5 +++++ htdocs/categories/class/categorie.class.php | 16 ++++++++++------ htdocs/contrat/class/contrat.class.php | 5 ++++- htdocs/core/class/comment.class.php | 3 +++ htdocs/core/class/discount.class.php | 6 +++++- htdocs/core/class/events.class.php | 6 +++++- htdocs/core/modules/action/rapport.pdf.php | 10 +++++++--- htdocs/ecm/class/ecmdirectory.class.php | 7 ++++++- htdocs/ecm/class/ecmfiles.class.php | 10 ++++++++++ htdocs/fichinter/class/fichinter.class.php | 17 +++++++++++------ htdocs/holiday/class/holiday.class.php | 7 ++++++- htdocs/livraison/class/livraison.class.php | 18 +++++++++++------- .../class/opensurveysondage.class.php | 4 ++++ .../class/price_global_variable.class.php | 17 +++++++++++------ .../price_global_variable_updater.class.php | 19 ++++++++++++------- htdocs/product/stock/class/entrepot.class.php | 11 ++++++++--- htdocs/projet/class/project.class.php | 6 +++++- htdocs/projet/class/task.class.php | 6 +++++- htdocs/ticket/class/actions_ticket.class.php | 14 +++++++++----- htdocs/website/class/websitepage.class.php | 9 +++++++-- 20 files changed, 144 insertions(+), 52 deletions(-) diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 6a9e6c7c485..70b45e88d73 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -111,7 +111,12 @@ class Asset extends CommonObject public $amount; public $fk_soc; + + /** + * @var string description + */ public $description; + public $note_public; public $note_private; public $date_creation; diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 8903e43c2ba..c028aee050d 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -152,20 +152,24 @@ class Categorie extends CommonObject * @var string ID to identify managed object */ public $element='category'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='categorie'; public $fk_parent; - + /** - * @var string proper name for given parameter - */ - public $label; - + * @var string proper name for given parameter + */ + public $label; + + /** + * @var string description + */ public $description; + /** * @var string Color */ diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 26a32fe8468..481c005a7b4 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2498,7 +2498,10 @@ class ContratLigne extends CommonObjectLine */ public $libelle; - var $description; + /** + * @var string description + */ + public $description; var $product_ref; var $product_label; diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index 40402eb9717..33e727dcfd0 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -34,6 +34,9 @@ class Comment extends CommonObject public $fk_element; public $element_type; + /** + * @var string description + */ public $description; public $tms; diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index ca90a545645..f310f6e4d04 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -51,7 +51,11 @@ class DiscountAbsolute */ public $fk_user; - public $description; // Description libre + /** + * @var string description + */ + public $description; + public $datec; // Date creation public $fk_facture_line; // Id invoice line when a discount is used into an invoice line (for absolute discounts) public $fk_facture; // Id invoice when a discount line is used into an invoice (for credit note) diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index 6a2374a7d3b..30a03b71b4d 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -63,7 +63,11 @@ class Events // extends CommonObject var $type; var $entity; var $dateevent; - var $description; + + /** + * @var string description + */ + public $description; // List of all Audit/Security events supported by triggers var $eventstolog=array( diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php index fe7be7f3052..51825939ae8 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.pdf.php @@ -39,8 +39,12 @@ class CommActionRapport * @var DoliDB Database handler. */ public $db; - - var $description; + + /** + * @var string description + */ + public $description; + var $date_edition; var $year; var $month; @@ -103,7 +107,7 @@ class CommActionRapport if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - + // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products")); diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 539baf9460a..7da35d19ee1 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -50,7 +50,12 @@ class EcmDirectory // extends CommonObject public $label; var $fk_parent; - var $description; + + /** + * @var string description + */ + public $description; + var $cachenbofdoc=-1; // By default cache initialized with value 'not calculated' var $date_c; var $date_m; diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 25dc979a5db..07494f84d3d 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -64,7 +64,12 @@ class EcmFiles extends CommonObject public $filename; public $filepath; public $fullpath_orig; + + /** + * @var string description + */ public $description; + public $keywords; public $cover; public $position; @@ -848,7 +853,12 @@ class EcmfilesLine public $filename; public $filepath; public $fullpath_orig; + + /** + * @var string description + */ public $description; + public $keywords; public $cover; public $position; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 7c772d460a5..c3cf277f409 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -39,12 +39,12 @@ class Fichinter extends CommonObject * @var string ID to identify managed object */ public $element='fichinter'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='fichinter'; - + public $fk_element='fk_fichinter'; public $table_element_line='fichinterdet'; public $picto = 'intervention'; @@ -65,7 +65,12 @@ class Fichinter extends CommonObject var $datem; var $duration; var $statut = 0; // 0=draft, 1=validated, 2=invoiced, 3=Terminate - var $description; + + /** + * @var string description + */ + public $description; + var $fk_contrat = 0; var $fk_project = 0; var $extraparams=array(); @@ -1321,7 +1326,7 @@ class FichinterLigne extends CommonObjectLine * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ @@ -1338,12 +1343,12 @@ class FichinterLigne extends CommonObjectLine * @var string ID to identify managed object */ public $element='fichinterdet'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='fichinterdet'; - + public $fk_element='fk_fichinter'; /** diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 89d60be7569..c6ab0281120 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -58,7 +58,12 @@ class Holiday extends CommonObject public $fk_user; var $date_create=''; - var $description; + + /** + * @var string description + */ + public $description; + var $date_debut=''; // Date start in PHP server TZ var $date_fin=''; // Date end in PHP server TZ var $date_debut_gmt=''; // Date start in GMT diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 763b28fb445..8c73339c612 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -43,14 +43,14 @@ class Livraison extends CommonObject * @var string ID to identify managed object */ public $element="delivery"; - + public $fk_element="fk_livraison"; - + /** * @var string Name of table without prefix where object is stored */ public $table_element="livraison"; - + public $table_element_line="livraisondet"; var $brouillon; @@ -1078,13 +1078,17 @@ class LivraisonLigne extends CommonObjectLine var $price; var $fk_product; var $origin_id; - + /** * @var string proper name for given parameter */ public $label; - - var $description; // Description produit + + /** + * @var string description produit + */ + public $description; + /** * @deprecated * @see product_ref @@ -1103,7 +1107,7 @@ class LivraisonLigne extends CommonObjectLine * @var string ID to identify managed object */ public $element='livraisondet'; - + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 5d3129f1585..cbfd73ac9bf 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -52,6 +52,10 @@ class Opensurveysondage extends CommonObject * @see description */ public $commentaires; + + /** + * @var string description + */ public $description; public $mail_admin; diff --git a/htdocs/product/dynamic_price/class/price_global_variable.class.php b/htdocs/product/dynamic_price/class/price_global_variable.class.php index f30260a30c0..2997e88c589 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable.class.php @@ -33,26 +33,31 @@ class PriceGlobalVariable * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ public $error=''; - + /** * @var string[] Error codes (or messages) */ public $errors = array(); - + /** * @var int ID */ public $id; - + var $code; - var $description; + + /** + * @var string description + */ + public $description; + var $value; - + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php index 7ca18f36b5d..2155470484e 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php @@ -33,33 +33,38 @@ class PriceGlobalVariableUpdater * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ public $error=''; - + /** * @var string[] Error codes (or messages) */ public $errors = array(); - + var $types=array(0, 1); //!< Updater types var $update_min = 5; //!< Minimal update rate - + /** * @var int ID */ public $id; - + var $type; - var $description; + + /** + * @var string description + */ + public $description; + var $parameters; var $fk_variable; var $update_interval; //!< Interval in mins var $next_update; //!< Next update timestamp var $last_status; - + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index f8e60f135b9..6015608f5e3 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -37,12 +37,12 @@ class Entrepot extends CommonObject * @var string ID to identify managed object */ public $element='stock'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='entrepot'; - + public $picto='stock'; /** @@ -61,7 +61,12 @@ class Entrepot extends CommonObject const STATUS_OPEN_INTERNAL = 2; var $libelle; - var $description; + + /** + * @var string description + */ + public $description; + var $statut; var $lieu; var $address; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 91cc8dbbcad..24cfef47ea8 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -53,7 +53,11 @@ class Project extends CommonObject */ protected $table_ref_field = 'ref'; - var $description; + /** + * @var string description + */ + public $description; + /** * @var string * @deprecated diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 2d16e2f53fb..6cd128380e5 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -52,7 +52,11 @@ class Task extends CommonObject */ public $label; - var $description; + /** + * @var string description + */ + public $description; + var $duration_effective; // total of time spent on this task var $planned_workload; var $date_c; diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 49007d325c4..e8e637dd87a 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -39,21 +39,21 @@ class ActionsTicket * @var DoliDB Database handler. */ public $db; - + public $dao; public $mesg; - + /** * @var string Error code (or message) */ public $error; - + /** * @var string[] Error codes (or messages) */ public $errors = array(); - + //! Numero de l'erreur public $errno = 0; @@ -61,7 +61,11 @@ class ActionsTicket public $template; public $label; - public $description; + + /** + * @var string description + */ + public $description; public $fk_statut; public $fk_soc; diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index 9874b1fa8b0..f7dec16c6c0 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -39,12 +39,12 @@ class WebsitePage extends CommonObject * @var string Id to identify managed objects */ public $element = 'websitepage'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'website_page'; - + /** * @var string String with name of icon for websitepage. Must be the part after the 'object_' into object_myobject.png */ @@ -55,7 +55,12 @@ class WebsitePage extends CommonObject public $aliasalt; public $type_container; public $title; + + /** + * @var string description + */ public $description; + public $keywords; public $htmlheader; public $content; From 0dc812cf10d28811a194fcab7b2ad70c29b52166 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 13:02:27 +0200 Subject: [PATCH 11/30] precise label comment --- htdocs/accountancy/class/accountancycategory.class.php | 2 +- htdocs/accountancy/class/accountancysystem.class.php | 10 +++++----- htdocs/accountancy/class/accountingjournal.class.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 31a5593dd39..fec51f84cee 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -67,7 +67,7 @@ class AccountancyCategory // extends CommonObject public $code; /** - * @var string proper name for given parameter + * @var string Accountancy Category label */ public $label; diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index 8b30070317a..d126bd84acc 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -32,22 +32,22 @@ class AccountancySystem * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ public $error=''; - + var $rowid; var $fk_pcg_version; var $pcg_type; var $pcg_subtype; - + /** - * @var string proper name for given parameter + * @var string Accountancy System label */ public $label; - + var $account_number; var $account_parent; diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index f10e0d1ce01..32a0ea0f448 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -45,7 +45,7 @@ class AccountingJournal extends CommonObject public $code; /** - * @var string proper name for given parameter + * @var string Accounting Journal label */ public $label; From 7354e485b0b3e128fabc816debb2b955a263b714 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 13:22:08 +0200 Subject: [PATCH 12/30] precise label comment --- htdocs/asset/class/asset.class.php | 2 +- htdocs/categories/class/categorie.class.php | 2 +- htdocs/comm/action/class/actioncomm.class.php | 10 +++++----- htdocs/comm/action/class/cactioncomm.class.php | 8 ++++---- htdocs/commande/class/commande.class.php | 2 +- htdocs/compta/bank/class/account.class.php | 2 +- htdocs/compta/bank/class/bankcateg.class.php | 2 +- htdocs/compta/bank/class/paymentvarious.class.php | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 70b45e88d73..72ec7e9707e 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -105,7 +105,7 @@ class Asset extends CommonObject public $entity; /** - * @var string proper name for given parameter + * @var string Asset label */ public $label; diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index c028aee050d..b752af7157b 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -161,7 +161,7 @@ class Categorie extends CommonObject public $fk_parent; /** - * @var string proper name for given parameter + * @var string Category label */ public $label; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 0bc0a8236f6..45a1ff2380f 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -38,21 +38,21 @@ class ActionComm extends CommonObject * @var string ID to identify managed object */ public $element='action'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'actioncomm'; - + public $table_rowid = 'id'; public $picto='action'; - + /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * @var int */ public $ismultientitymanaged = 1; - + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user, 2=Same than 1 but accept record if fksoc is empty * @var integer @@ -78,7 +78,7 @@ class ActionComm extends CommonObject var $code; // Free code to identify action. Ie: Agenda trigger add here AC_TRIGGERNAME ('AC_COMPANY_CREATE', 'AC_PROPAL_VALIDATE', ...) /** - * @var string proper name for given parameter + * @var string Agenda event label */ public $label; diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 43844522a5a..68f2f723976 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -32,7 +32,7 @@ class CActionComm * @var string Error code (or message) */ public $error=''; - + /** * @var DoliDB Database handler. */ @@ -46,12 +46,12 @@ class CActionComm var $code; var $type; var $libelle; // deprecated - + /** - * @var string proper name for given parameter + * @var string Type of agenda event label */ public $label; - + var $active; var $color; var $picto; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index c392684d967..8426a714e58 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3814,7 +3814,7 @@ class OrderLine extends CommonOrderLine var $fk_facture; /** - * @var string proper name for given parameter + * @var string Order lines label */ public $label; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index e2344693f3f..a28555d9c1d 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1679,7 +1679,7 @@ class AccountLine extends CommonObject var $amount; /** - * @var string proper name for given parameter + * @var string bank transaction lines label */ public $label; diff --git a/htdocs/compta/bank/class/bankcateg.class.php b/htdocs/compta/bank/class/bankcateg.class.php index 9aefcd5d863..3c07d9b49b9 100644 --- a/htdocs/compta/bank/class/bankcateg.class.php +++ b/htdocs/compta/bank/class/bankcateg.class.php @@ -35,7 +35,7 @@ class BankCateg // extends CommonObject public $id; /** - * @var string proper name for given parameter + * @var string bank categories label */ public $label; diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 595b503004c..e21e052e478 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -61,7 +61,7 @@ class PaymentVarious extends CommonObject var $num_payment; /** - * @var string proper name for given parameter + * @var string various payments label */ public $label; From 7b47c79bc38d47379be29039c772153c42e1d9e7 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 14:06:58 +0200 Subject: [PATCH 13/30] precise label comment --- htdocs/compta/localtax/class/localtax.class.php | 2 +- htdocs/compta/salaries/class/paymentsalary.class.php | 2 +- htdocs/compta/tva/class/tva.class.php | 10 +++++----- htdocs/core/class/ccountry.class.php | 12 ++++++------ htdocs/core/class/ctyperesource.class.php | 4 ++-- htdocs/core/class/fiscalyear.class.php | 2 +- htdocs/core/class/html.formmail.class.php | 2 +- htdocs/core/class/link.class.php | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 2d98182b668..764ba119dc7 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -48,7 +48,7 @@ class Localtax extends CommonObject var $amount; /** - * @var string proper name for given parameter + * @var string local tax */ public $label; diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 9119a7bf02a..a7a8736b96a 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -58,7 +58,7 @@ class PaymentSalary extends CommonObject public $num_payment; /** - * @var string proper name for given parameter + * @var string salary payments label */ public $label; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 538c33152ea..24c660f789c 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -37,12 +37,12 @@ class Tva extends CommonObject * @var string ID to identify managed object */ public $element='tva'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='tva'; - + public $picto='payment'; var $tms; @@ -51,12 +51,12 @@ class Tva extends CommonObject var $amount; var $type_payment; var $num_payment; - + /** - * @var string proper name for given parameter + * @var string label */ public $label; - + var $fk_bank; var $fk_user_creat; var $fk_user_modif; diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index 30f426ec30d..f25e0a14ce5 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -36,7 +36,7 @@ class Ccountry // extends CommonObject * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ @@ -46,7 +46,7 @@ class Ccountry // extends CommonObject * @var string[] Error codes (or messages) */ public $errors = array(); - + //var $element='ccountry'; //!< Id that identify managed objects //var $table_element='ccountry'; //!< Name of table without prefix where object is stored @@ -54,15 +54,15 @@ class Ccountry // extends CommonObject * @var int ID */ public $id; - + var $code; var $code_iso; - + /** - * @var string proper name for given parameter + * @var string Countries label */ public $label; - + var $active; diff --git a/htdocs/core/class/ctyperesource.class.php b/htdocs/core/class/ctyperesource.class.php index d459ff6fb41..ae4036214a2 100644 --- a/htdocs/core/class/ctyperesource.class.php +++ b/htdocs/core/class/ctyperesource.class.php @@ -50,7 +50,7 @@ class Ctyperesource public $code; /** - * @var string proper name for given parameter + * @var string Type resource label */ public $label; @@ -486,7 +486,7 @@ class CtyperesourceLine public $code; /** - * @var string proper name for given parameter + * @var string Type resource line label */ public $label; diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index b822402bd2e..72a5ad644e4 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -45,7 +45,7 @@ class Fiscalyear extends CommonObject var $rowid; /** - * @var string proper name for given parameter + * @var string fiscal year label */ public $label; diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index bbe809dcf3a..ac7968cbd52 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1399,7 +1399,7 @@ class ModelMail public $id; /** - * @var string proper name for given parameter + * @var string Model mail label */ public $label; diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index 47911a48829..b1196d6746b 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -47,7 +47,7 @@ class Link extends CommonObject public $url; /** - * @var string proper name for given parameter + * @var string Links label */ public $label; From bd473059ae0d8b9d8a3bd831e32d9d2bdf9e4d46 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 14:13:05 +0200 Subject: [PATCH 14/30] precise label comment --- htdocs/core/modules/export/export_csv.modules.php | 14 +++++++------- .../core/modules/export/export_excel.modules.php | 12 ++++++------ .../modules/export/export_excel2007.modules.php | 10 +++++----- htdocs/core/modules/export/export_tsv.modules.php | 10 +++++----- htdocs/core/modules/import/import_csv.modules.php | 10 +++++----- htdocs/core/modules/import/import_xlsx.modules.php | 10 +++++----- htdocs/core/modules/import/modules_import.php | 2 +- htdocs/ecm/class/ecmdirectory.class.php | 2 +- htdocs/livraison/class/livraison.class.php | 4 ++-- 9 files changed, 37 insertions(+), 37 deletions(-) diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php index 3f16b398f75..edcdacef6e0 100644 --- a/htdocs/core/modules/export/export_csv.modules.php +++ b/htdocs/core/modules/export/export_csv.modules.php @@ -34,12 +34,12 @@ class ExportCsv extends ModeleExports * @var int ID */ public $id; - + /** - * @var string proper name for given parameter + * @var string export files label */ public $label; - + var $extension; var $version; @@ -265,7 +265,7 @@ class ExportCsv extends ModeleExports $array = $array['options']; $newvalue = $array[$newvalue]; } - + fwrite($this->handle,$newvalue.$this->separator); $this->col++; } @@ -310,14 +310,14 @@ class ExportCsv extends ModeleExports { global $conf; $addquote=0; - + // Rule Dolibarr: No HTML //print $charset.' '.$newvalue."\n"; //$newvalue=dol_string_nohtmltag($newvalue,0,$charset); $newvalue=dol_htmlcleanlastbr($newvalue); //print $charset.' '.$newvalue."\n"; - + // Rule 1 CSV: No CR, LF in cells (except if USE_STRICT_CSV_RULES is on, we can keep record as it is but we must add quotes) $oldvalue=$newvalue; $newvalue=str_replace("\r",'',$newvalue); @@ -328,7 +328,7 @@ class ExportCsv extends ModeleExports $newvalue=$oldvalue; $addquote=1; } - + // Rule 2 CSV: If value contains ", we must escape with ", and add " if (preg_match('/"/',$newvalue)) { diff --git a/htdocs/core/modules/export/export_excel.modules.php b/htdocs/core/modules/export/export_excel.modules.php index 216f45b0148..c4fe3c5bbbf 100644 --- a/htdocs/core/modules/export/export_excel.modules.php +++ b/htdocs/core/modules/export/export_excel.modules.php @@ -36,12 +36,12 @@ class ExportExcel extends ModeleExports * @var int ID */ public $id; - + /** - * @var string proper name for given parameter + * @var string Export Excel label */ public $label; - + var $extension; var $version; @@ -73,7 +73,7 @@ class ExportExcel extends ModeleExports $this->version='1.30'; // Driver version $this->disabled = (in_array(constant('PHPEXCEL_PATH'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages) - + if (empty($this->disabled)) { // If driver use an external library, put its name here @@ -337,14 +337,14 @@ class ExportExcel extends ModeleExports $newvalue=$this->excel_clean($newvalue); $typefield=isset($array_types[$code])?$array_types[$code]:''; - + if (preg_match('/^Select:/i', $typefield, $reg) && $typefield = substr($typefield, 7)) { $array = unserialize($typefield); $array = $array['options']; $newvalue = $array[$newvalue]; } - + // Traduction newvalue if (preg_match('/^\((.*)\)$/i',$newvalue,$reg)) { diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php index 578f2323857..9a7dc5df1b1 100644 --- a/htdocs/core/modules/export/export_excel2007.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -37,12 +37,12 @@ class ExportExcel2007 extends ExportExcel * @var int ID */ public $id; - + /** - * @var string proper name for given parameter + * @var string label */ public $label; - + var $extension; var $version; @@ -73,7 +73,7 @@ class ExportExcel2007 extends ExportExcel $this->version='1.30'; // Driver version $this->disabled = (in_array(constant('PHPEXCEL_PATH'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages) - + if (empty($this->disabled)) { // If driver use an external library, put its name here @@ -93,7 +93,7 @@ class ExportExcel2007 extends ExportExcel $this->version_lib='1.8.0'; // No way to get info from library } } - + $this->row=0; } diff --git a/htdocs/core/modules/export/export_tsv.modules.php b/htdocs/core/modules/export/export_tsv.modules.php index ff5aa403015..a9d46817cd7 100644 --- a/htdocs/core/modules/export/export_tsv.modules.php +++ b/htdocs/core/modules/export/export_tsv.modules.php @@ -35,12 +35,12 @@ class ExportTsv extends ModeleExports * @var int ID */ public $id; - + /** - * @var string proper name for given parameter + * @var string label */ public $label; - + var $extension; var $version; @@ -234,14 +234,14 @@ class ExportTsv extends ModeleExports if (preg_match('/^\((.*)\)$/i',$newvalue,$reg)) $newvalue=$outputlangs->transnoentities($reg[1]); $newvalue=$this->tsv_clean($newvalue,$outputlangs->charset_output); - + if (preg_match('/^Select:/i', $typefield, $reg) && $typefield = substr($typefield, 7)) { $array = unserialize($typefield); $array = $array['options']; $newvalue = $array[$newvalue]; } - + fwrite($this->handle,$newvalue.$this->separator); $this->col++; } diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index dd9e6622cd8..07d1875c5e3 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -37,14 +37,14 @@ class ImportCsv extends ModeleImports * @var DoliDB Database handler. */ public $db; - + var $datatoimport; /** * @var string Error code (or message) */ public $error=''; - + /** * @var string[] Error codes (or messages) */ @@ -54,12 +54,12 @@ class ImportCsv extends ModeleImports * @var int ID */ public $id; - + /** - * @var string proper name for given parameter + * @var string label */ public $label; - + var $extension; // Extension of files imported by driver var $version; // Version of driver diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index c95fec3965c..ae8d55c3f4e 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -37,14 +37,14 @@ class ImportXlsx extends ModeleImports * @var DoliDB Database handler. */ public $db; - + var $datatoimport; /** * @var string Error code (or message) */ public $error=''; - + /** * @var string[] Error codes (or messages) */ @@ -54,12 +54,12 @@ class ImportXlsx extends ModeleImports * @var int ID */ public $id; - + /** - * @var string proper name for given parameter + * @var string label */ public $label; - + var $extension; // Extension of files imported by driver var $version; // Version of driver diff --git a/htdocs/core/modules/import/modules_import.php b/htdocs/core/modules/import/modules_import.php index 7f38007d2d0..98c667afac9 100644 --- a/htdocs/core/modules/import/modules_import.php +++ b/htdocs/core/modules/import/modules_import.php @@ -45,7 +45,7 @@ class ModeleImports public $id; /** - * @var string proper name for given parameter + * @var string label */ public $label; diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index b9d99614a60..509d6cd19eb 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -45,7 +45,7 @@ class EcmDirectory // extends CommonObject public $id; /** - * @var string proper name for given parameter + * @var string ECM directories label */ public $label; diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index f97d1dd7be1..aa091665905 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -1061,7 +1061,7 @@ class Livraison extends CommonObject /** - * Classe de gestion des lignes de bons de livraison + * Management class of delivery note lines */ class LivraisonLigne extends CommonObjectLine { @@ -1079,7 +1079,7 @@ class LivraisonLigne extends CommonObjectLine var $origin_id; /** - * @var string proper name for given parameter + * @var string delivery note lines label */ public $label; From b27358790927ab413b28a97ecd7cd299db7c5300 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 14:28:30 +0200 Subject: [PATCH 15/30] translations --- htdocs/livraison/class/livraison.class.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index aa091665905..eaa999882cf 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -24,7 +24,7 @@ /** * \file htdocs/livraison/class/livraison.class.php * \ingroup delivery - * \brief Fichier de la classe de gestion des bons de livraison + * \brief Delivery Order Management Class File */ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; @@ -158,7 +158,7 @@ class Livraison extends CommonObject /* - * Insertion des produits dans la base + * Inserting products into the database */ $num=count($this->lines); for ($i = 0; $i < $num; $i++) @@ -310,7 +310,7 @@ class Livraison extends CommonObject if ($this->statut == 0) $this->brouillon = 1; - // Retreive all extrafield + // Retreive all extrafields // fetch optionals attributes and labels $this->fetch_optionals(); @@ -361,7 +361,7 @@ class Livraison extends CommonObject { if (! empty($conf->global->LIVRAISON_ADDON_NUMBER)) { - // Definition du nom de module de numerotation de commande + // Setting the command numbering module name $modName = $conf->global->LIVRAISON_ADDON_NUMBER; if (is_readable(DOL_DOCUMENT_ROOT .'/core/modules/livraison/'.$modName.'.php')) @@ -370,7 +370,7 @@ class Livraison extends CommonObject $now=dol_now(); - // Recuperation de la nouvelle reference + // Retrieving the new reference $objMod = new $modName($this->db); $soc = new Societe($this->db); $soc->fetch($this->socid); @@ -385,8 +385,7 @@ class Livraison extends CommonObject } $this->newref = $numref; - // Tester si non deja au statut valide. Si oui, on arrete afin d'eviter - // de decrementer 2 fois le stock. + // Test if is not already in valid status. If so, we stop to avoid decrementing the stock twice. $sql = "SELECT ref"; $sql.= " FROM ".MAIN_DB_PREFIX."livraison"; $sql.= " WHERE ref = '".$this->db->escape($numref)."'"; @@ -493,10 +492,10 @@ class Livraison extends CommonObject } /** - * Cree le bon de livraison depuis une expedition existante + * Creating the delivery slip from an existing shipment * - * @param User $user Utilisateur qui cree - * @param int $sending_id Id de l'expedition qui sert de modele + * @param User $user User who creates + * @param int $sending_id Id of the expedition that serves as a model * @return integer */ function create_from_sending($user, $sending_id) @@ -1084,7 +1083,7 @@ class LivraisonLigne extends CommonObjectLine public $label; /** - * @var string description produit + * @var string product description */ public $description; From f77dd2ebc787056dd1886272e7bc25258d79f4c2 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 15:13:59 +0200 Subject: [PATCH 16/30] Standardize and update code --- .../class/accountingjournal.class.php | 4 ++ htdocs/comm/propal/class/propal.class.php | 7 +++- htdocs/commande/class/commande.class.php | 5 +++ .../deplacement/class/deplacement.class.php | 5 +++ .../facture/class/facture-rec.class.php | 11 +++-- htdocs/compta/facture/class/facture.class.php | 11 +++-- htdocs/contrat/class/contrat.class.php | 5 +++ htdocs/core/class/comment.class.php | 6 ++- htdocs/core/class/fiscalyear.class.php | 21 ++++++---- htdocs/don/class/don.class.php | 42 ++++++++++--------- 10 files changed, 82 insertions(+), 35 deletions(-) diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 32a0ea0f448..b062b9495b9 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -36,7 +36,11 @@ class AccountingJournal extends CommonObject */ public $table_element='accounting_journal'; + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element = ''; + public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto = 'generic'; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 6e14b14ea48..bac7cbfcf36 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -56,7 +56,12 @@ class Propal extends CommonObject public $table_element='propal'; public $table_element_line='propaldet'; - public $fk_element='fk_propal'; + + /** + * @var int Field with ID of parent key if this field has a parent + */ + public $fk_element ='fk_propal'; + public $picto='propal'; /** diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 8426a714e58..5e0475b158a 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -54,7 +54,12 @@ class Commande extends CommonOrder public $table_element_line = 'commandedet'; public $class_element_line = 'OrderLine'; + + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element = 'fk_commande'; + public $picto = 'order'; /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 71ca92093a7..c6c95a0e282 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -42,7 +42,12 @@ class Deplacement extends CommonObject public $table_element='deplacement'; public $table_element_line = ''; + + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element = ''; + public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe var $datec; // Creation date diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index b6be8315897..7d054d054da 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -43,14 +43,19 @@ class FactureRec extends CommonInvoice * @var string ID to identify managed object */ public $element='facturerec'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='facture_rec'; - + public $table_element_line='facturedet_rec'; + + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element='fk_facture'; + public $picto='bill'; var $entity; @@ -1651,7 +1656,7 @@ class FactureLigneRec extends CommonInvoiceLine * @var string ID to identify managed object */ public $element='facturedetrec'; - + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 7b743ad0b36..0b77f7c5c07 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -57,14 +57,19 @@ class Facture extends CommonInvoice * @var string ID to identify managed object */ public $element='facture'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='facture'; - + public $table_element_line = 'facturedet'; + + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element = 'fk_facture'; + public $picto='bill'; /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe @@ -4242,7 +4247,7 @@ class FactureLigne extends CommonInvoiceLine * @var string ID to identify managed object */ public $element='facturedet'; - + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 8c89ffa810f..4f153cf33d7 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -52,7 +52,12 @@ class Contrat extends CommonObject public $table_element='contrat'; public $table_element_line='contratdet'; + + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element='fk_contrat'; + public $picto='contract'; /** diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index 33e727dcfd0..b75b4050788 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -31,7 +31,11 @@ class Comment extends CommonObject */ public $table_element='comment'; - public $fk_element; + /** + * @var int Field with ID of parent key if this field has a parent + */ + public $fk_element =''; + public $element_type; /** diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 72a5ad644e4..ad8c98d43c8 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -39,24 +39,29 @@ class Fiscalyear extends CommonObject public $table_element='accounting_fiscalyear'; public $table_element_line = ''; + + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element = ''; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - var $rowid; + public $rowid; /** * @var string fiscal year label */ public $label; - var $date_start; - var $date_end; - var $datec; - var $statut; // 0=open, 1=closed - var $entity; + public $date_start; + public $date_end; + public $datec; + public $statut; // 0=open, 1=closed + public $entity; - var $statuts=array(); - var $statuts_short=array(); + public $statuts=array(); + public $statuts_short=array(); /** * Constructor diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index de24f60a9c0..85d0fb81b8c 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -38,38 +38,42 @@ class Don extends CommonObject * @var string ID to identify managed object */ public $element='don'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='don'; - + + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element = 'fk_donation'; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - var $picto = 'generic'; + public $picto = 'generic'; - var $date; - var $amount; - var $societe; - var $address; - var $zip; - var $town; - var $email; - var $public; - var $fk_project; - var $fk_typepayment; - var $num_payment; - var $date_valid; - var $modepaymentid = 0; + public $date; + public $amount; + public $societe; + public $address; + public $zip; + public $town; + public $email; + public $public; + public $fk_project; + public $fk_typepayment; + public $num_payment; + public $date_valid; + public $modepaymentid = 0; - var $labelstatut; - var $labelstatutshort; + public $labelstatut; + public $labelstatutshort; /** * @deprecated * @see note_private, note_public */ - var $commentaire; + public $commentaire; /** From 45cbc36a1575fbe1a7ffbcd2831ee999cf5097b4 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 15:27:55 +0200 Subject: [PATCH 17/30] Standardize and update code --- htdocs/fichinter/class/fichinter.class.php | 45 +++++++++++-------- .../class/fournisseur.commande.class.php | 7 ++- .../fourn/class/fournisseur.facture.class.php | 7 ++- htdocs/hrm/class/establishment.class.php | 5 +++ htdocs/livraison/class/livraison.class.php | 17 ++++--- htdocs/product/class/product.class.php | 4 ++ htdocs/projet/class/project.class.php | 7 ++- htdocs/projet/class/task.class.php | 4 ++ htdocs/societe/class/societe.class.php | 4 ++ 9 files changed, 71 insertions(+), 29 deletions(-) diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 59d4ecabad1..40ca5862df0 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -45,7 +45,11 @@ class Fichinter extends CommonObject */ public $table_element='fichinter'; + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element='fk_fichinter'; + public $table_element_line='fichinterdet'; public $picto = 'intervention'; @@ -54,28 +58,28 @@ class Fichinter extends CommonObject */ protected $table_ref_field = 'ref'; - var $socid; // Id client + public $socid; // Id client - var $author; - var $datec; - var $datev; - var $dateo; - var $datee; - var $datet; - var $datem; - var $duration; - var $statut = 0; // 0=draft, 1=validated, 2=invoiced, 3=Terminate + public $author; + public $datec; + public $datev; + public $dateo; + public $datee; + public $datet; + public $datem; + public $duration; + public $statut = 0; // 0=draft, 1=validated, 2=invoiced, 3=Terminate /** * @var string description */ public $description; - var $fk_contrat = 0; - var $fk_project = 0; - var $extraparams=array(); + public $fk_contrat = 0; + public $fk_project = 0; + public $extraparams=array(); - var $lines = array(); + public $lines = array(); /** * Draft status @@ -1332,11 +1336,11 @@ class FichinterLigne extends CommonObjectLine public $error=''; // From llx_fichinterdet - var $fk_fichinter; - var $desc; // Description ligne - var $datei; // Date intervention - var $duration; // Duree de l'intervention - var $rang = 0; + public $fk_fichinter; + public $desc; // Description ligne + public $datei; // Date intervention + public $duration; // Duree de l'intervention + public $rang = 0; /** * @var string ID to identify managed object @@ -1348,6 +1352,9 @@ class FichinterLigne extends CommonObjectLine */ public $table_element='fichinterdet'; + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element='fk_fichinter'; /** diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 9ea7febfbd9..b2c05eb4253 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -51,7 +51,12 @@ class CommandeFournisseur extends CommonOrder public $table_element='commande_fournisseur'; public $table_element_line = 'commande_fournisseurdet'; - public $fk_element = 'fk_commande'; + + /** + * @var int Field with ID of parent key if this field has a parent + */ + public $fk_element = 'fk_commande'; + public $picto='order'; /** diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 1eece0f0316..2f50e9ac137 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -52,7 +52,12 @@ class FactureFournisseur extends CommonInvoice public $table_element='facture_fourn'; public $table_element_line='facture_fourn_det'; - public $fk_element='fk_facture_fourn'; + + /** + * @var int Field with ID of parent key if this field has a parent + */ + public $fk_element='fk_facture_fourn'; + public $picto='bill'; /** diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 90b06d9fd0f..7cd7eff5d68 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -39,7 +39,12 @@ class Establishment extends CommonObject public $table_element='establishment'; public $table_element_line = ''; + + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element = 'fk_establishment'; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto='building'; diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index eaa999882cf..8b8236e62e9 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -44,6 +44,9 @@ class Livraison extends CommonObject */ public $element="delivery"; + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element="fk_livraison"; /** @@ -53,14 +56,14 @@ class Livraison extends CommonObject public $table_element_line="livraisondet"; - var $brouillon; - var $socid; - var $ref_customer; + public $brouillon; + public $socid; + public $ref_customer; - var $date_delivery; // Date really received - var $date_creation; - var $date_valid; - var $model_pdf; + public $date_delivery; // Date really received + public $date_creation; + public $date_valid; + public $model_pdf; /** * Constructor diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index ebb40516636..57a969cb924 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -53,7 +53,11 @@ class Product extends CommonObject */ public $table_element='product'; + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element='fk_product'; + protected $childtables=array('supplier_proposaldet', 'propaldet','commandedet','facturedet','contratdet','facture_fourn_det','commande_fournisseurdet'); // To test if we can delete object public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index cf706f47e44..48e322b3a3e 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -44,7 +44,12 @@ class Project extends CommonObject public $table_element = 'projet'; public $table_element_line = 'projet_task'; - public $fk_element = 'fk_projet'; + + /** + * @var int Field with ID of parent key if this field has a parent + */ + public $fk_element = 'fk_projet'; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto = 'projectpub'; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 6cd128380e5..be72fafc261 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -41,7 +41,11 @@ class Task extends CommonObject */ public $table_element='projet_task'; + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element='fk_task'; + public $picto = 'task'; protected $childtables=array('projet_task_time'); // To test if we can delete object diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 19e87aeb5af..3eb85ff9365 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -51,7 +51,11 @@ class Societe extends CommonObject */ public $table_element = 'societe'; + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element='fk_soc'; + public $fieldsforcombobox='nom,name_alias'; protected $childtables=array("supplier_proposal"=>'SupplierProposal',"propal"=>'Proposal',"commande"=>'Order',"facture"=>'Invoice',"facture_rec"=>'RecurringInvoiceTemplate',"contrat"=>'Contract',"fichinter"=>'Fichinter',"facture_fourn"=>'SupplierInvoice',"commande_fournisseur"=>'SupplierOrder',"projet"=>'Project',"expedition"=>'Shipment',"prelevement_lignes"=>'DirectDebitRecord'); // To test if we can delete object protected $childtablesoncascade=array("societe_prices", "societe_log", "societe_address", "product_fournisseur_price", "product_customer_price_log", "product_customer_price", "socpeople", "adherent", "societe_rib", "societe_remise", "societe_remise_except", "societe_commerciaux", "categorie", "notify", "notify_def", "actioncomm"); From d86d7323fb03168459f8d154cac2e1bf9faf9952 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 22:46:35 +0200 Subject: [PATCH 18/30] Update code --- .../class/accountingaccount.class.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 06a9e1b1955..894fea8c356 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -71,15 +71,15 @@ class AccountingAccount extends CommonObject */ public $id; - var $rowid; - var $datec; // Creation date - var $fk_pcg_version; - var $pcg_type; - var $pcg_subtype; - var $account_number; - var $account_parent; - var $account_category; - var $status; + public $rowid; + public $datec; // Creation date + public $fk_pcg_version; + public $pcg_type; + public $pcg_subtype; + public $account_number; + public $account_parent; + public $account_category; + public $status; /** * @var string Label of account @@ -96,7 +96,7 @@ class AccountingAccount extends CommonObject */ public $fk_user_modif; - var $active; // duplicate with status + public $active; // duplicate with status /** From 7b0d3c32aba6c514a80146c4a7a4b21fa81c368b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 22:55:10 +0200 Subject: [PATCH 19/30] Standardize and Update code --- .../accountancy/class/accountingaccount.class.php | 4 ++++ .../accountancy/class/accountingjournal.class.php | 3 +++ htdocs/asset/class/asset.class.php | 4 ++++ htdocs/core/class/emailsenderprofile.class.php | 4 ++++ htdocs/core/class/fiscalyear.class.php | 3 +++ htdocs/don/class/paymentdonation.class.php | 3 +++ htdocs/fourn/class/fournisseur.facture.class.php | 5 ++++- htdocs/hrm/class/establishment.class.php | 8 +++++++- htdocs/loan/class/loan.class.php | 4 ++++ .../modulebuilder/template/class/myobject.class.php | 3 +++ htdocs/product/inventory/class/inventory.class.php | 3 +++ htdocs/societe/class/companypaymentmode.class.php | 13 +++++++++---- htdocs/stripe/class/stripe.class.php | 4 ++++ 13 files changed, 55 insertions(+), 6 deletions(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 894fea8c356..c2da46c6911 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -71,7 +71,11 @@ class AccountingAccount extends CommonObject */ public $id; + /** + * @var int ID + */ public $rowid; + public $datec; // Creation date public $fk_pcg_version; public $pcg_type; diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index b8d3852246c..852a70d38c2 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -44,6 +44,9 @@ class AccountingJournal extends CommonObject public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto = 'generic'; + /** + * @var int ID + */ public $rowid; public $code; diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 55f2d3f5df0..3ca85a4015f 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -95,6 +95,10 @@ class Asset extends CommonObject 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'visible'=>-2, 'enabled'=>1, 'position'=>1000, 'notnull'=>-1,), 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Active', '-1'=>'Cancel')), ); + + /** + * @var int ID + */ public $rowid; /** diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index 94c9488a085..7b934c68a2b 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -88,6 +88,10 @@ class EmailSenderProfile extends CommonObject 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,), 'active' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'notnull'=>-1, 'index'=>1), ); + + /** + * @var int ID + */ public $rowid; /** diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 9d8a045ba62..dc6bc5d0310 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -47,6 +47,9 @@ class Fiscalyear extends CommonObject public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * @var int ID + */ public $rowid; /** diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index 3a839c2e759..e85cb410cd5 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -41,6 +41,9 @@ class PaymentDonation extends CommonObject public $picto = 'payment'; + /** + * @var int ID + */ public $rowid; public $fk_donation; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index bf263819ced..3633325fdcb 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -77,7 +77,10 @@ class FactureFournisseur extends CommonInvoice */ protected $table_ref_field = 'ref'; - public $rowid; + /** + * @var int ID + */ + public $rowid; /** * @var string Ref diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index d57e45e5073..0b163af9346 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -48,13 +48,19 @@ class Establishment extends CommonObject public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto='building'; - public $id; + /** + * @var int ID + */ + public $id; /** * @var string Ref */ public $ref; + /** + * @var int ID + */ public $rowid; public $name; diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index b1bcbc65567..cd72a54c504 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -43,7 +43,11 @@ class Loan extends CommonObject public $picto = 'bill'; + /** + * @var int ID + */ public $rowid; + public $datestart; public $dateend; public $label; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 42fa508f36a..d34b141bc56 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -101,6 +101,9 @@ class MyObject extends CommonObject 'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')), ); + /** + * @var int ID + */ public $rowid; /** diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index a49a75dd3cc..7e068818db8 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -99,6 +99,9 @@ class Inventory extends CommonObject 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'default'=>0, 'arrayofkeyval'=>array(0=>'Todo', 1=>'Done', -1=>'Cancel')), ); + /** + * @var int ID + */ public $rowid; /** diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index 4f3b666049b..ae405ac6249 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -36,22 +36,22 @@ class CompanyPaymentMode extends CommonObject * @var string ID to identify managed object */ public $element = 'companypaymentmode'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'societe_rib'; - + /** * @var int Does companypaymentmode support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 2; - + /** * @var int Does companypaymentmode support extrafields ? 0=No, 1=Yes */ public $isextrafieldmanaged = 0; - + /** * @var string String with name of icon for companypaymentmode. Must be the part after the 'object_' into object_companypaymentmode.png */ @@ -118,7 +118,12 @@ class CompanyPaymentMode extends CommonObject 'import_key' =>array('type'=>'varchar(14)', 'label'=>'Import key', 'enabled'=>1, 'visible'=>-2, 'position'=>105), //'aaa' =>array('type'=>'date', 'label'=>'Ending date', 'enabled'=>0, 'visible'=>-2, 'position'=>185), ); + + /** + * @var int ID + */ public $rowid; + public $fk_soc; public $label; public $bank; diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 877e767406f..b8a56b6aa15 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -28,7 +28,11 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/config.php'; // This set stripe glo */ class Stripe extends CommonObject { + /** + * @var int ID + */ public $rowid; + public $fk_soc; public $fk_key; public $id; From ae2df6be117acebcf826fda0e432772bd5a54e22 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 23:04:46 +0200 Subject: [PATCH 20/30] Standardize and Update code --- .../accountancy/class/bookkeeping.class.php | 7 ++++-- htdocs/blockedlog/class/blockedlog.class.php | 3 ++- htdocs/cashdesk/class/Facturation.class.php | 7 +++++- .../comm/action/class/cactioncomm.class.php | 14 ++++++------ htdocs/compta/bank/class/bankcateg.class.php | 5 ++++- .../facture/class/paymentterm.class.php | 22 +++++++++---------- htdocs/core/class/ccountry.class.php | 6 ++--- htdocs/core/class/cstate.class.php | 12 +++++----- htdocs/core/class/ctypent.class.php | 14 ++++++------ htdocs/core/class/discount.class.php | 6 ++++- htdocs/core/class/html.formmail.class.php | 3 +++ htdocs/core/class/menubase.class.php | 5 ++++- htdocs/stripe/class/stripe.class.php | 9 ++++++++ 13 files changed, 72 insertions(+), 41 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 38a4fb72028..cacf9b0a641 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -65,8 +65,7 @@ class BookKeeping extends CommonObject * @var int ID */ public $id; - /** - */ + public $doc_date; public $date_lim_reglement; public $doc_type; @@ -1865,7 +1864,11 @@ class BookKeeping extends CommonObject */ class BookKeepingLine { + /** + * @var int ID + */ public $id; + public $doc_date = ''; public $doc_type; public $doc_ref; diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index eaec787b099..dab99d80bc9 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -39,6 +39,7 @@ class BlockedLog * @var int */ public $id; + /** * Entity * @var int @@ -46,7 +47,7 @@ class BlockedLog public $entity; public $error = ''; - + /** * @var string[] Error codes (or messages) */ diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index 755c48faf88..3051035813a 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -37,7 +37,12 @@ class Facturation * int $prix => Prix HT du produit en cours * int $tva => 'rowid' du taux de tva dans llx_c_tva */ - public $id; + + /** + * @var int ID + */ + public $id; + protected $ref; protected $qte; protected $stock; diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 8f189c31e6e..f339e79d6a2 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -43,20 +43,20 @@ class CActionComm */ public $id; - var $code; - var $type; - var $libelle; // deprecated + public $code; + public $type; + public $libelle; // deprecated /** * @var string Type of agenda event label */ public $label; - var $active; - var $color; - var $picto; + public $active; + public $color; + public $picto; - var $type_actions=array(); + public $type_actions=array(); /** diff --git a/htdocs/compta/bank/class/bankcateg.class.php b/htdocs/compta/bank/class/bankcateg.class.php index 3c07d9b49b9..10bcd9a07c4 100644 --- a/htdocs/compta/bank/class/bankcateg.class.php +++ b/htdocs/compta/bank/class/bankcateg.class.php @@ -32,7 +32,10 @@ class BankCateg // extends CommonObject //public $table_element='bank_categ'; //!< Name of table without prefix where object is stored public $picto='generic'; - public $id; + /** + * @var int ID + */ + public $id; /** * @var string bank categories label diff --git a/htdocs/compta/facture/class/paymentterm.class.php b/htdocs/compta/facture/class/paymentterm.class.php index 2bdd288e748..619487e9574 100644 --- a/htdocs/compta/facture/class/paymentterm.class.php +++ b/htdocs/compta/facture/class/paymentterm.class.php @@ -32,7 +32,7 @@ class PaymentTerm // extends CommonObject * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ @@ -42,24 +42,24 @@ class PaymentTerm // extends CommonObject * @var string[] Error codes (or messages) */ public $errors = array(); - + //public $element='c_payment_term'; //!< Id that identify managed objects //public $table_element='c_payment_term'; //!< Name of table without prefix where object is stored - var $context =array(); + public $context =array(); /** * @var int ID */ public $id; - var $code; - var $sortorder; - var $active; - var $libelle; - var $libelle_facture; - var $type_cdr; - var $nbjour; - var $decalage; + public $code; + public $sortorder; + public $active; + public $libelle; + public $libelle_facture; + public $type_cdr; + public $nbjour; + public $decalage; diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index f25e0a14ce5..2f9a8636c8b 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -55,15 +55,15 @@ class Ccountry // extends CommonObject */ public $id; - var $code; - var $code_iso; + public $code; + public $code_iso; /** * @var string Countries label */ public $label; - var $active; + public $active; diff --git a/htdocs/core/class/cstate.class.php b/htdocs/core/class/cstate.class.php index 3b1016aa55f..085da06c754 100644 --- a/htdocs/core/class/cstate.class.php +++ b/htdocs/core/class/cstate.class.php @@ -36,7 +36,7 @@ class Cstate // extends CommonObject * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ @@ -46,7 +46,7 @@ class Cstate // extends CommonObject * @var string[] Error codes (or messages) */ public $errors = array(); - + //var $element='cstate'; //!< Id that identify managed objects //var $table_element='cstate'; //!< Name of table without prefix where object is stored @@ -54,10 +54,10 @@ class Cstate // extends CommonObject * @var int ID */ public $id; - - var $code_departement; - var $nom; - var $active; + + public $code_departement; + public $nom; + public $active; diff --git a/htdocs/core/class/ctypent.class.php b/htdocs/core/class/ctypent.class.php index aa3e6620d4f..9366cf6317b 100644 --- a/htdocs/core/class/ctypent.class.php +++ b/htdocs/core/class/ctypent.class.php @@ -31,7 +31,7 @@ class Ctypent // extends CommonObject * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ @@ -41,7 +41,7 @@ class Ctypent // extends CommonObject * @var string[] Error codes (or messages) */ public $errors = array(); - + //var $element='ctypent'; //!< Id that identify managed objects //var $table_element='ctypent'; //!< Name of table without prefix where object is stored @@ -49,11 +49,11 @@ class Ctypent // extends CommonObject * @var int ID */ public $id; - - var $code; - var $libelle; - var $active; - var $module; + + public $code; + public $libelle; + public $active; + public $module; diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 7ed51a5ed7c..78f713232d4 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -43,7 +43,11 @@ class DiscountAbsolute */ public $errors=array(); - public $id; // Id discount + /** + * @var int ID discount + */ + public $id; + public $fk_soc; public $discount_type; // 0 => customer discount, 1 => supplier discount public $amount_ht; // diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 17a8ec17939..cdc6a20ffa1 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1402,6 +1402,9 @@ class FormMail extends Form */ class ModelMail { + /** + * @var int ID + */ public $id; /** diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 5078d7759ea..7db88051e5e 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -43,7 +43,10 @@ class Menubase */ public $errors = array(); - public $id; + /** + * @var int ID + */ + public $id; public $menu_handler; public $module; diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index b8a56b6aa15..68b3d8f8ef0 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -34,8 +34,14 @@ class Stripe extends CommonObject public $rowid; public $fk_soc; + public $fk_key; + + /** + * @var int ID + */ public $id; + public $mode; /** @@ -44,8 +50,11 @@ class Stripe extends CommonObject public $entity; public $statut; + public $type; + public $code; + public $message; /** From 5cd955731814aaab6f2eb88159f836ff26fd94a9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 23:12:20 +0200 Subject: [PATCH 21/30] Standardize and Update code --- .../modules/export/export_csv.modules.php | 12 +++---- .../modules/export/export_excel.modules.php | 18 +++++----- .../export/export_excel2007.modules.php | 18 +++++----- .../modules/export/export_tsv.modules.php | 12 +++---- .../modules/import/import_csv.modules.php | 22 ++++++------ .../modules/import/import_xlsx.modules.php | 24 ++++++------- .../generate/modGeneratePassNone.class.php | 12 +++---- .../generate/modGeneratePassPerso.class.php | 36 +++++++++---------- .../modGeneratePassStandard.class.php | 12 +++---- htdocs/cron/class/cronjob.class.php | 3 ++ htdocs/ecm/class/ecmdirectory.class.php | 18 +++++----- 11 files changed, 95 insertions(+), 92 deletions(-) diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php index 8c56f11274a..a0f8f0df543 100644 --- a/htdocs/core/modules/export/export_csv.modules.php +++ b/htdocs/core/modules/export/export_csv.modules.php @@ -40,15 +40,15 @@ class ExportCsv extends ModeleExports */ public $label; - var $extension; - var $version; + public $extension; + public $version; - var $label_lib; - var $version_lib; + public $label_lib; + public $version_lib; - var $separator; + public $separator; - var $handle; // Handle fichier + public $handle; // Handle fichier /** diff --git a/htdocs/core/modules/export/export_excel.modules.php b/htdocs/core/modules/export/export_excel.modules.php index 55cd439376b..6c50b3c46de 100644 --- a/htdocs/core/modules/export/export_excel.modules.php +++ b/htdocs/core/modules/export/export_excel.modules.php @@ -42,17 +42,17 @@ class ExportExcel extends ModeleExports */ public $label; - var $extension; - var $version; + public $extension; + public $version; - var $label_lib; - var $version_lib; + public $label_lib; + public $version_lib; - var $workbook; // Handle fichier - var $worksheet; // Handle onglet - var $row; - var $col; - var $file; // To save filename + public $workbook; // Handle fichier + public $worksheet; // Handle onglet + public $row; + public $col; + public $file; // To save filename /** diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php index 63242ef1c4e..3deb88d6991 100644 --- a/htdocs/core/modules/export/export_excel2007.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -43,17 +43,17 @@ class ExportExcel2007 extends ExportExcel */ public $label; - var $extension; - var $version; + public $extension; + public $version; - var $label_lib; - var $version_lib; + public $label_lib; + public $version_lib; - var $workbook; // Handle fichier - var $worksheet; // Handle onglet - var $row; - var $col; - var $file; // To save filename + public $workbook; // Handle fichier + public $worksheet; // Handle onglet + public $row; + public $col; + public $file; // To save filename /** * Constructor diff --git a/htdocs/core/modules/export/export_tsv.modules.php b/htdocs/core/modules/export/export_tsv.modules.php index c1a320a48ae..db96382a04a 100644 --- a/htdocs/core/modules/export/export_tsv.modules.php +++ b/htdocs/core/modules/export/export_tsv.modules.php @@ -41,15 +41,15 @@ class ExportTsv extends ModeleExports */ public $label; - var $extension; - var $version; + public $extension; + public $version; - var $label_lib; - var $version_lib; + public $label_lib; + public $version_lib; - var $separator="\t"; + public $separator="\t"; - var $handle; // Handle fichier + public $handle; // Handle fichier /** diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 3834e03d0dc..36a5d3d70ba 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -60,22 +60,22 @@ class ImportCsv extends ModeleImports */ public $label; - var $extension; // Extension of files imported by driver - var $version; // Version of driver + public $extension; // Extension of files imported by driver + public $version; // Version of driver - var $label_lib; // Label of external lib used by driver - var $version_lib; // Version of external lib used by driver + public $label_lib; // Label of external lib used by driver + public $version_lib; // Version of external lib used by driver - var $separator; + public $separator; - var $file; // Path of file - var $handle; // Handle fichier + public $file; // Path of file + public $handle; // Handle fichier - var $cacheconvert=array(); // Array to cache list of value found after a convertion - var $cachefieldtable=array(); // Array to cache list of value found into fields@tables + public $cacheconvert=array(); // Array to cache list of value found after a convertion + public $cachefieldtable=array(); // Array to cache list of value found into fields@tables - var $nbinsert = 0; // # of insert done during the import - var $nbupdate = 0; // # of update done during the import + public $nbinsert = 0; // # of insert done during the import + public $nbupdate = 0; // # of update done during the import /** diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index 6db66d33b02..9ac1d8bc6a6 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -60,23 +60,23 @@ class ImportXlsx extends ModeleImports */ public $label; - var $extension; // Extension of files imported by driver - var $version; // Version of driver + public $extension; // Extension of files imported by driver + public $version; // Version of driver - var $label_lib; // Label of external lib used by driver - var $version_lib; // Version of external lib used by driver + public $label_lib; // Label of external lib used by driver + public $version_lib; // Version of external lib used by driver - var $separator; + public $separator; - var $file; // Path of file - var $handle; // Handle fichier + public $file; // Path of file + public $handle; // Handle fichier - var $cacheconvert=array(); // Array to cache list of value found after a convertion - var $cachefieldtable=array(); // Array to cache list of value found into fields@tables + public $cacheconvert=array(); // Array to cache list of value found after a convertion + public $cachefieldtable=array(); // Array to cache list of value found into fields@tables - var $workbook; // temporary import file - var $record; // current record - var $headers; + public $workbook; // temporary import file + public $record; // current record + public $headers; /** diff --git a/htdocs/core/modules/security/generate/modGeneratePassNone.class.php b/htdocs/core/modules/security/generate/modGeneratePassNone.class.php index df3071f7b26..d0e8c617217 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassNone.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassNone.class.php @@ -35,17 +35,17 @@ class modGeneratePassNone extends ModeleGenPassword * @var int ID */ public $id; - - var $length; + + public $length; /** * @var DoliDB Database handler. */ public $db; - - var $conf; - var $lang; - var $user; + + public $conf; + public $lang; + public $user; /** diff --git a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php index d0ae019bf09..a95a48d20b2 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php @@ -37,30 +37,30 @@ class modGeneratePassPerso extends ModeleGenPassword * @var int ID */ public $id; - - var $length; - var $length2; // didn't overright display - var $NbMaj; - var $NbNum; - var $NbSpe; - var $NbRepeat; - var $WithoutAmbi; + + public $length; + public $length2; // didn't overright display + public $NbMaj; + public $NbNum; + public $NbSpe; + public $NbRepeat; + public $WithoutAmbi; /** * @var DoliDB Database handler. */ public $db; - - var $conf; - var $lang; - var $user; - var $Maj; - var $Min; - var $Nb; - var $Spe; - var $Ambi; - var $All; + public $conf; + public $lang; + public $user; + + public $Maj; + public $Min; + public $Nb; + public $Spe; + public $Ambi; + public $All; /** * Constructor diff --git a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php index 87a792672fb..d051c173c6d 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php @@ -35,17 +35,17 @@ class modGeneratePassStandard extends ModeleGenPassword * @var int ID */ public $id; - - var $length; + + public $length; /** * @var DoliDB Database handler. */ public $db; - - var $conf; - var $lang; - var $user; + + public $conf; + public $lang; + public $user; /** diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 3850b15187f..e18d918d56a 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -1337,6 +1337,9 @@ class Cronjob extends CommonObject class Cronjobline { + /** + * @var int ID + */ public $id; /** diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index c2de8fef3c7..97885bf2430 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -37,7 +37,7 @@ class EcmDirectory // extends CommonObject */ //public $table_element='ecm_directories'; - var $picto = 'dir'; + public $picto = 'dir'; /** * @var int ID @@ -49,16 +49,16 @@ class EcmDirectory // extends CommonObject */ public $label; - var $fk_parent; + public $fk_parent; /** * @var string description */ public $description; - var $cachenbofdoc=-1; // By default cache initialized with value 'not calculated' - var $date_c; - var $date_m; + public $cachenbofdoc=-1; // By default cache initialized with value 'not calculated' + public $date_c; + public $date_m; public $fk_user_m; public $fk_user_c; @@ -67,11 +67,11 @@ class EcmDirectory // extends CommonObject */ public $ref; - var $cats=array(); - var $motherof=array(); + public $cats=array(); + public $motherof=array(); - var $forbiddenchars = array('<','>',':','/','\\','?','*','|','"'); - var $forbiddencharsdir = array('<','>',':','?','*','|','"'); + public $forbiddenchars = array('<','>',':','/','\\','?','*','|','"'); + public $forbiddencharsdir = array('<','>',':','?','*','|','"'); public $full_arbo_loaded; From db32d8903e2d48d8233297db75f31410b01b58af Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 23:20:20 +0200 Subject: [PATCH 22/30] Standardize and Update code --- .../class/fournisseur.commande.class.php | 5 +- .../fournisseur.commande.dispatch.class.php | 5 +- .../fourn/class/fournisseur.product.class.php | 54 +++++++++---------- .../class/productcustomerprice.class.php | 36 ++++++------- .../class/propalmergepdfproduct.class.php | 16 +++--- .../class/price_expression.class.php | 12 ++--- .../class/price_global_variable.class.php | 4 +- .../price_global_variable_updater.class.php | 16 +++--- .../inventory/class/inventory.class.php | 2 + htdocs/societe/class/address.class.php | 9 ++++ 10 files changed, 88 insertions(+), 71 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 0f727559507..6768097f7c1 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -76,7 +76,10 @@ class CommandeFournisseur extends CommonOrder */ protected $table_ref_field = 'ref'; - public $id; + /** + * @var int ID + */ + public $id; /** * Supplier order reference diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index 4052d17b8b0..2e1162873d5 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -60,7 +60,10 @@ class CommandeFournisseurDispatch extends CommonObject public $table_element='commande_fournisseur_dispatch'; //!< Name of table without prefix where object is stored public $lines=array(); - public $id; + /** + * @var int ID + */ + public $id; public $fk_commande; public $fk_product; diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 77a31689237..994358e4511 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -41,52 +41,52 @@ class ProductFournisseur extends Product * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ public $error=''; - var $product_fourn_price_id; // id of ligne product-supplier + public $product_fourn_price_id; // id of ligne product-supplier /** * @var int ID */ public $id; - + /** * @deprecated * @see ref_supplier */ - var $fourn_ref; - var $delivery_time_days; - var $ref_supplier; // ref supplier (can be set by get_buyprice) - var $desc_supplier; - var $vatrate_supplier; // default vat rate for this supplier/qty/product (can be set by get_buyprice) + public $fourn_ref; + public $delivery_time_days; + public $ref_supplier; // ref supplier (can be set by get_buyprice) + public $desc_supplier; + public $vatrate_supplier; // default vat rate for this supplier/qty/product (can be set by get_buyprice) - var $fourn_id; //supplier id - var $fourn_qty; // quantity for price (can be set by get_buyprice) - var $fourn_pu; // unit price for quantity (can be set by get_buyprice) + public $fourn_id; //supplier id + public $fourn_qty; // quantity for price (can be set by get_buyprice) + public $fourn_pu; // unit price for quantity (can be set by get_buyprice) - var $fourn_price; // price for quantity - var $fourn_remise_percent; // discount for quantity (percent) - var $fourn_remise; // discount for quantity (amount) - var $product_fourn_id; // supplier id - var $fk_availability; // availability delay - visible/used if option FOURN_PRODUCT_AVAILABILITY is on (duplicate information compared to delivery delay) - var $fourn_unitprice; - var $fourn_tva_tx; - var $fourn_tva_npr; + public $fourn_price; // price for quantity + public $fourn_remise_percent; // discount for quantity (percent) + public $fourn_remise; // discount for quantity (amount) + public $product_fourn_id; // supplier id + public $fk_availability; // availability delay - visible/used if option FOURN_PRODUCT_AVAILABILITY is on (duplicate information compared to delivery delay) + public $fourn_unitprice; + public $fourn_tva_tx; + public $fourn_tva_npr; - var $fk_supplier_price_expression; - var $supplier_reputation; // reputation of supplier - var $reputations=array(); // list of available supplier reputations + public $fk_supplier_price_expression; + public $supplier_reputation; // reputation of supplier + public $reputations=array(); // list of available supplier reputations // Multicurreny - var $fourn_multicurrency_id; - var $fourn_multicurrency_code; - var $fourn_multicurrency_tx; - var $fourn_multicurrency_price; - var $fourn_multicurrency_unitprice; + public $fourn_multicurrency_id; + public $fourn_multicurrency_code; + public $fourn_multicurrency_tx; + public $fourn_multicurrency_price; + public $fourn_multicurrency_unitprice; /** * Constructor diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 011a95345db..35ba8621ae8 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -970,28 +970,28 @@ class PriceByCustomerLine */ public $id; - 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 $default_vat_code; - var $tva_tx; - var $recuperableonly; - var $localtax1_tx; - var $localtax2_tx; + public $entity; + public $datec = ''; + public $tms = ''; + public $fk_product; + public $fk_soc; + public $price; + public $price_ttc; + public $price_min; + public $price_min_ttc; + public $price_base_type; + public $default_vat_code; + public $tva_tx; + public $recuperableonly; + public $localtax1_tx; + public $localtax2_tx; /** * @var int User ID */ public $fk_user; - var $import_key; - var $socname; - var $prodref; + public $import_key; + public $socname; + public $prodref; } diff --git a/htdocs/product/class/propalmergepdfproduct.class.php b/htdocs/product/class/propalmergepdfproduct.class.php index 75fe5282bd1..fb0a7ad2cb5 100644 --- a/htdocs/product/class/propalmergepdfproduct.class.php +++ b/htdocs/product/class/propalmergepdfproduct.class.php @@ -645,14 +645,14 @@ class PropalmergepdfproductLine */ public $id; - var $fk_product; - var $file_name; - var $lang; - var $fk_user_author; - var $fk_user_mod; - var $datec=''; - var $tms=''; - var $import_key; + public $fk_product; + public $file_name; + public $lang; + public $fk_user_author; + public $fk_user_mod; + public $datec=''; + public $tms=''; + public $import_key; /** * Constructor diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php index 0d991ace9fe..c80cb43e727 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -33,7 +33,7 @@ class PriceExpression * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ @@ -43,15 +43,15 @@ class PriceExpression * @var string[] Error codes (or messages) */ public $errors = array(); - + /** * @var int ID */ public $id; - - var $title; - var $expression; - + + public $title; + public $expression; + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/product/dynamic_price/class/price_global_variable.class.php b/htdocs/product/dynamic_price/class/price_global_variable.class.php index 2997e88c589..ebdba3b5949 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable.class.php @@ -49,14 +49,14 @@ class PriceGlobalVariable */ public $id; - var $code; + public $code; /** * @var string description */ public $description; - var $value; + public $value; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php index 943e78d633c..8c7c936856b 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php @@ -44,26 +44,26 @@ class PriceGlobalVariableUpdater */ public $errors = array(); - var $types=array(0, 1); //!< Updater types - var $update_min = 5; //!< Minimal update rate + public $types=array(0, 1); //!< Updater types + public $update_min = 5; //!< Minimal update rate /** * @var int ID */ public $id; - var $type; + public $type; /** * @var string description */ public $description; - var $parameters; - var $fk_variable; - var $update_interval; //!< Interval in mins - var $next_update; //!< Next update timestamp - var $last_status; + public $parameters; + public $fk_variable; + public $update_interval; //!< Interval in mins + public $next_update; //!< Next update timestamp + public $last_status; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index 7e068818db8..2233a6c76e5 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -483,10 +483,12 @@ class InventoryObjectLine * @var int ID */ public $id; + /** * @var mixed Sample line property 1 */ public $prop1; + /** * @var mixed Sample line property 2 */ diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php index 1cb4f1c4b65..7a6fc299a78 100644 --- a/htdocs/societe/class/address.class.php +++ b/htdocs/societe/class/address.class.php @@ -33,7 +33,11 @@ class Address { protected $db; + /** + * @var int ID + */ public $id; + public $type; public $label; public $socid; @@ -496,7 +500,12 @@ class Address class AddressLine { protected $db; + + /** + * @var int ID + */ public $id; + public $date_creation; public $date_modification; public $label; From bb18982f7885a74781090face331ad99cdceb8f4 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 1 Sep 2018 23:24:59 +0200 Subject: [PATCH 23/30] 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; From c4f05aff2866361aa90a37641d1f12a1e5109ba9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 2 Sep 2018 10:42:31 +0200 Subject: [PATCH 24/30] Standardize and update code --- htdocs/compta/bank/class/account.class.php | 32 ++--- .../bank/class/paymentvarious.class.php | 24 ++-- htdocs/contrat/class/contrat.class.php | 114 +++++++++--------- 3 files changed, 87 insertions(+), 83 deletions(-) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 62028804a4b..7681434bdfe 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1664,7 +1664,7 @@ class AccountLine extends CommonObject */ public $table_element='bank'; - var $picto = 'generic'; + public $picto = 'generic'; /** * @var int ID @@ -1676,32 +1676,32 @@ class AccountLine extends CommonObject */ public $ref; - var $datec; - var $dateo; + public $datec; + public $dateo; /** * Value date */ - var $datev; - var $amount; + public $datev; + public $amount; /** * @var string bank transaction lines label */ public $label; - var $note; - var $fk_user_author; - var $fk_user_rappro; - var $fk_type; - var $rappro; // Is it conciliated - var $num_releve; // If conciliated, what is bank statement - var $num_chq; // Num of cheque - var $bank_chq; // Bank of cheque - var $fk_bordereau; // Id of cheque receipt + public $note; + public $fk_user_author; + public $fk_user_rappro; + public $fk_type; + public $rappro; // Is it conciliated + public $num_releve; // If conciliated, what is bank statement + public $num_chq; // Num of cheque + public $bank_chq; // Bank of cheque + public $fk_bordereau; // Id of cheque receipt - var $fk_account; // Id of bank account - var $bank_account_label; // Label of bank account + public $fk_account; // Id of bank account + public $bank_account_label; // Label of bank account public $emetteur; diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 47e7219ea81..3a6fe74ab37 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -52,24 +52,24 @@ class PaymentVarious extends CommonObject */ public $ref; - var $tms; - var $datep; - var $datev; - var $sens; - var $amount; - var $type_payment; - var $num_payment; + public $tms; + public $datep; + public $datev; + public $sens; + public $amount; + public $type_payment; + public $num_payment; /** * @var string various payments label */ public $label; - var $accountancy_code; - var $fk_project; - var $fk_bank; - var $fk_user_author; - var $fk_user_modif; + public $accountancy_code; + public $fk_project; + public $fk_bank; + public $fk_user_author; + public $fk_user_modif; /** diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 2ae8c785282..f5e03412b41 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -81,27 +81,29 @@ class Contrat extends CommonObject * Customer reference of the contract * @var string */ - var $ref_customer; + public $ref_customer; /** * Supplier reference of the contract * @var string */ - var $ref_supplier; + public $ref_supplier; /** * Client id linked to the contract * @var int */ - var $socid; - var $societe; // Objet societe + public $socid; + + public $societe; // Objet societe /** * Status of the contract * @var int */ - var $statut=0; // 0=Draft, - var $product; + public $statut=0; // 0=Draft, + + public $product; /** * @var int Id of user author of the contract @@ -128,7 +130,7 @@ class Contrat extends CommonObject /** * @var int Date of creation */ - var $date_creation; + public $date_creation; /** * @var int Date of last modification. Not filled until you call ->info() @@ -138,34 +140,34 @@ class Contrat extends CommonObject /** * @var int Date of validation */ - var $date_validation; + public $date_validation; /** * @var int Date when contract was signed */ - var $date_contrat; + public $date_contrat; /** * @var int Date of contract closure * @deprecated we close contract lines, not a contract */ - var $date_cloture; + public $date_cloture; - var $commercial_signature_id; - var $commercial_suivi_id; + public $commercial_signature_id; + public $commercial_suivi_id; /** * @deprecated Use fk_project instead * @see fk_project */ - var $fk_projet; + public $fk_projet; - var $extraparams=array(); + public $extraparams=array(); /** * @var ContratLigne[] Contract lines */ - var $lines=array(); + public $lines=array(); /** * Maps ContratLigne IDs to $this->lines indexes @@ -2492,17 +2494,19 @@ class ContratLigne extends CommonObjectLine */ public $ref; - var $tms; + public $tms; + + public $fk_contrat; + public $fk_product; + public $statut; // 0 inactive, 4 active, 5 closed + public $type; // 0 for product, 1 for service - var $fk_contrat; - var $fk_product; - var $statut; // 0 inactive, 4 active, 5 closed - var $type; // 0 for product, 1 for service /** * @var string * @deprecated */ - var $label; + public $label; + /** * @var string * @deprecated @@ -2514,31 +2518,31 @@ class ContratLigne extends CommonObjectLine */ public $description; - var $product_ref; - var $product_label; + public $product_ref; + public $product_label; - var $date_commande; + public $date_commande; - var $date_start; // date start planned - var $date_start_real; // date start real - var $date_end; // date end planned - var $date_end_real; // date end real + public $date_start; // date start planned + public $date_start_real; // date start real + public $date_end; // date end planned + public $date_end_real; // date end real // For backward compatibility - var $date_ouverture_prevue; // date start planned - var $date_ouverture; // date start real - var $date_fin_validite; // date end planned - var $date_cloture; // date end real - var $tva_tx; - var $localtax1_tx; - var $localtax2_tx; - var $localtax1_type; // Local tax 1 type - var $localtax2_type; // Local tax 2 type - var $qty; - var $remise_percent; - var $remise; - var $fk_remise_except; + public $date_ouverture_prevue; // date start planned + public $date_ouverture; // date start real + public $date_fin_validite; // date end planned + public $date_cloture; // date end real + public $tva_tx; + public $localtax1_tx; + public $localtax2_tx; + public $localtax1_type; // Local tax 1 type + public $localtax2_type; // Local tax 2 type + public $qty; + public $remise_percent; + public $remise; + public $fk_remise_except; - var $subprice; // Unit price HT + public $subprice; // Unit price HT /** * @var float @@ -2547,22 +2551,22 @@ class ContratLigne extends CommonObjectLine */ public $price; - var $price_ht; + public $price_ht; - var $total_ht; - var $total_tva; - var $total_localtax1; - var $total_localtax2; - var $total_ttc; + public $total_ht; + public $total_tva; + public $total_localtax1; + public $total_localtax2; + public $total_ttc; - var $fk_fournprice; - var $pa_ht; + public $fk_fournprice; + public $pa_ht; - var $info_bits; - var $fk_user_author; - var $fk_user_ouverture; - var $fk_user_cloture; - var $commentaire; + public $info_bits; + public $fk_user_author; + public $fk_user_ouverture; + public $fk_user_cloture; + public $commentaire; const STATUS_INITIAL = 0; const STATUS_OPEN = 4; From 3de16a145e8b9a6aee84348bd2c8084fbc7f3612 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 2 Sep 2018 11:08:41 +0200 Subject: [PATCH 25/30] Standardize and update code --- htdocs/comm/propal/class/propal.class.php | 3 + htdocs/commande/class/commande.class.php | 13 +++ .../deplacement/class/deplacement.class.php | 21 +++-- .../facture/class/facture-rec.class.php | 41 +++++---- htdocs/compta/facture/class/facture.class.php | 8 ++ htdocs/contrat/class/contrat.class.php | 3 + htdocs/core/class/commonobject.class.php | 7 +- htdocs/core/class/fiscalyear.class.php | 3 + htdocs/expedition/class/expedition.class.php | 70 ++++++++------- htdocs/fichinter/class/fichinter.class.php | 7 ++ .../class/fournisseur.commande.class.php | 21 ++++- .../fourn/class/fournisseur.facture.class.php | 8 +- htdocs/hrm/class/establishment.class.php | 3 + htdocs/livraison/class/livraison.class.php | 7 +- htdocs/projet/class/project.class.php | 49 ++++++----- .../class/supplier_proposal.class.php | 88 +++++++++++-------- 16 files changed, 226 insertions(+), 126 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 4957bf3e764..a3e1ec42bf7 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -55,6 +55,9 @@ class Propal extends CommonObject */ public $table_element='propal'; + /** + * @var int Name of subtable line + */ public $table_element_line='propaldet'; /** diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 380d26f2496..cfc1a38fef6 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -52,7 +52,11 @@ class Commande extends CommonOrder */ public $table_element='commande'; + /** + * @var int Name of subtable line + */ public $table_element_line = 'commandedet'; + public $class_element_line = 'OrderLine'; /** @@ -61,11 +65,13 @@ class Commande extends CommonOrder public $fk_element = 'fk_commande'; public $picto = 'order'; + /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * @var int */ public $ismultientitymanaged = 1; + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user * @var integer @@ -92,6 +98,7 @@ class Commande extends CommonOrder * @var int */ public $statut; + /** * Billed * @var int @@ -114,21 +121,25 @@ class Commande extends CommonOrder * @var int */ public $mode_reglement_id; + /** * Payment mode code * @var string */ public $mode_reglement_code; + /** * Availability delivery time id * @var int */ public $availability_id; + /** * Availability delivery time code * @var string */ public $availability_code; + /** * Label of availability delivery time. Use it in case translation cannot be found. * @var string @@ -138,11 +149,13 @@ class Commande extends CommonOrder public $demand_reason_id; // Source reason. Why we receive order (after a phone campaign, ...) public $demand_reason_code; public $date; // Date commande + /** * @deprecated * @see date */ public $date_commande; + public $date_livraison; // Date expected of shipment (date starting shipment, not the reception that occurs some days after) public $fk_remise_except; public $remise_percent; diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 0600a141308..1456d29e0d1 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -41,6 +41,9 @@ class Deplacement extends CommonObject */ public $table_element='deplacement'; + /** + * @var int Name of subtable line + */ public $table_element_line = ''; /** @@ -50,22 +53,22 @@ class Deplacement extends CommonObject public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - var $datec; // Creation date - var $dated; - var $fk_user_author; + public $datec; // Creation date + public $dated; + public $fk_user_author; /** * @var int User ID */ public $fk_user; - var $km; - var $socid; - var $statut; // 0=draft, 1=validated - var $extraparams=array(); + public $km; + public $socid; + public $statut; // 0=draft, 1=validated + public $extraparams=array(); - var $statuts=array(); - var $statuts_short=array(); + public $statuts=array(); + public $statuts_short=array(); /** * Constructor diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 6e61b55e2ba..012dac4a274 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -49,6 +49,9 @@ class FactureRec extends CommonInvoice */ public $table_element='facture_rec'; + /** + * @var int Name of subtable line + */ public $table_element_line='facturedet_rec'; /** @@ -58,30 +61,30 @@ class FactureRec extends CommonInvoice public $picto='bill'; - var $entity; - var $number; - var $date; - var $amount; - var $remise; - var $tva; - var $total; - var $db_table; - var $propalid; + public $entity; + public $number; + public $date; + public $amount; + public $remise; + public $tva; + public $total; + public $db_table; + public $propalid; - var $date_last_gen; - var $date_when; - var $nb_gen_done; - var $nb_gen_max; + public $date_last_gen; + public $date_when; + public $nb_gen_done; + public $nb_gen_max; - var $frequency; - var $unit_frequency; + public $frequency; + public $unit_frequency; - var $rang; - var $special_code; + public $rang; + public $special_code; - var $usenewprice=0; + public $usenewprice=0; - var $suspended; // status + public $suspended; // status const STATUS_NOTSUSPENDED = 0; const STATUS_SUSPENDED = 1; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index cb705e063db..3ae11078b67 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -63,6 +63,9 @@ class Facture extends CommonInvoice */ public $table_element='facture'; + /** + * @var int Name of subtable line + */ public $table_element_line = 'facturedet'; /** @@ -71,11 +74,13 @@ class Facture extends CommonInvoice public $fk_element = 'fk_facture'; public $picto='bill'; + /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * @var int */ public $ismultientitymanaged = 1; + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user * @var integer @@ -125,14 +130,17 @@ class Facture extends CommonInvoice public $cond_reglement_code; // Code in llx_c_paiement public $mode_reglement_code; // Code in llx_c_paiement public $fk_bank; // Field to store bank id to use when payment mode is withdraw + /** * @deprecated */ public $products=array(); + /** * @var FactureLigne[] */ public $lines=array(); + public $line; public $extraparams=array(); public $specimen; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index f5e03412b41..053d51905df 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -51,6 +51,9 @@ class Contrat extends CommonObject */ public $table_element='contrat'; + /** + * @var int Name of subtable line + */ public $table_element_line='contratdet'; /** diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index a00f91ac5bc..d9053cce731 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -73,9 +73,9 @@ abstract class CommonObject public $table_element; /** - * @var + * @var int Name of subtable line */ - public $table_element_line; + public $table_element_line=''; /** * @var string Key value used to track if data is coming from import wizard @@ -168,6 +168,7 @@ abstract class CommonObject * @see fetch_origin() */ public $origin; + /** * @var int The id of originating object * @see fetch_origin() @@ -6175,7 +6176,7 @@ abstract class CommonObject { //Show only the key field in params if (is_array($params) && array_key_exists('onlykey',$params) && $key != $params['onlykey']) continue; - + $enabled = 1; if ($enabled && isset($extrafields->attributes[$this->table_element]['list'][$key])) { diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index dc6bc5d0310..f6ba7c00088 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -38,6 +38,9 @@ class Fiscalyear extends CommonObject */ public $table_element='accounting_fiscalyear'; + /** + * @var int Name of subtable line + */ public $table_element_line = ''; /** diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 8a46f14c829..4c337825822 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -48,61 +48,69 @@ class Expedition extends CommonObject * @var string ID to identify managed object */ public $element="shipping"; - + public $fk_element="fk_expedition"; - + /** * @var string Name of table without prefix where object is stored */ public $table_element="expedition"; - + + /** + * @var int Name of subtable line + */ public $table_element_line="expeditiondet"; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto = 'sending'; - var $socid; - var $ref_customer; - var $ref_int; - var $brouillon; - var $entrepot_id; - var $lines=array(); - var $tracking_number; - var $tracking_url; - var $billed; - var $model_pdf; + public $socid; + public $ref_customer; + public $ref_int; + public $brouillon; + public $entrepot_id; + public $lines=array(); + public $tracking_number; + public $tracking_url; + public $billed; + public $model_pdf; - var $trueWeight; - var $weight_units; - var $trueWidth; - var $width_units; - var $trueHeight; - var $height_units; - var $trueDepth; - var $depth_units; + public $trueWeight; + public $weight_units; + public $trueWidth; + public $width_units; + public $trueHeight; + public $height_units; + public $trueDepth; + public $depth_units; // A denormalized value - var $trueSize; + public $trueSize; + + public $date_delivery; // Date delivery planed - var $date_delivery; // Date delivery planed /** * @deprecated * @see date_shipping */ - var $date; + public $date; + /** * @deprecated * @see date_shipping */ - var $date_expedition; + public $date_expedition; + /** * Effective delivery date * @var int */ public $date_shipping; - var $date_creation; - var $date_valid; - var $meths; - var $listmeths; // List of carriers + public $date_creation; + public $date_valid; + + public $meths; + public $listmeths; // List of carriers const STATUS_DRAFT = 0; @@ -478,7 +486,7 @@ class Expedition extends CommonObject $sql.= ", e.note_private, e.note_public"; $sql.= ', e.fk_incoterms, e.location_incoterms'; $sql.= ', i.libelle as libelle_incoterms'; - $sql.= ', s.libelle as shipping_method'; + $sql.= ', s.libelle as shipping_method'; $sql.= ", el.fk_source as origin_id, el.sourcetype as origin"; $sql.= " FROM ".MAIN_DB_PREFIX."expedition as e"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = e.rowid AND el.targettype = '".$this->db->escape($this->element)."'"; @@ -2293,7 +2301,7 @@ class ExpeditionLigne extends CommonObjectLine * @var string ID to identify managed object */ public $element='expeditiondet'; - + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 2d879a1d17f..bce5f81c339 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -50,7 +50,11 @@ class Fichinter extends CommonObject */ public $fk_element='fk_fichinter'; + /** + * @var int Name of subtable line + */ public $table_element_line='fichinterdet'; + public $picto = 'intervention'; /** @@ -85,14 +89,17 @@ class Fichinter extends CommonObject * Draft status */ const STATUS_DRAFT = 0; + /** * Validated status */ const STATUS_VALIDATED = 1; + /** * Billed */ const STATUS_BILLED = 2; + /** * Closed */ diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 6768097f7c1..4b9e5532c28 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -4,11 +4,11 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2010-2014 Juanjo Menent - * Copyright (C) 2010-2016 Philippe Grand + * Copyright (C) 2010-2018 Philippe Grand * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2018 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -50,7 +50,10 @@ class CommandeFournisseur extends CommonOrder */ public $table_element='commande_fournisseur'; - public $table_element_line = 'commande_fournisseurdet'; + /** + * @var int Name of subtable line + */ + public $table_element_line = 'commande_fournisseurdet'; /** * @var int Field with ID of parent key if this field has a parent @@ -108,17 +111,20 @@ class CommandeFournisseur extends CommonOrder * Delivery date */ public $date_livraison; + public $total_ht; public $total_tva; public $total_localtax1; // Total Local tax 1 public $total_localtax2; // Total Local tax 2 public $total_ttc; public $source; + /** * @deprecated * @see note_private, note_public */ public $note; + public $note_private; public $note_public; public $model_pdf; @@ -144,6 +150,7 @@ class CommandeFournisseur extends CommonOrder * @var CommandeFournisseurLigne[] */ public $lines = array(); + //Add for supplier_proposal public $origin; public $origin_id; @@ -161,34 +168,42 @@ class CommandeFournisseur extends CommonOrder * Draft status */ const STATUS_DRAFT = 0; + /** * Validated status */ const STATUS_VALIDATED = 1; + /** * Accepted */ const STATUS_ACCEPTED = 2; + /** * Order sent, shipment on process */ const STATUS_ORDERSENT = 3; + /** * Received partially */ const STATUS_RECEIVED_PARTIALLY = 4; + /** * Received completely */ const STATUS_RECEIVED_COMPLETELY = 5; + /** * Order canceled */ const STATUS_CANCELED = 6; + /** * Order canceled/never received */ const STATUS_CANCELED_AFTER_ORDER = 7; + /** * Refused */ diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 3633325fdcb..2381417596f 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2005 Marc Barilley * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2017 Juanjo Menent - * Copyright (C) 2013 Philippe Grand + * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2016 Marcos García * Copyright (C) 2015 Bahfir Abbes @@ -51,7 +51,10 @@ class FactureFournisseur extends CommonInvoice */ public $table_element='facture_fourn'; - public $table_element_line='facture_fourn_det'; + /** + * @var int Name of subtable line + */ + public $table_element_line='facture_fourn_det'; /** * @var int Field with ID of parent key if this field has a parent @@ -144,6 +147,7 @@ class FactureFournisseur extends CommonInvoice * @var SupplierInvoiceLine[] */ public $lines = array(); + /** * @deprecated */ diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 0b163af9346..4038c5b16b5 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -38,6 +38,9 @@ class Establishment extends CommonObject */ public $table_element='establishment'; + /** + * @var int Name of subtable line + */ public $table_element_line = ''; /** diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 6252c1948c4..a56091870ce 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -3,8 +3,8 @@ * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2006-2007 Laurent Destailleur * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2011-2018 Philippe Grand - * Copyright (C) 2013 Florian Henry + * Copyright (C) 2011-2018 Philippe Grand + * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2015 Marcos García * * This program is free software; you can redistribute it and/or modify @@ -54,6 +54,9 @@ class Livraison extends CommonObject */ public $table_element="livraison"; + /** + * @var int Name of subtable line + */ public $table_element_line="livraisondet"; public $brouillon; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 41ea4ead700..158215e9935 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -43,7 +43,10 @@ class Project extends CommonObject */ public $table_element = 'projet'; - public $table_element_line = 'projet_task'; + /** + * @var int Name of subtable line + */ + public $table_element_line = 'projet_task'; /** * @var int Field with ID of parent key if this field has a parent @@ -69,31 +72,32 @@ class Project extends CommonObject * @see title */ public $titre; - var $title; - var $date_start; - var $date_end; - var $date_close; - var $socid; // To store id of thirdparty - var $thirdparty_name; // To store name of thirdparty (defined only in some cases) + public $title; + public $date_start; + public $date_end; + public $date_close; - var $user_author_id; //!< Id of project creator. Not defined if shared project. - var $user_close_id; - var $public; //!< Tell if this is a public or private project - var $budget_amount; - var $bill_time; // Is the time spent on project must be invoiced or not + public $socid; // To store id of thirdparty + public $thirdparty_name; // To store name of thirdparty (defined only in some cases) - var $statuts_short; - var $statuts_long; + public $user_author_id; //!< Id of project creator. Not defined if shared project. + public $user_close_id; + public $public; //!< Tell if this is a public or private project + public $budget_amount; + public $bill_time; // Is the time spent on project must be invoiced or not - var $statut; // 0=draft, 1=opened, 2=closed - var $opp_status; // opportunity status, into table llx_c_lead_status - var $opp_percent; // opportunity probability + public $statuts_short; + public $statuts_long; - var $oldcopy; + public $statut; // 0=draft, 1=opened, 2=closed + public $opp_status; // opportunity status, into table llx_c_lead_status + public $opp_percent; // opportunity probability - var $weekWorkLoad; // Used to store workload details of a projet - var $weekWorkLoadPerTask; // Used to store workload details of tasks of a projet + public $oldcopy; + + public $weekWorkLoad; // Used to store workload details of a projet + public $weekWorkLoadPerTask; // Used to store workload details of tasks of a projet /** * @var int Creation date @@ -101,16 +105,19 @@ class Project extends CommonObject * @see date_c */ public $datec; + /** * @var int Creation date */ public $date_c; + /** * @var int Modification date * @deprecated * @see date_m */ public $datem; + /** * @var int Modification date */ @@ -125,10 +132,12 @@ class Project extends CommonObject * Draft status */ const STATUS_DRAFT = 0; + /** * Open/Validated status */ const STATUS_VALIDATED = 1; + /** * Closed status */ diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 547e9e9efcf..b79a70a4ea7 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -7,7 +7,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2008 Raphael Bertrand * Copyright (C) 2010-2015 Juanjo Menent - * Copyright (C) 2010-2011 Philippe Grand + * Copyright (C) 2010-2018 Philippe Grand * Copyright (C) 2012-2014 Christophe Battarel * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Marcos García @@ -55,14 +55,21 @@ class SupplierProposal extends CommonObject */ public $table_element='supplier_proposal'; - public $table_element_line='supplier_proposaldet'; + /** + * @var int Name of subtable line + */ + public $table_element_line='supplier_proposaldet'; + public $fk_element='fk_supplier_proposal'; + public $picto='propal'; + /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * @var int */ public $ismultientitymanaged = 1; + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user * @var integer @@ -74,24 +81,25 @@ class SupplierProposal extends CommonObject */ protected $table_ref_field = 'ref'; - var $socid; // Id client + public $socid; // Id client /** * @deprecated * @see user_author_id */ - var $author; - var $ref_fourn; //Reference saisie lors de l'ajout d'une ligne à la demande - var $ref_supplier; //Reference saisie lors de l'ajout d'une ligne à la demande - var $statut; // 0 (draft), 1 (validated), 2 (signed), 3 (not signed), 4 (processed/billed) - var $date; // Date of proposal - var $date_livraison; + public $author; + + public $ref_fourn; //Reference saisie lors de l'ajout d'une ligne à la demande + public $ref_supplier; //Reference saisie lors de l'ajout d'une ligne à la demande + public $statut; // 0 (draft), 1 (validated), 2 (signed), 3 (not signed), 4 (processed/billed) + public $date; // Date of proposal + public $date_livraison; /** * @deprecated * @see date_creation */ - var $datec; + public $datec; /** * Creation date @@ -103,7 +111,7 @@ class SupplierProposal extends CommonObject * @deprecated * @see date_validation */ - var $datev; + public $datev; /** * Validation date @@ -112,70 +120,76 @@ class SupplierProposal extends CommonObject public $date_validation; - var $user_author_id; - var $user_valid_id; - var $user_close_id; + public $user_author_id; + public $user_valid_id; + public $user_close_id; /** * @deprecated * @see price_ht */ - var $price; + public $price; + /** * @deprecated * @see total_tva */ - var $tva; + public $tva; + /** * @deprecated * @see total_ttc */ - var $total; + public $total; - var $cond_reglement_code; - var $mode_reglement_code; - var $remise = 0; - var $remise_percent = 0; - var $remise_absolue = 0; + public $cond_reglement_code; + public $mode_reglement_code; + public $remise = 0; + public $remise_percent = 0; + public $remise_absolue = 0; - var $products=array(); - var $extraparams=array(); + public $products=array(); + public $extraparams=array(); - var $lines = array(); - var $line; + public $lines = array(); + public $line; - var $labelstatut=array(); - var $labelstatut_short=array(); + public $labelstatut=array(); + public $labelstatut_short=array(); - var $nbtodo; - var $nbtodolate; + public $nbtodo; + public $nbtodolate; - var $specimen; + public $specimen; // Multicurrency - var $fk_multicurrency; - var $multicurrency_code; - var $multicurrency_tx; - var $multicurrency_total_ht; - var $multicurrency_total_tva; - var $multicurrency_total_ttc; + public $fk_multicurrency; + public $multicurrency_code; + public $multicurrency_tx; + public $multicurrency_total_ht; + public $multicurrency_total_tva; + public $multicurrency_total_ttc; /** * Draft status */ const STATUS_DRAFT = 0; + /** * Validated status */ const STATUS_VALIDATED = 1; + /** * Signed quote */ const STATUS_SIGNED = 2; + /** * Not signed quote, canceled */ const STATUS_NOTSIGNED = 3; + /** * Billed or closed/processed quote */ From 4fba7cdf45e24cdcc83a77fa60623a3951541f13 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Mon, 3 Sep 2018 09:45:06 +0200 Subject: [PATCH 26/30] fix : Class Contact not found in htdocs/core/lib/company.lib.php on line 1496 --- htdocs/core/lib/company.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index fa1d9528ef5..5d92cff0cc3 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1488,6 +1488,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $formactions=new FormActions($db); From 42565e722e6c682a978514e98233093042eedd80 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 4 Sep 2018 13:37:00 +0200 Subject: [PATCH 27/30] Standardize and update code --- htdocs/asset/class/asset.class.php | 6 +++++- htdocs/core/class/discount.class.php | 4 ++++ htdocs/product/class/productcustomerprice.class.php | 7 ++++++- htdocs/societe/class/companypaymentmode.class.php | 6 +++++- htdocs/societe/class/societeaccount.class.php | 7 ++++++- htdocs/stripe/class/stripe.class.php | 5 ++++- htdocs/ticket/class/actions_ticket.class.php | 4 ++++ htdocs/ticket/class/ticket.class.php | 4 ++-- 8 files changed, 36 insertions(+), 7 deletions(-) diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 3ca85a4015f..3f82a6aca98 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -114,7 +114,11 @@ class Asset extends CommonObject public $label; public $amount; - public $fk_soc; + + /** + * @var int Thirdparty ID + */ + public $fk_soc; /** * @var string description diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 78f713232d4..6a91384a2f2 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -48,7 +48,11 @@ class DiscountAbsolute */ public $id; + /** + * @var int Thirdparty ID + */ public $fk_soc; + public $discount_type; // 0 => customer discount, 1 => supplier discount public $amount_ht; // public $amount_tva; // diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 35ba8621ae8..29327293723 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -974,7 +974,12 @@ class PriceByCustomerLine public $datec = ''; public $tms = ''; public $fk_product; - public $fk_soc; + + /** + * @var int Thirdparty ID + */ + public $fk_soc; + public $price; public $price_ttc; public $price_min; diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index ae405ac6249..cbe8a111985 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -124,7 +124,11 @@ class CompanyPaymentMode extends CommonObject */ public $rowid; - public $fk_soc; + /** + * @var int Thirdparty ID + */ + public $fk_soc; + public $label; public $bank; public $code_banque; diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 03fa94c0dd0..b5cd4d8e8ff 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -111,7 +111,12 @@ class SocieteAccount extends CommonObject public $pass_encoding; public $pass_crypted; public $pass_temp; - public $fk_soc; + + /** + * @var int Thirdparty ID + */ + public $fk_soc; + public $site; public $date_last_login; public $date_previous_login; diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 9ef6b60977e..4264ae984b0 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -33,7 +33,10 @@ class Stripe extends CommonObject */ public $rowid; - public $fk_soc; + /** + * @var int Thirdparty ID + */ + public $fk_soc; public $fk_key; diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index fc45740863b..17df0bb8265 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -68,6 +68,10 @@ class ActionsTicket public $description; public $fk_statut; + + /** + * @var int Thirdparty ID + */ public $fk_soc; /** diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index e73e0bf95ef..310d4b02207 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2502,8 +2502,8 @@ class TicketsLine public $track_id; /** - * Thirdparty ID - */ + * @var int Thirdparty ID + */ public $fk_soc; /** From 47b6374abcf517bc35d70cb7c5abd1ef7e916d56 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 4 Sep 2018 13:45:20 +0200 Subject: [PATCH 28/30] 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 From d3570317194c7e6275121117fd2eaaa4e2cc58da Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 4 Sep 2018 14:46:10 +0200 Subject: [PATCH 29/30] fix merge --- .../class/accountingaccount.class.php | 3 ++ .../class/accountingjournal.class.php | 4 ++ .../adherents/class/adherent_type.class.php | 14 +++++- htdocs/adherents/class/subscription.class.php | 23 +++++----- htdocs/asset/class/asset_type.class.php | 13 +++++- htdocs/bookmarks/class/bookmark.class.php | 18 +++++--- htdocs/categories/class/categorie.class.php | 5 ++- htdocs/comm/action/class/actioncomm.class.php | 6 ++- .../comm/action/class/cactioncomm.class.php | 6 ++- htdocs/comm/mailing/class/mailing.class.php | 45 ++++++++++--------- htdocs/comm/propal/class/propal.class.php | 3 ++ 11 files changed, 95 insertions(+), 45 deletions(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index c2da46c6911..ba6f53e3785 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -37,6 +37,9 @@ class AccountingAccount extends CommonObject */ public $table_element='accounting_account'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'billr'; /** diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 852a70d38c2..dc34d0adf40 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -42,6 +42,10 @@ class AccountingJournal extends CommonObject public $fk_element = ''; public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'generic'; /** diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index b7d510a3e0f..ba2f2306092 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -36,13 +36,17 @@ class AdherentType extends CommonObject * @var string Name of table without prefix where object is stored */ public $table_element = 'adherent_type'; - + /** * @var string ID to identify managed object */ public $element = 'adherent_type'; - + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'group'; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe /** @@ -51,19 +55,25 @@ class AdherentType extends CommonObject * @see label */ public $libelle; + /** @var string Label */ public $label; + /** * @var int Subsription required (0 or 1) * @since 5.0 */ public $subscription; + /** @var string Public note */ public $note; + /** @var integer Can vote */ public $vote; + /** @var string Email sent during validation */ public $mail_valid; + /** @var array Array of members */ public $members=array(); diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 90452816be8..85b024a1582 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -36,21 +36,24 @@ class Subscription extends CommonObject * @var string ID to identify managed object */ public $element='subscription'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='subscription'; - - public $picto='payment'; - var $datec; // Date creation - var $datem; // Date modification - var $dateh; // Subscription start date (date subscription) - var $datef; // Subscription end date - var $fk_adherent; - var $amount; - var $fk_bank; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto='payment'; + + public $datec; // Date creation + public $datem; // Date modification + public $dateh; // Subscription start date (date subscription) + public $datef; // Subscription end date + public $fk_adherent; + public $amount; + public $fk_bank; /** diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php index e6b95d7ad37..5df411ef129 100644 --- a/htdocs/asset/class/asset_type.class.php +++ b/htdocs/asset/class/asset_type.class.php @@ -33,25 +33,34 @@ class AssetType extends CommonObject * @var string Name of table without prefix where object is stored */ public $table_element = 'asset_type'; - + /** * @var string ID to identify managed object */ public $element = 'asset_type'; - + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'group'; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe /** @var string Label */ public $label; + /** @var string Accountancy code asset */ public $accountancy_code_asset; + /** @var string Accountancy code depreciation asset */ public $accountancy_code_depreciation_asset; + /** @var string Accountancy code depreciation expense */ public $accountancy_code_depreciation_expense; + /** @var string Public note */ public $note; + /** @var array Array of asset */ public $asset=array(); diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index f0942b18a82..7f3b2c58300 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -39,7 +39,11 @@ class Bookmark extends CommonObject public $table_element='bookmark'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - public $picto = 'bookmark'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'bookmark'; /** * @var DoliDB Database handler. @@ -56,12 +60,12 @@ class Bookmark extends CommonObject */ public $fk_user; - var $datec; - var $url; - var $target; // 0=replace, 1=new window - var $title; - var $position; - var $favicon; + public $datec; + public $url; + public $target; // 0=replace, 1=new window + public $title; + public $position; + public $favicon; /** diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 94e42ee4334..cddf26e343d 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -51,8 +51,11 @@ class Categorie extends CommonObject const TYPE_USER = 'user'; const TYPE_PROJECT = 'project'; const TYPE_ACCOUNT = 'bank_account'; - const TYPE_BANK_LINE = 'bank_line'; + const TYPE_BANK_LINE = 'bank_line'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'category'; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index fd620ef2fce..f2983a190c9 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -45,7 +45,11 @@ class ActionComm extends CommonObject public $table_element = 'actioncomm'; public $table_rowid = 'id'; - public $picto='action'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto='action'; /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index f339e79d6a2..4f0a824007a 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -54,7 +54,11 @@ class CActionComm public $active; public $color; - public $picto; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto; public $type_actions=array(); diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index fa7a9a1bc9e..43087b2ea53 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -35,39 +35,42 @@ class Mailing extends CommonObject * @var string ID to identify managed object */ public $element='mailing'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='mailing'; - + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='email'; - var $titre; - var $sujet; - var $body; - var $nbemail; - var $bgcolor; - var $bgimage; + public $titre; + public $sujet; + public $body; + public $nbemail; + public $bgcolor; + public $bgimage; - var $statut; // Status 0=Draft, 1=Validated, 2=Sent partially, 3=Sent completely + public $statut; // Status 0=Draft, 1=Validated, 2=Sent partially, 3=Sent completely - var $email_from; - var $email_replyto; - var $email_errorsto; + public $email_from; + public $email_replyto; + public $email_errorsto; - var $joined_file1; - var $joined_file2; - var $joined_file3; - var $joined_file4; + public $joined_file1; + public $joined_file2; + public $joined_file3; + public $joined_file4; - var $user_creat; - var $user_valid; + public $user_creat; + public $user_valid; - var $date_creat; - var $date_valid; + public $date_creat; + public $date_valid; - var $extraparams=array(); + public $extraparams=array(); public $statut_dest=array(); public $statuts=array(); diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index a3e1ec42bf7..e1f7736cbc3 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -65,6 +65,9 @@ class Propal extends CommonObject */ public $fk_element ='fk_propal'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='propal'; /** From 707f8b731217f3923167052b038f582c6b70ae78 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 4 Sep 2018 14:46:10 +0200 Subject: [PATCH 30/30] fix merge --- .../class/accountingaccount.class.php | 3 ++ .../class/accountingjournal.class.php | 4 ++ .../adherents/class/adherent_type.class.php | 14 +++++- htdocs/adherents/class/subscription.class.php | 23 +++++----- htdocs/asset/class/asset_type.class.php | 13 +++++- htdocs/bookmarks/class/bookmark.class.php | 18 +++++--- htdocs/categories/class/categorie.class.php | 5 ++- htdocs/comm/action/class/actioncomm.class.php | 6 ++- .../comm/action/class/cactioncomm.class.php | 6 ++- htdocs/comm/mailing/class/mailing.class.php | 45 ++++++++++--------- htdocs/comm/propal/class/propal.class.php | 3 ++ 11 files changed, 95 insertions(+), 45 deletions(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index c2da46c6911..ba6f53e3785 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -37,6 +37,9 @@ class AccountingAccount extends CommonObject */ public $table_element='accounting_account'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'billr'; /** diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 852a70d38c2..dc34d0adf40 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -42,6 +42,10 @@ class AccountingJournal extends CommonObject public $fk_element = ''; public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'generic'; /** diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index b7d510a3e0f..ba2f2306092 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -36,13 +36,17 @@ class AdherentType extends CommonObject * @var string Name of table without prefix where object is stored */ public $table_element = 'adherent_type'; - + /** * @var string ID to identify managed object */ public $element = 'adherent_type'; - + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'group'; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe /** @@ -51,19 +55,25 @@ class AdherentType extends CommonObject * @see label */ public $libelle; + /** @var string Label */ public $label; + /** * @var int Subsription required (0 or 1) * @since 5.0 */ public $subscription; + /** @var string Public note */ public $note; + /** @var integer Can vote */ public $vote; + /** @var string Email sent during validation */ public $mail_valid; + /** @var array Array of members */ public $members=array(); diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 90452816be8..85b024a1582 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -36,21 +36,24 @@ class Subscription extends CommonObject * @var string ID to identify managed object */ public $element='subscription'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='subscription'; - - public $picto='payment'; - var $datec; // Date creation - var $datem; // Date modification - var $dateh; // Subscription start date (date subscription) - var $datef; // Subscription end date - var $fk_adherent; - var $amount; - var $fk_bank; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto='payment'; + + public $datec; // Date creation + public $datem; // Date modification + public $dateh; // Subscription start date (date subscription) + public $datef; // Subscription end date + public $fk_adherent; + public $amount; + public $fk_bank; /** diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php index e6b95d7ad37..5df411ef129 100644 --- a/htdocs/asset/class/asset_type.class.php +++ b/htdocs/asset/class/asset_type.class.php @@ -33,25 +33,34 @@ class AssetType extends CommonObject * @var string Name of table without prefix where object is stored */ public $table_element = 'asset_type'; - + /** * @var string ID to identify managed object */ public $element = 'asset_type'; - + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'group'; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe /** @var string Label */ public $label; + /** @var string Accountancy code asset */ public $accountancy_code_asset; + /** @var string Accountancy code depreciation asset */ public $accountancy_code_depreciation_asset; + /** @var string Accountancy code depreciation expense */ public $accountancy_code_depreciation_expense; + /** @var string Public note */ public $note; + /** @var array Array of asset */ public $asset=array(); diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index f0942b18a82..7f3b2c58300 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -39,7 +39,11 @@ class Bookmark extends CommonObject public $table_element='bookmark'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - public $picto = 'bookmark'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'bookmark'; /** * @var DoliDB Database handler. @@ -56,12 +60,12 @@ class Bookmark extends CommonObject */ public $fk_user; - var $datec; - var $url; - var $target; // 0=replace, 1=new window - var $title; - var $position; - var $favicon; + public $datec; + public $url; + public $target; // 0=replace, 1=new window + public $title; + public $position; + public $favicon; /** diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 94e42ee4334..cddf26e343d 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -51,8 +51,11 @@ class Categorie extends CommonObject const TYPE_USER = 'user'; const TYPE_PROJECT = 'project'; const TYPE_ACCOUNT = 'bank_account'; - const TYPE_BANK_LINE = 'bank_line'; + const TYPE_BANK_LINE = 'bank_line'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'category'; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index fd620ef2fce..f2983a190c9 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -45,7 +45,11 @@ class ActionComm extends CommonObject public $table_element = 'actioncomm'; public $table_rowid = 'id'; - public $picto='action'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto='action'; /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index f339e79d6a2..4f0a824007a 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -54,7 +54,11 @@ class CActionComm public $active; public $color; - public $picto; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto; public $type_actions=array(); diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index fa7a9a1bc9e..43087b2ea53 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -35,39 +35,42 @@ class Mailing extends CommonObject * @var string ID to identify managed object */ public $element='mailing'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='mailing'; - + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='email'; - var $titre; - var $sujet; - var $body; - var $nbemail; - var $bgcolor; - var $bgimage; + public $titre; + public $sujet; + public $body; + public $nbemail; + public $bgcolor; + public $bgimage; - var $statut; // Status 0=Draft, 1=Validated, 2=Sent partially, 3=Sent completely + public $statut; // Status 0=Draft, 1=Validated, 2=Sent partially, 3=Sent completely - var $email_from; - var $email_replyto; - var $email_errorsto; + public $email_from; + public $email_replyto; + public $email_errorsto; - var $joined_file1; - var $joined_file2; - var $joined_file3; - var $joined_file4; + public $joined_file1; + public $joined_file2; + public $joined_file3; + public $joined_file4; - var $user_creat; - var $user_valid; + public $user_creat; + public $user_valid; - var $date_creat; - var $date_valid; + public $date_creat; + public $date_valid; - var $extraparams=array(); + public $extraparams=array(); public $statut_dest=array(); public $statuts=array(); diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index a3e1ec42bf7..e1f7736cbc3 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -65,6 +65,9 @@ class Propal extends CommonObject */ public $fk_element ='fk_propal'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='propal'; /**