diff --git a/htdocs/admin/commissions.php b/htdocs/admin/commissions.php index d29788d4d9c..64e618633ac 100644 --- a/htdocs/admin/commissions.php +++ b/htdocs/admin/commissions.php @@ -18,10 +18,9 @@ */ /** - * \file /marges/admin/commissions.php - * \ingroup marges + * \file /htdocs/admin/commissions.php + * \ingroup commissions * \brief Page to setup advanced commissions module - * \version $Id:$ */ $res=@include("../main.inc.php"); // For root directory @@ -39,7 +38,7 @@ accessforbidden(); if ($conf->global->COMMISSION_BASE == "") { if ($conf->marges->enabled) $conf->global->COMMISSION_BASE = "MARGES"; - else + else $conf->global->COMMISSION_BASE = "CA"; } @@ -80,11 +79,12 @@ if (isset($_POST['serviceCommissionRate'])) } } + /* * View */ -llxHeader('',$langs->trans("commissionsSetup")); +llxHeader('',$langs->trans("CommissionsSetup")); $linkback=''.$langs->trans("BackToModuleList").''; @@ -93,7 +93,7 @@ print_fiche_titre($langs->trans("commissionsSetup"),$linkback,'setup'); $head = commissions_admin_prepare_head($adh); -dol_fiche_head($head, 'parameters', $langs->trans("commissions"), 0, 'company'); +dol_fiche_head($head, 'parameters', $langs->trans("Commissions"), 0, 'commissions'); print "
"; @@ -123,7 +123,7 @@ print ' />'; print $langs->trans("CommissionBasedOnCA"); print '
'; print 'marges->enabled) +if (!$conf->marges->enabled) print 'disabled'; elseif ($conf->global->COMMISSION_BASE == "MARGES") print 'checked'; diff --git a/htdocs/admin/margin.php b/htdocs/admin/margin.php index b0c9e5fd510..782d4df55e0 100644 --- a/htdocs/admin/margin.php +++ b/htdocs/admin/margin.php @@ -102,7 +102,7 @@ print_fiche_titre($langs->trans("margesSetup"),$linkback,'setup'); $head = marges_admin_prepare_head(); -dol_fiche_head($head, 'parameters', $langs->trans("marges"), 0, 'company'); +dol_fiche_head($head, 'parameters', $langs->trans("marges"), 0, 'marges'); print "
"; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 3849e263596..7fa779c9659 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -303,6 +303,8 @@ class Propal extends CommonObject * @param int $rang Position of line * @param int $special_code Special code * @param int $fk_parent_line Id of parent line + * @param int $fk_fournprice Id supplier price + * @param int $pa_ht Buying price without tax * @return int >0 if OK, <0 if KO * * @see add_product @@ -456,13 +458,15 @@ class Propal extends CommonObject * @param int $special_code Set special code ('' = we don't change it) * @param int $fk_parent_line Id of line parent * @param int $skip_update_total Skip update total + * @param int $fk_fournprice Id supplier price + * @param int $pa_ht Buying price without tax * @return int 0 if OK, <0 if KO */ - function updateline($rowid, $pu, $qty, $remise_percent=0, $txtva, $txlocaltax1=0, $txlocaltax2=0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht = 0) + function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0) { global $conf,$user,$langs; - dol_syslog("Propal::UpdateLine $rowid, $pu, $qty, $remise_percent, $txtva, $desc, $price_base_type, $info_bits"); + dol_syslog(get_class($this)."::updateLine $rowid, $pu, $qty, $remise_percent, $txtva, $desc, $price_base_type, $info_bits"); include_once(DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'); // Clean parameters @@ -750,8 +754,8 @@ class Propal extends CommonObject $this->lines[$i]->rang, $this->lines[$i]->special_code, $fk_parent_line, - $this->lines[$i]->fk_fournprice, - $this->lines[$i]->pa_ht + $this->lines[$i]->fk_fournprice, + $this->lines[$i]->pa_ht ); if ($result < 0) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index a1310785cd4..216b27d14fc 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -697,8 +697,8 @@ class Commande extends CommonOrder $this->lines[$i]->rang, $this->lines[$i]->special_code, $fk_parent_line, - $this->lines[$i]->fk_fournprice, - $this->lines[$i]->pa_ht + $this->lines[$i]->fk_fournprice, + $this->lines[$i]->pa_ht ); if ($result < 0) { @@ -996,6 +996,8 @@ class Commande extends CommonOrder * @param int $rang Position of line * @param int $special_code Special code * @param int $fk_parent_line Parent line + * @param int $fk_fournprice Id supplier price + * @param int $pa_ht Buying price (without tax) * @return int >0 if OK, <0 if KO * * @see add_product @@ -1005,7 +1007,7 @@ class Commande extends CommonOrder * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,produit) * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue) */ - function addline($commandeid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $info_bits=0, $fk_remise_except=0, $price_base_type='HT', $pu_ttc=0, $date_start='', $date_end='', $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht = 0) + function addline($commandeid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $info_bits=0, $fk_remise_except=0, $price_base_type='HT', $pu_ttc=0, $date_start='', $date_end='', $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0) { dol_syslog("Commande::addline commandeid=$commandeid, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_percent=$remise_percent, info_bits=$info_bits, fk_remise_except=$fk_remise_except, price_base_type=$price_base_type, pu_ttc=$pu_ttc, date_start=$date_start, date_end=$date_end, type=$type", LOG_DEBUG); @@ -2151,9 +2153,11 @@ class Commande extends CommonOrder * @param int $type Type of line (0=product, 1=service) * @param int $fk_parent_line Parent line id * @param int $skip_update_total Skip update of total + * @param int $fk_fournprice Id supplier price + * @param int $pa_ht Buying price (without tax) * @return int < 0 if KO, > 0 if OK */ - function updateline($rowid, $desc, $pu, $qty, $remise_percent=0, $txtva, $txlocaltax1=0,$txlocaltax2=0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht = 0) + function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0,$txlocaltax2=0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0) { global $conf; diff --git a/htdocs/commissions/lib/commissions.lib.php b/htdocs/commissions/lib/commissions.lib.php index 316718aa329..ca71d41536c 100644 --- a/htdocs/commissions/lib/commissions.lib.php +++ b/htdocs/commissions/lib/commissions.lib.php @@ -23,6 +23,7 @@ /** * Define head array for tabs of marges tools setup pages + * * @return Array of head */ function commissions_admin_prepare_head() @@ -46,4 +47,4 @@ function commissions_admin_prepare_head() return $head; } -?> \ No newline at end of file +?> diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index 60a4cf0f860..a45ed25adc7 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -33,7 +33,7 @@ include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php"); /** - * Classe de description et activation du module Commande + * Class to describe module customer orders */ class modCommande extends DolibarrModules { diff --git a/htdocs/core/modules/modCommissions.class.php b/htdocs/core/modules/modCommissions.class.php index 119328aa322..b03fa23c6d1 100644 --- a/htdocs/core/modules/modCommissions.class.php +++ b/htdocs/core/modules/modCommissions.class.php @@ -27,8 +27,7 @@ include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php"); /** - * \class modCommissions - * \brief Description and activation class for module Commissions + * Class to describe modude Commisions */ class modCommissions extends DolibarrModules { @@ -37,7 +36,7 @@ class modCommissions extends DolibarrModules * * @param DoliDB $db Database handler */ - function modCommissions($db) + function __construct($db) { $this->db = $db; @@ -127,7 +126,7 @@ class modCommissions extends DolibarrModules * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. * It also creates data directories. * - * @return int 1 if OK, 0 if KO + * @return int 1 if OK, 0 if KO */ function init() { @@ -140,10 +139,10 @@ class modCommissions extends DolibarrModules /** * Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - * - * @return int 1 if OK, 0 if KO + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted. + * + * @return int 1 if OK, 0 if KO */ function remove() { @@ -154,14 +153,14 @@ class modCommissions extends DolibarrModules /** - * Create tables and keys required by module + * Create tables and keys required by module * Files mymodule.sql and mymodule.key.sql with create table and create keys * commands must be stored in directory /mymodule/sql/ - * This function is called by this->init. + * This function is called by this->init. * - * @return int <=0 if KO, >0 if OK + * @return int <=0 if KO, >0 if OK */ - function load_tables() + function load_tables() { return; } diff --git a/htdocs/core/modules/modMargin.class.php b/htdocs/core/modules/modMargin.class.php index 94118523ed7..a14068f348e 100644 --- a/htdocs/core/modules/modMargin.class.php +++ b/htdocs/core/modules/modMargin.class.php @@ -25,8 +25,7 @@ include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php"); /** - * \class modMargin - * \brief Description and activation class for module Margin + * Class to describe module Margin */ class modMargin extends DolibarrModules {