From ebb29d2097b5c022919964c95dff0c21398fda21 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 20 Sep 2011 22:28:31 +0000 Subject: [PATCH] Doxygen --- .../class/accountancyaccount.class.php | 113 +++++++++--------- htdocs/compta/journal/purchasesjournal.php | 9 +- htdocs/compta/journal/sellsjournal.php | 5 + htdocs/main.inc.php | 4 +- .../company/actions_card_company.class.php | 4 +- 5 files changed, 73 insertions(+), 62 deletions(-) diff --git a/htdocs/accountancy/class/accountancyaccount.class.php b/htdocs/accountancy/class/accountancyaccount.class.php index dd757d5a816..dfd591ae6cd 100644 --- a/htdocs/accountancy/class/accountancyaccount.class.php +++ b/htdocs/accountancy/class/accountancyaccount.class.php @@ -22,72 +22,73 @@ */ -/** \class AccountancyAccount - \brief Classe permettant la gestion des comptes -*/ +/** + * \class AccountancyAccount + * \brief Classe permettant la gestion des comptes + */ class AccountancyAccount { - var $db; - var $error; + var $db; + var $error; - var $rowid; - var $fk_pcg_version; - var $pcg_type; - var $pcg_subtype; - var $label; - var $account_number; - var $account_parent; + var $rowid; + var $fk_pcg_version; + var $pcg_type; + var $pcg_subtype; + var $label; + var $account_number; + var $account_parent; - /** - * Constructor - * - * @param $DoliDB $DB Database handler - */ - function AccountancyAccount($DB) - { - $this->db = $DB; - } + /** + * Constructor + * + * @param DoliDB $DB Database handler + */ + function AccountancyAccount($DB) + { + $this->db = $DB; + } - /** - * Insert account into database - * - * @param User $user User making add - * @return int <0 if KO, Id line added if OK - */ - function create($user) - { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."accountingaccount"; - $sql.= " (date_creation, fk_user_author, numero,intitule)"; - $sql.= " VALUES (".$this->db->idate(gmmktime()).",".$user->id.",'".$this->numero."','".$this->intitule."')"; + /** + * Insert account into database + * + * @param User $user User making add + * @return int <0 if KO, Id line added if OK + */ + function create($user) + { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."accountingaccount"; + $sql.= " (date_creation, fk_user_author, numero,intitule)"; + $sql.= " VALUES (".$this->db->idate(gmmktime()).",".$user->id.",'".$this->numero."','".$this->intitule."')"; - $resql = $this->db->query($sql); - if ($resql) - { - $id = $this->db->last_insert_id(MAIN_DB_PREFIX."accountingaccount"); + $resql = $this->db->query($sql); + if ($resql) + { + $id = $this->db->last_insert_id(MAIN_DB_PREFIX."accountingaccount"); - if ($id > 0) - { - $this->id = $id; - $result = $this->id; - } - else - { - $result = -2; - $this->error="AccountancyAccount::Create Erreur $result"; - dol_syslog($this->error, LOG_ERR); - } - } - else - { - $result = -1; - $this->error="AccountancyAccount::Create Erreur $result"; - dol_syslog($this->error, LOG_ERR); - } + if ($id > 0) + { + $this->id = $id; + $result = $this->id; + } + else + { + $result = -2; + $this->error="AccountancyAccount::Create Erreur $result"; + dol_syslog($this->error, LOG_ERR); + } + } + else + { + $result = -1; + $this->error="AccountancyAccount::Create Erreur $result"; + dol_syslog($this->error, LOG_ERR); + } - return $result; - } + return $result; + } } ?> diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index f58d878c21b..66964796dae 100755 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -17,6 +17,11 @@ * along with this program. If not, see . */ +/** + * \file htdocs/compta/journal/purchasesjournal.php + * \ingroup societe, fournisseur, facture + * \brief Page with purchases journal + */ require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/report.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php"); @@ -54,8 +59,8 @@ $html=new Form($db); $year_current = strftime("%Y",dol_now()); $pastmonth = strftime("%m",dol_now()) - 1; -$pastmonthyear = $year_current; -if ($pastmonth == 0) +$pastmonthyear = $year_current; +if ($pastmonth == 0) { $pastmonth = 12; $pastmonthyear--; diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 1ca658c2b8f..1ead0d71a72 100755 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -17,6 +17,11 @@ * along with this program. If not, see . */ +/** + * \file htdocs/compta/journal/sellsjournal.php + * \ingroup societe, facture + * \brief Page with sells journal + */ require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/report.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php"); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1d9c15f5e17..55084c16d68 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -67,7 +67,7 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* removed in PHP6 * * @param string $val Value * @param string $get 1=GET, 0=POST - * @return boolean true if ther is an injection + * @return boolean true if there is an injection */ function test_sql_and_script_inject($val, $get) { @@ -90,7 +90,7 @@ function test_sql_and_script_inject($val, $get) /** * Security: Return true if OK, false otherwise * - * @param string $var Variable name + * @param string &$var Variable name * @param string $get 1=GET, 0=POST * @return boolean true if ther is an injection */ diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php index 9c700bdf1d0..881c86fb449 100644 --- a/htdocs/societe/canvas/company/actions_card_company.class.php +++ b/htdocs/societe/canvas/company/actions_card_company.class.php @@ -17,9 +17,9 @@ */ /** - * \file htdocs/societe/canvas/default/actions_card_company.class.php + * \file htdocs/societe/canvas/company/actions_card_company.class.php * \ingroup thirdparty - * \brief Fichier de la classe Thirdparty card controller (default canvas) + * \brief File of Thirdparty card controller (default canvas) */ include_once(DOL_DOCUMENT_ROOT.'/societe/canvas/actions_card_common.class.php');