This commit is contained in:
Maxime Kohlhaas 2013-06-21 15:14:32 +02:00
parent 8bc68959e1
commit d6a7a0ed71
4 changed files with 81 additions and 81 deletions

View File

@ -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");

View File

@ -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';

View File

@ -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;

View File

@ -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;
}