diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index ed8f8ed976e..f4fb280ef9d 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2016 Regis Houssin * * 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 @@ -53,6 +53,9 @@ class modMyModule extends DolibarrModules // Family can be 'crm','financial','hr','projects','products','ecm','technic','other' // It is used to group modules in module setup page $this->family = "other"; + // Gives the possibility to the module, to provide his own family info and position of this family. (canceled $this->family) + $this->familyinfo = array('myownfamily' => array('position' => '001', 'label' => $langs->trans("MyOwnFamily"))); + // Module position in the family $this->module_position = 500; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i','',get_class($this)); diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 92cc7d3bff5..3fbaddd0a3f 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -142,10 +142,10 @@ foreach ($modulesdir as $dir) if (! $objMod->numero > 0) { - dol_syslog('The module descriptor '.$modName.' must have a numero property', LOG_ERR); + dol_syslog('The module descriptor '.$modName.' must have a numero property', LOG_ERR); } $j = $objMod->numero; - + $modulequalified=1; // We discard modules according to features level (PS: if module is activated we always show it) @@ -161,17 +161,25 @@ foreach ($modulesdir as $dir) { $modules[$i] = $objMod; $filename[$i]= $modName; - + $special = $objMod->special; - $familykey = $objMod->family; + + // Gives the possibility to the module, to provide his own family info and position of this family + if (is_array($objMod->familyinfo) && !empty($objMod->familyinfo)) { + $familyinfo = array_merge($familyinfo, $objMod->familyinfo); + $familykey = key($objMod->familyinfo); + } else { + $familykey = $objMod->family; + } + $moduleposition = ($objMod->module_position?$objMod->module_position:'500'); if ($moduleposition == 500 && ($objMod->isCoreOrExternalModule() == 'external')) { $moduleposition = 800; } - + if ($special == 1) $familykey='interface'; - + $orders[$i] = $familyinfo[$familykey]['position']."_".$familykey."_".$moduleposition."_".$j; // Sort by family, then by module position then number $dirmod[$i] = $dir; // Set categ[$i] @@ -323,7 +331,7 @@ if ($mode != 'marketplace') $objMod = $modules[$key]; $special = $objMod->special; - + //print $objMod->name." - ".$key." - ".$objMod->special.' - '.$objMod->version."
"; //if (($mode != (isset($specialtostring[$special])?$specialtostring[$special]:'unknown') && $mode != 'expdev') if (($special >= 4 && $mode != 'expdev') diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 00bba632d1c..ddacf259ae4 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -37,6 +37,7 @@ if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn if (! $user->rights->societe->lire) accessforbidden(); $langs->load("commercial"); +$langs->load("propal"); $action=GETPOST('action', 'alpha'); $bid=GETPOST('bid', 'int'); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index c3ab3f82750..52928ca4790 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1022,7 +1022,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu // Setup if (! empty($conf->accounting->enabled)) { - // $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy", $langs->trans("Fiscalyear"),0,$user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear'); + $langs->load("admin"); + // $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy", $langs->trans("Fiscalyear"),0,$user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear'); $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy", $langs->trans("Chartofaccounts"),0,$user->rights->accounting->chartofaccount, '', $mainmenu, 'chartofaccount'); } } diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index df6f58af77d..59403147977 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -201,7 +201,7 @@
- __AMOUNT__ euros + __AMOUNT__ euros
@@ -215,7 +215,9 @@ Le bénéficiaire certifie sur l’honneur que les dons et versements qu’il reçoit ouvrent droit à la réduction d'impôt prévue à l’article (3) :
- __CodeDon__ + + +
__ARTICLE200____ARTICLE238____ARTICLE885__

diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index e80d97b781a..c20eb924e97 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -146,6 +146,7 @@ class html_cerfafr extends ModeleDon $ModePaiement = ' Remise d\'espèces Chèque Virement, prélèvement, carte bancaire'; } + /* if (empty($don->societe)) { $CodeDon = ' 200 du CGI 238 bis du CGI 885-0 V bis A du CGI'; @@ -154,6 +155,7 @@ class html_cerfafr extends ModeleDon { $CodeDon = ' 200 du CGI 238 bis du CGI 885-0 V bis A du CGI'; } + */ // Define contents $donmodel=DOL_DOCUMENT_ROOT ."/core/modules/dons/html_cerfafr.html"; @@ -186,7 +188,7 @@ class html_cerfafr extends ModeleDon $form = str_replace('__DonationRecipient__',$outputlangs->trans("DonationRecipient"),$form); $form = str_replace('__DonationDatePayment__',$outputlangs->trans("DonationDatePayment"),$form); $form = str_replace('__PaymentMode__',$outputlangs->trans("PaymentMode"),$form); - $form = str_replace('__CodeDon__',$CodeDon,$form); + // $form = str_replace('__CodeDon__',$CodeDon,$form); $form = str_replace('__Name__',$outputlangs->trans("Name"),$form); $form = str_replace('__Address__',$outputlangs->trans("Address"),$form); $form = str_replace('__Zip__',$outputlangs->trans("Zip"),$form); diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index bd9fd680087..0b3bcf469d5 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -618,7 +618,7 @@ if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') // From $expediteur = new User($db); - $expediteur->fetch($cp->fk_validator); + $expediteur->fetch($cp->fk_user_cancel); $emailFrom = $expediteur->email; // Subject diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index eb558e1c37f..1d1c624aa4c 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -817,18 +817,17 @@ class Holiday extends CommonObject } /** - * Retourne la valeur d'un paramètre de configuration + * Return value of a conf parameterfor leave module + * TODO Move this into llx_const table * - * @param string $name name du paramètre de configuration - * @param int $fk_type Filter on type - * @return string retourne la valeur du paramètre + * @param string $name name of parameter + * @return string value of parameter */ - function getConfCP($name, $fk_type=0) + function getConfCP($name) { $sql = "SELECT value"; $sql.= " FROM ".MAIN_DB_PREFIX."holiday_config"; $sql.= " WHERE name = '".$name."'"; - if ($fk_type > 0) $sql.=" AND fk_type = ".$fk_type; dol_syslog(get_class($this).'::getConfCP name='.$name.'', LOG_DEBUG); $result = $this->db->query($sql); diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index eb7fea3598c..71d286348e8 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -159,7 +159,7 @@ llxHeader(array(),$langs->trans('CPTitreMenu')); print load_fiche_titre($langs->trans('MenuConfCP'), '', 'title_hrm.png'); print '
'.$langs->trans('LastUpdateCP').': '."\n"; -$lastUpdate = $holiday->getConfCP('lastUpdate', 0); +$lastUpdate = $holiday->getConfCP('lastUpdate'); if ($lastUpdate) { $monthLastUpdate = $lastUpdate[4].$lastUpdate[5]; diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang index d12d7595f94..f78ac37601c 100644 --- a/htdocs/langs/en_US/propal.lang +++ b/htdocs/langs/en_US/propal.lang @@ -25,6 +25,7 @@ LastModifiedProposals=Last %s modified proposals AllPropals=All proposals LastProposals=Last proposals SearchAProposal=Search a proposal +NoProposal=No proposal ProposalsStatistics=Commercial proposal's statistics NumberOfProposalsByMonth=Number by month AmountOfProposalsByMonthHT=Amount by month (net of tax) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index d82adceb1a4..97283b4b2bc 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -230,7 +230,8 @@ else else $sql.= " AND p.fk_product_type <> '1'"; } if ($sref) $sql .= natural_search('p.ref', $sref); - if ($sbarcode) $sql .= natural_search('p.barcode', $sbarcode); + if ($snom) $sql .= natural_search('p.label', $snom); + if ($sbarcode) $sql .= natural_search('p.barcode', $sbarcode); if (isset($tosell) && dol_strlen($tosell) > 0 && $tosell!=-1) $sql.= " AND p.tosell = ".$db->escape($tosell); if (isset($tobuy) && dol_strlen($tobuy) > 0 && $tobuy!=-1) $sql.= " AND p.tobuy = ".$db->escape($tobuy); if (dol_strlen($canvas) > 0) $sql.= " AND p.canvas = '".$db->escape($canvas)."'"; diff --git a/htdocs/user/class/userbankaccount.class.php b/htdocs/user/class/userbankaccount.class.php index c89d7162c2a..30c795bbd72 100644 --- a/htdocs/user/class/userbankaccount.class.php +++ b/htdocs/user/class/userbankaccount.class.php @@ -133,15 +133,14 @@ class UserBankAccount extends Account * Load record from database * * @param int $id Id of record - * @param int $socid Id of company. If this is filled, function will return the default RIB of company * @return int <0 if KO, >0 if OK */ - function fetch($id, $socid=0) + function fetch($id) { - if (empty($id) && empty($socid)) return -1; + if (empty($id)) return -1; $sql = "SELECT rowid, fk_user, entity, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio,"; - $sql.= " owner_address, default_rib, label, datec, tms as datem"; + $sql.= " owner_address, label, datec, tms as datem"; $sql.= " FROM ".MAIN_DB_PREFIX."user_rib"; if ($id) $sql.= " WHERE rowid = ".$id; if ($socid) $sql.= " WHERE fk_user = ".$userid;