forked from Wavyzz/dolibarr
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -115,16 +115,16 @@ function getDoliDBInstance($type, $host, $user, $pass, $name, $port)
|
|||||||
* 'c_paiement', 'c_payment_term', ...
|
* 'c_paiement', 'c_payment_term', ...
|
||||||
* @param int $shared 0=Return id of current entity only,
|
* @param int $shared 0=Return id of current entity only,
|
||||||
* 1=Return id of current entity + shared entities (default)
|
* 1=Return id of current entity + shared entities (default)
|
||||||
* @param int $forceentity Entity id
|
* @param object $currentobject Current object if needed
|
||||||
* @return mixed Entity id(s) to use
|
* @return mixed Entity id(s) to use
|
||||||
*/
|
*/
|
||||||
function getEntity($element, $shared=1, $forceentity=null)
|
function getEntity($element, $shared=1, $currentobject=null)
|
||||||
{
|
{
|
||||||
global $conf, $mc;
|
global $conf, $mc;
|
||||||
|
|
||||||
if (is_object($mc))
|
if (is_object($mc))
|
||||||
{
|
{
|
||||||
return $mc->getEntity($element, $shared, $forceentity);
|
return $mc->getEntity($element, $shared, $currentobject);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (c) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -1512,7 +1513,7 @@ class ExpenseReport extends CommonObject
|
|||||||
$classname = $conf->global->EXPENSEREPORT_ADDON;
|
$classname = $conf->global->EXPENSEREPORT_ADDON;
|
||||||
|
|
||||||
// Include file with class
|
// Include file with class
|
||||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
$dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||||
foreach ($dirmodels as $reldir)
|
foreach ($dirmodels as $reldir)
|
||||||
{
|
{
|
||||||
$dir = dol_buildpath($reldir."core/modules/expensereport/");
|
$dir = dol_buildpath($reldir."core/modules/expensereport/");
|
||||||
@@ -1521,9 +1522,8 @@ class ExpenseReport extends CommonObject
|
|||||||
$mybool|=@include_once $dir.$file;
|
$mybool|=@include_once $dir.$file;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $mybool)
|
if ($mybool === false) {
|
||||||
{
|
dol_print_error('', "Failed to include file ".$file);
|
||||||
dol_print_error('',"Failed to include file ".$file);
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -805,15 +806,14 @@ class Fichinter extends CommonObject
|
|||||||
$mybool|=@include_once $dir.$file;
|
$mybool|=@include_once $dir.$file;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $mybool)
|
if ($mybool === false) {
|
||||||
{
|
dol_print_error('', "Failed to include file ".$file);
|
||||||
dol_print_error('',"Failed to include file ".$file);
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj = new $classname();
|
$obj = new $classname();
|
||||||
$numref = "";
|
$numref = "";
|
||||||
$numref = $obj->getNextValue($soc,$this);
|
$numref = $obj->getNextValue($soc, $this);
|
||||||
|
|
||||||
if ( $numref != "")
|
if ( $numref != "")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -800,8 +801,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$mybool|=@include_once $dir.$file;
|
$mybool|=@include_once $dir.$file;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $mybool)
|
if ($mybool === false) {
|
||||||
{
|
|
||||||
dol_print_error('',"Failed to include file ".$file);
|
dol_print_error('',"Failed to include file ".$file);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -2280,9 +2281,8 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$mybool|=@include_once $dir.$file;
|
$mybool|=@include_once $dir.$file;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $mybool)
|
if ($mybool === false) {
|
||||||
{
|
dol_print_error('', "Failed to include file ".$file);
|
||||||
dol_print_error('',"Failed to include file ".$file);
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.francenetlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -654,14 +655,12 @@ class PaiementFourn extends Paiement
|
|||||||
}
|
}
|
||||||
|
|
||||||
// For compatibility
|
// For compatibility
|
||||||
if (! $mybool)
|
if ($mybool === false) {
|
||||||
{
|
|
||||||
$file = $conf->global->SUPPLIER_PAYMENT_ADDON.".php";
|
$file = $conf->global->SUPPLIER_PAYMENT_ADDON.".php";
|
||||||
$classname = "mod_supplier_payment_".$conf->global->SUPPLIER_PAYMENT_ADDON;
|
$classname = "mod_supplier_payment_".$conf->global->SUPPLIER_PAYMENT_ADDON;
|
||||||
$classname = preg_replace('/\-.*$/','',$classname);
|
$classname = preg_replace('/\-.*$/','',$classname);
|
||||||
// Include file with class
|
// Include file with class
|
||||||
foreach ($conf->file->dol_document_root as $dirroot)
|
foreach ($conf->file->dol_document_root as $dirroot) {
|
||||||
{
|
|
||||||
$dir = $dirroot."/core/modules/supplier_payment/";
|
$dir = $dirroot."/core/modules/supplier_payment/";
|
||||||
|
|
||||||
// Load file with numbering class (if found)
|
// Load file with numbering class (if found)
|
||||||
@@ -671,8 +670,7 @@ class PaiementFourn extends Paiement
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $mybool)
|
if ($mybool === false) {
|
||||||
{
|
|
||||||
dol_print_error('',"Failed to include file ".$file);
|
dol_print_error('',"Failed to include file ".$file);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user