diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 6c0b0dc401958b4f773b2de3da61db66d2bd5cb8..fd10d0e14de6752206ffa5d56304079d0a41d0ed 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -27,7 +27,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; $langs->load("companies"); $langs->load("members"); diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 165101e3cfae0cd55a2ae73ce3399aaac854450a..7facb9b54591bd48422e558597fc83ae178af1f7 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -971,7 +971,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print '</td><td align="right" class="nowrap">'; if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) { - $newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; + $newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; //$param='month='.$monthshown.'&year='.$year; $hourminsec='100000'; diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index a1ac80522221bfb899207d17076d38866e634d58..54439aea9a3c235a038620f668b94d27dfa11ffb 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -795,7 +795,7 @@ class BonPrelevement extends CommonObject { require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php'; $soc = new Societe($this->db); - $bac = new CompanyBankAccount($this->db); + $bac = new CompanyBankAccount($this->db); // Check RIB $i = 0; @@ -810,7 +810,7 @@ class BonPrelevement extends CommonObject { if ($soc->fetch($fact->socid) >= 0) { - $bac->fetch(0,$soc->id); + $bac->fetch(0,$soc->id); if ($bac->verif() >= 1) { $factures_prev[$i] = $fac; diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 469b9f2ac9455250f0b159ed88c53f23707cee01..eac148deaa4f1334577a91ee6cb321136c546b96 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1423,87 +1423,87 @@ function getSoapParams() return $params; } - -/** - * List urls of element - * - * @param int $objectid Id of record - * @param string $objecttype Type of object ('invoice', 'order', 'expedition_bon', ...) - * @param int $withpicto Picto to show - * @param string $option More options - * @return string URL of link to object id/type - */ -function dolGetElementUrl($objectid,$objecttype,$withpicto=0,$option='') -{ - global $db,$conf; + +/** + * List urls of element + * + * @param int $objectid Id of record + * @param string $objecttype Type of object ('invoice', 'order', 'expedition_bon', ...) + * @param int $withpicto Picto to show + * @param string $option More options + * @return string URL of link to object id/type + */ +function dolGetElementUrl($objectid,$objecttype,$withpicto=0,$option='') +{ + global $db,$conf; $ret=''; - - // Parse element/subelement (ex: project_task) - $module = $element = $subelement = $objecttype; - if (preg_match('/^([^_]+)_([^_]+)/i',$objecttype,$regs)) - { - $module = $element = $regs[1]; - $subelement = $regs[2]; - } - - $classpath = $element.'/class'; - - // To work with non standard path - if ($objecttype == 'facture' || $objecttype == 'invoice') { - $classpath = 'compta/facture/class'; $module='facture'; $subelement='facture'; - } - if ($objecttype == 'commande' || $objecttype == 'order') { - $classpath = 'commande/class'; $module='commande'; $subelement='commande'; - } - if ($objecttype == 'propal') { - $classpath = 'comm/propal/class'; - } - if ($objecttype == 'shipping') { - $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; - } - if ($objecttype == 'delivery') { - $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; - } - if ($objecttype == 'invoice_supplier') { - $classpath = 'fourn/class'; - } - if ($objecttype == 'order_supplier') { - $classpath = 'fourn/class'; - } - if ($objecttype == 'contract') { - $classpath = 'contrat/class'; $module='contrat'; $subelement='contrat'; - } - if ($objecttype == 'member') { - $classpath = 'adherents/class'; $module='adherent'; $subelement='adherent'; - } - if ($objecttype == 'cabinetmed_cons') { - $classpath = 'cabinetmed/class'; $module='cabinetmed'; $subelement='cabinetmedcons'; - } - if ($objecttype == 'fichinter') { - $classpath = 'fichinter/class'; $module='ficheinter'; $subelement='fichinter'; - } - - //print "objecttype=".$objecttype." module=".$module." subelement=".$subelement; - - $classfile = strtolower($subelement); $classname = ucfirst($subelement); - if ($objecttype == 'invoice_supplier') { - $classfile = 'fournisseur.facture'; $classname='FactureFournisseur'; - } - if ($objecttype == 'order_supplier') { - $classfile = 'fournisseur.commande'; $classname='CommandeFournisseur'; - } - - if (! empty($conf->$module->enabled)) - { - $res=dol_include_once('/'.$classpath.'/'.$classfile.'.class.php'); - if ($res) - { - $object = new $classname($db); - $res=$object->fetch($objectid); + + // Parse element/subelement (ex: project_task) + $module = $element = $subelement = $objecttype; + if (preg_match('/^([^_]+)_([^_]+)/i',$objecttype,$regs)) + { + $module = $element = $regs[1]; + $subelement = $regs[2]; + } + + $classpath = $element.'/class'; + + // To work with non standard path + if ($objecttype == 'facture' || $objecttype == 'invoice') { + $classpath = 'compta/facture/class'; $module='facture'; $subelement='facture'; + } + if ($objecttype == 'commande' || $objecttype == 'order') { + $classpath = 'commande/class'; $module='commande'; $subelement='commande'; + } + if ($objecttype == 'propal') { + $classpath = 'comm/propal/class'; + } + if ($objecttype == 'shipping') { + $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; + } + if ($objecttype == 'delivery') { + $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; + } + if ($objecttype == 'invoice_supplier') { + $classpath = 'fourn/class'; + } + if ($objecttype == 'order_supplier') { + $classpath = 'fourn/class'; + } + if ($objecttype == 'contract') { + $classpath = 'contrat/class'; $module='contrat'; $subelement='contrat'; + } + if ($objecttype == 'member') { + $classpath = 'adherents/class'; $module='adherent'; $subelement='adherent'; + } + if ($objecttype == 'cabinetmed_cons') { + $classpath = 'cabinetmed/class'; $module='cabinetmed'; $subelement='cabinetmedcons'; + } + if ($objecttype == 'fichinter') { + $classpath = 'fichinter/class'; $module='ficheinter'; $subelement='fichinter'; + } + + //print "objecttype=".$objecttype." module=".$module." subelement=".$subelement; + + $classfile = strtolower($subelement); $classname = ucfirst($subelement); + if ($objecttype == 'invoice_supplier') { + $classfile = 'fournisseur.facture'; $classname='FactureFournisseur'; + } + if ($objecttype == 'order_supplier') { + $classfile = 'fournisseur.commande'; $classname='CommandeFournisseur'; + } + + if (! empty($conf->$module->enabled)) + { + $res=dol_include_once('/'.$classpath.'/'.$classfile.'.class.php'); + if ($res) + { + $object = new $classname($db); + $res=$object->fetch($objectid); if ($res > 0) $ret=$object->getNomUrl($withpicto,$option); unset($object); } } - return $ret; + return $ret; } \ No newline at end of file