diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 0cada11c20d..429edfeb09e 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -19,6 +19,7 @@ /** * \file htdocs/core/class/dolgraph.class.php + * \ingroup core * \brief Fichier de la classe mere de gestion des graph * \version $Id$ * diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index fe03f2a40d8..69f25043fdd 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -28,6 +28,7 @@ /** * \file htdocs/core/class/html.form.class.php + * \ingroup core * \brief File of class with all html predefined components * \version $Id$ */ diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index e90bdbdb36c..5ea7d56dde6 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -17,165 +17,166 @@ */ /** - \file htdocs/core/class/html.formactions.class.php - \brief Fichier de la classe des fonctions predefinie de composants html actions - \version $Id$ -*/ + * \file htdocs/core/class/html.formactions.class.php + * \ingroup core + * \brief Fichier de la classe des fonctions predefinie de composants html actions + * \version $Id$ + */ /** - \class FormActions - \brief Classe permettant la generation de composants html actions -*/ + * \class FormActions + * \brief Classe permettant la generation de composants html actions + */ class FormActions { - var $db; - var $error; + var $db; + var $error; - /** - * \brief Constructeur - * \param DB handler d'acc�s base de donn�e - */ - function FormActions($DB) - { - $this->db = $DB; + /** + * \brief Constructeur + * \param DB handler d'acc�s base de donn�e + */ + function FormActions($DB) + { + $this->db = $DB; - return 1; - } + return 1; + } - /** - * \brief Show list of action status - * \param formname Name of form where select in included - * \param selected Preselected value - * \param canedit 1=can edit, 0=read only - */ - function form_select_status_action($formname,$selected,$canedit=1) - { - global $langs,$conf; + /** + * \brief Show list of action status + * \param formname Name of form where select in included + * \param selected Preselected value + * \param canedit 1=can edit, 0=read only + */ + function form_select_status_action($formname,$selected,$canedit=1) + { + global $langs,$conf; - $listofstatus=array('0'=>$langs->trans("ActionRunningNotStarted"),'50'=>$langs->trans("ActionRunningShort"),'100'=>$langs->trans("ActionDoneShort")); + $listofstatus=array('0'=>$langs->trans("ActionRunningNotStarted"),'50'=>$langs->trans("ActionRunningShort"),'100'=>$langs->trans("ActionDoneShort")); - if ($conf->use_javascript_ajax) - { - print "\n"; - print ''."\n"; - print ''; - if ($selected == 0 || $selected == 100) $canedit=0; - print ' %'; - print ' '; - } - else - { - print ' %'; - } - } + if ($conf->use_javascript_ajax) + { + print "\n"; + print ''."\n"; + print ''; + if ($selected == 0 || $selected == 100) $canedit=0; + print ' %'; + print ' '; + } + else + { + print ' %'; + } + } - /** - * Show list of actions for element - * @param object Object - * @param typeelement 'invoice','propal','order' - * @param socid socid of user - * @return int <0 if KO, >=0 if OK - */ - function showactions($object,$typeelement,$socid=0) - { - global $langs,$conf,$user; - global $bc; + /** + * Show list of actions for element + * @param object Object + * @param typeelement 'invoice','propal','order' + * @param socid socid of user + * @return int <0 if KO, >=0 if OK + */ + function showactions($object,$typeelement,$socid=0) + { + global $langs,$conf,$user; + global $bc; - $sql = 'SELECT a.id, a.datep as da, a.label, a.note,'; - $sql.= ' u.login'; - $sql.= ' FROM '.MAIN_DB_PREFIX.'actioncomm as a, '.MAIN_DB_PREFIX.'user as u'; - $sql.= ' WHERE a.fk_user_author = u.rowid'; - if ($socid) $sql .= ' AND a.fk_soc = '.$socid; - if ($typeelement == 'invoice') $sql.= ' AND a.fk_facture = '.$object->id; - if ($typeelement == 'supplier_invoice') $sql.= ' AND a.fk_supplier_invoice = '.$object->id; - if ($typeelement == 'propal') $sql.= ' AND a.propalrowid = '.$object->id; - if ($typeelement == 'order') $sql.= ' AND a.fk_commande = '.$object->id; - if ($typeelement == 'supplier_order') $sql.= ' AND a.fk_supplier_order = '.$object->id; - if ($typeelement == 'project') $sql.= ' AND a.fk_project = '.$object->id; + $sql = 'SELECT a.id, a.datep as da, a.label, a.note,'; + $sql.= ' u.login'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'actioncomm as a, '.MAIN_DB_PREFIX.'user as u'; + $sql.= ' WHERE a.fk_user_author = u.rowid'; + if ($socid) $sql .= ' AND a.fk_soc = '.$socid; + if ($typeelement == 'invoice') $sql.= ' AND a.fk_facture = '.$object->id; + if ($typeelement == 'supplier_invoice') $sql.= ' AND a.fk_supplier_invoice = '.$object->id; + if ($typeelement == 'propal') $sql.= ' AND a.propalrowid = '.$object->id; + if ($typeelement == 'order') $sql.= ' AND a.fk_commande = '.$object->id; + if ($typeelement == 'supplier_order') $sql.= ' AND a.fk_supplier_order = '.$object->id; + if ($typeelement == 'project') $sql.= ' AND a.fk_project = '.$object->id; - dol_syslog("FormActions::showactions sql=".$sql); - $resql = $this->db->query($sql); - if ($resql) - { - $num = $this->db->num_rows($resql); - if ($num) - { - if ($typeelement == 'invoice') $title=$langs->trans('ActionsOnBill'); - if ($typeelement == 'supplier_invoice') $title=$langs->trans('ActionsOnSupplierBill'); - if ($typeelement == 'propal') $title=$langs->trans('ActionsOnPropal'); - if ($typeelement == 'order') $title=$langs->trans('ActionsOnOrder'); - if ($typeelement == 'supplier_order') $title=$langs->trans('ActionsOnSupplierOrder'); - if ($typeelement == 'project') $title=$langs->trans('ActionsOnProject'); + dol_syslog("FormActions::showactions sql=".$sql); + $resql = $this->db->query($sql); + if ($resql) + { + $num = $this->db->num_rows($resql); + if ($num) + { + if ($typeelement == 'invoice') $title=$langs->trans('ActionsOnBill'); + if ($typeelement == 'supplier_invoice') $title=$langs->trans('ActionsOnSupplierBill'); + if ($typeelement == 'propal') $title=$langs->trans('ActionsOnPropal'); + if ($typeelement == 'order') $title=$langs->trans('ActionsOnOrder'); + if ($typeelement == 'supplier_order') $title=$langs->trans('ActionsOnSupplierOrder'); + if ($typeelement == 'project') $title=$langs->trans('ActionsOnProject'); - print_titre($title); + print_titre($title); - $i = 0; $total = 0; $var=true; - print ''; - print ''; - print "\n"; + $i = 0; $total = 0; $var=true; + print '
'.$langs->trans('Ref').''.$langs->trans('Date').''.$langs->trans('Action').''.$langs->trans('By').'
'; + print ''; + print "\n"; - while ($i < $num) - { - $objp = $this->db->fetch_object($resql); - $var=!$var; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - $i++; - } - print '
'.$langs->trans('Ref').''.$langs->trans('Date').''.$langs->trans('Action').''.$langs->trans('By').'
'.img_object($langs->trans('ShowTask'),'task').' '.$objp->id.''.dol_print_date($this->db->jdate($objp->da),'day').''.dol_trunc($objp->label,32).''.$objp->login.'
'; - } + while ($i < $num) + { + $objp = $this->db->fetch_object($resql); + $var=!$var; + print ''; + print ''.img_object($langs->trans('ShowTask'),'task').' '.$objp->id.''; + print ''.dol_print_date($this->db->jdate($objp->da),'day').''; + print ''.dol_trunc($objp->label,32).''; + print ''.$objp->login.''; + print ''; + $i++; + } + print ''; + } - return $num; - } - else - { - dol_print_error($this->db); - return -1; - } - } + return $num; + } + else + { + dol_print_error($this->db); + return -1; + } + } - /** - * \brief Retourne la liste des types de comptes financiers - * \param selected Type pre-selectionne - * \param htmlname Nom champ formulaire - */ - function select_type_actions($selected='',$htmlname='actioncode') - { - global $langs,$user; + /** + * \brief Retourne la liste des types de comptes financiers + * \param selected Type pre-selectionne + * \param htmlname Nom champ formulaire + */ + function select_type_actions($selected='',$htmlname='actioncode') + { + global $langs,$user; - require_once(DOL_DOCUMENT_ROOT."/comm/action/class/cactioncomm.class.php"); - require_once(DOL_DOCUMENT_ROOT."/core/class/html.form.class.php"); - $caction=new CActionComm($this->db); - $form=new Form($this->db); + require_once(DOL_DOCUMENT_ROOT."/comm/action/class/cactioncomm.class.php"); + require_once(DOL_DOCUMENT_ROOT."/core/class/html.form.class.php"); + $caction=new CActionComm($this->db); + $form=new Form($this->db); - $arraylist=$caction->liste_array(1,'code'); - $arraylist[0]=' '; - asort($arraylist); + $arraylist=$caction->liste_array(1,'code'); + $arraylist[0]=' '; + asort($arraylist); - print $form->selectarray($htmlname, $arraylist, $selected); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); - } + print $form->selectarray($htmlname, $arraylist, $selected); + if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); + } } diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 6c87526c4f1..940cd229581 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -19,6 +19,7 @@ /** * \file htdocs/core/class/html.formadmin.class.php + * \ingroup core * \brief File of class for html functions for admin pages * \version $Id$ */ diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 9243faf4797..b9463f3bb67 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -18,6 +18,7 @@ /** * \file htdocs/core/class/html.formcompany.class.php + * \ingroup core * \brief File of class to build HTML component for third parties management * \version $Id$ */ diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index ceb8780f908..50b43db9ac3 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -19,6 +19,7 @@ /** * \file htdocs/core/class/html.formfile.class.php + * \ingroup core * \brief File of class to offer components to list and upload files * \version $Id$ */ diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 1feb4b8bbc6..957867375d6 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -19,10 +19,10 @@ /** * \file htdocs/core/class/html.formmail.class.php + * \ingroup core * \brief Fichier de la classe permettant la generation du formulaire html d'envoi de mail unitaire * \version $Id$ */ - require_once(DOL_DOCUMENT_ROOT ."/core/class/html.form.class.php"); diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php index 725a5aa815a..de4111c11d4 100644 --- a/htdocs/core/class/html.formorder.class.php +++ b/htdocs/core/class/html.formorder.class.php @@ -18,6 +18,7 @@ /** * \file htdocs/core/class/html.formorder.class.php + * \ingroup core * \brief File of predefined functions for HTML forms for order module * \version $Id$ */ diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 129b4502f40..155c6557c08 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -27,6 +27,7 @@ /** * \file htdocs/core/class/html.formother.class.php + * \ingroup core * \brief Fichier de la classe des fonctions predefinie de composants html autre * \version $Id$ */ diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 0e4b52e3290..0a8bb49d4aa 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -19,8 +19,8 @@ */ /** - * \file htdocs/core/class/interfaces.class.php - * \ingroup workflow + * \file htdocs/core/class/interfaces.class.php + * \ingroup core * \brief Fichier de la classe de gestion des triggers * \version $Id$ */ diff --git a/htdocs/core/class/menu.class.php b/htdocs/core/class/menu.class.php index ee9d5cf20e1..5cae9dab8aa 100644 --- a/htdocs/core/class/menu.class.php +++ b/htdocs/core/class/menu.class.php @@ -19,6 +19,7 @@ /** * \file htdocs/core/class/menu.class.php + * \ingroup core * \brief Fichier de la classe de gestion du menu gauche * \version $Id$ */ diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index e0659fcc910..a82fc109e65 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -18,18 +18,18 @@ */ /** - \file htdocs/core/class/notify.class.php - \brief Fichier de la classe de gestion des notifications - \version $Id$ -*/ + * \file htdocs/core/class/notify.class.php + * \ingroup core + * \brief Fichier de la classe de gestion des notifications + * \version $Id$ + */ require_once(DOL_DOCUMENT_ROOT ."/lib/CMailFile.class.php"); /** - \class Notify - \brief Classe de gestion des notifications -*/ - + * \class Notify + * \brief Classe de gestion des notifications + */ class Notify { var $id; diff --git a/htdocs/core/class/smartphone.class.php b/htdocs/core/class/smartphone.class.php index 18d5254d351..14e391f7e3e 100644 --- a/htdocs/core/class/smartphone.class.php +++ b/htdocs/core/class/smartphone.class.php @@ -18,6 +18,7 @@ /** * \file htdocs/core/class/smartphone.class.php + * \ingroup core * \brief Fichier de la classe de gestion des smartphones * \version $Id$ */ @@ -30,7 +31,7 @@ class Smartphone { var $db; - + var $phone; var $theme; var $title; @@ -44,7 +45,7 @@ class Smartphone { { $this->db = $DB; } - + /** * Get template directory */ @@ -68,7 +69,7 @@ class Smartphone { $this->template_dir=DOL_DOCUMENT_ROOT."/theme/phones/others/tpl/"; } } - + /** * Show HTML header * @param title Web page title @@ -76,29 +77,29 @@ class Smartphone { function smartheader($type='default') { global $conf; - + if ($type == 'default') include_once($this->template_dir.'header.tpl.php'); } - + /** * Show HTML footer */ function smartfooter() - { + { include_once($this->template_dir.'footer.tpl.php'); } - + /** * Show menu */ function smartmenu() - { + { global $conf, $langs; - + if (! $conf->smart_menu) $conf->smart_menu ='iphone_backoffice.php'; $smart_menu=$conf->smart_menu; if (GETPOST('top_menu')) $smart_menu=GETPOST('top_menu'); - + // Load the smartphone menu manager $result=@include_once(DOL_DOCUMENT_ROOT ."/includes/menus/smartphone/".$smart_menu); if (! $result) // If failed to include, we try with standard @@ -108,7 +109,7 @@ class Smartphone { } $menusmart = new MenuSmart($this->db); $menusmart->atarget=$target; - + include_once($this->template_dir.'menu.tpl.php'); } diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index b263a35a75d..0f1e12348ba 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -20,6 +20,7 @@ /** * \file htdocs/core/class/translate.class.php + * \ingroup core * \brief File for Tanslate class * \author Eric Seigne * \author Laurent Destailleur @@ -126,16 +127,16 @@ class Translate { /** - * \brief Load translation key-value for a particular file, into a memory array. - * If data for file already loaded, do nothing. - * All data in translation array are stored in UTF-8 format. - * \param domain File name to load (.lang file). Use file@module if file is in a module directory. - * \param alt 0 (try xx_ZZ then 1), 1 (try xx_XX then 2), 2 (try en_US or fr_FR or es_ES) - * \param stopafterdirection Stop when the DIRECTION tag is found (optimize) - * \param forcelangdir To force a lang directory - * \return int <0 if KO, 0 if already loaded, >0 if OK - * \remarks tab_loaded is completed with $domain key. - * Value for hash are: 1:Loaded from disk, 2:Not found, 3:Loaded from cache + * Load translation key-value for a particular file, into a memory array. + * If data for file already loaded, do nothing. + * All data in translation array are stored in UTF-8 format. + * tab_loaded is completed with $domain key. + * Value for hash are: 1:Loaded from disk, 2:Not found, 3:Loaded from cache + * @param domain File name to load (.lang file). Use file@module if file is in a module directory. + * @param alt 0 (try xx_ZZ then 1), 1 (try xx_XX then 2), 2 (try en_US or fr_FR or es_ES) + * @param stopafterdirection Stop when the DIRECTION tag is found (optimize) + * @param forcelangdir To force a lang directory + * @return int <0 if KO, 0 if already loaded, >0 if OK */ function Load($domain,$alt=0,$stopafterdirection=0,$forcelangdir='') { @@ -518,6 +519,7 @@ class Translate { /** * Return list of all available languages * @param langdir Directory to scan + * @param maxlength Max length for each value in combo box (will be truncated) * @return array List of languages */ function get_available_languages($langdir=DOL_DOCUMENT_ROOT,$maxlength=0) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 6d6df36838c..8c42f1d8319 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1125,11 +1125,12 @@ class Societe extends CommonObject } /** - * \brief Add a discount for third party - * \param remise Montant de la remise - * \param user Utilisateur qui accorde la remise - * \param desc Motif de l'avoir - * \return int <0 si ko, id de la ligne de remise si ok + * Add a discount for third party + * @param remise Montant de la remise + * @param user Utilisateur qui accorde la remise + * @param desc Motif de l'avoir + * @param tva_tx VAT rate + * @return int <0 if KO, id or record if OK */ function set_remise_except($remise, $user, $desc, $tva_tx=0) { @@ -1887,8 +1888,8 @@ class Societe extends CommonObject } /** - * \brief Return if third party is a company (Business) or an end user (Consumer) - * \param boolean true=is a company, false=a and user + * Return if third party is a company (Business) or an end user (Consumer) + * @return boolean true=is a company, false=a and user */ function isACompany() { @@ -1905,8 +1906,8 @@ class Societe extends CommonObject /** - * \brief Return if a country is inside the EEC (European Economic Community) - * \param boolean true = pays inside EEC, false= pays outside EEC + * Return if a country is inside the EEC (European Economic Community) + * @param boolean true = pays inside EEC, false= pays outside EEC */ function isInEEC() { @@ -1949,8 +1950,8 @@ class Societe extends CommonObject } /** - * \brief Charge la liste des categories fournisseurs - * \return 0 in success, <> 0 in error + * Charge la liste des categories fournisseurs + * @return int 0 if success, <> 0 if error */ function LoadSupplierCateg() { @@ -1976,7 +1977,7 @@ class Societe extends CommonObject /** * Charge la liste des categories fournisseurs - * @return 0 in success, <> 0 in error + * @return int 0 if success, <> 0 if error */ function AddFournisseurInCategory($categorie_id) { @@ -2063,10 +2064,10 @@ class Societe extends CommonObject } /** - * \brief Cree en base un tiers depuis l'objet adherent - * \param member Objet adherent source - * \param socname Name of third to force - * \return int Si erreur <0, si ok renvoie id compte cree + * Cree en base un tiers depuis l'objet adherent + * @param member Objet adherent source + * @param socname Name of third to force + * @return int Si erreur <0, si ok renvoie id compte cree */ function create_from_member($member,$socname='') {