Fix scrutinizer bugs
This commit is contained in:
parent
929893bd49
commit
9cdf322bfb
@ -41,6 +41,9 @@ if (!$user->rights->banque->lire)
|
|||||||
function valeur($sql)
|
function valeur($sql)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
|
$valeur = 0;
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -60,8 +60,6 @@ class Deplacement extends CommonObject
|
|||||||
|
|
||||||
$this->statuts_short = array(0 => 'Draft', 1 => 'Validated', 2 => 'Refunded');
|
$this->statuts_short = array(0 => 'Draft', 1 => 'Validated', 2 => 'Refunded');
|
||||||
$this->statuts = array(0 => 'Draft', 1 => 'Validated', 2 => 'Refunded');
|
$this->statuts = array(0 => 'Draft', 1 => 'Validated', 2 => 'Refunded');
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -26,8 +26,7 @@ include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php';
|
|||||||
include_once DOL_DOCUMENT_ROOT . '/compta/deplacement/class/deplacement.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/compta/deplacement/class/deplacement.class.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class DeplacementStats
|
* Classe permettant la gestion des stats des deplacements et notes de frais
|
||||||
* \brief Classe permettant la gestion des stats des deplacements et notes de frais
|
|
||||||
*/
|
*/
|
||||||
class DeplacementStats extends Stats
|
class DeplacementStats extends Stats
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4594,7 +4594,8 @@ class Form
|
|||||||
}
|
}
|
||||||
if (! empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC)) // If option to have vat for end customer for services is on
|
if (! empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC)) // If option to have vat for end customer for services is on
|
||||||
{
|
{
|
||||||
if (! $societe_vendeuse->isInEEC() && (! is_object($societe_acheteuse) || ($societe_acheteuse->isInEEC() && ! $societe_acheteuse->isACompany())))
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
|
if (! isInEEC($societe_vendeuse) && (! is_object($societe_acheteuse) || (isInEEC($societe_acheteuse) && ! $societe_acheteuse->isACompany())))
|
||||||
{
|
{
|
||||||
// We also add the buyer
|
// We also add the buyer
|
||||||
if (is_numeric($type))
|
if (is_numeric($type))
|
||||||
|
|||||||
@ -581,6 +581,8 @@ function getFormeJuridiqueLabel($code)
|
|||||||
*/
|
*/
|
||||||
function isInEEC($object)
|
function isInEEC($object)
|
||||||
{
|
{
|
||||||
|
if (empty($object->country_code)) return false;
|
||||||
|
|
||||||
// List of all country codes that are in europe for european vat rules
|
// List of all country codes that are in europe for european vat rules
|
||||||
// List found on http://ec.europa.eu/taxation_customs/common/faq/faq_1179_en.htm#9
|
// List found on http://ec.europa.eu/taxation_customs/common/faq/faq_1179_en.htm#9
|
||||||
$country_code_in_EEC=array(
|
$country_code_in_EEC=array(
|
||||||
|
|||||||
@ -57,6 +57,7 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
|
|||||||
|
|
||||||
// Event/record is qualified
|
// Event/record is qualified
|
||||||
$qualified = 0;
|
$qualified = 0;
|
||||||
|
$amounts = 0;
|
||||||
if ($action==='BILL_VALIDATE' || $action==='BILL_DELETE' || $action === 'BILL_SENTBYMAIL'
|
if ($action==='BILL_VALIDATE' || $action==='BILL_DELETE' || $action === 'BILL_SENTBYMAIL'
|
||||||
|| (in_array($object->element, array('facture','suplier_invoice')) && $action === 'DOC_DOWNLOAD') || (in_array($object->element, array('facture','suplier_invoice')) && $action === 'DOC_PREVIEW')
|
|| (in_array($object->element, array('facture','suplier_invoice')) && $action === 'DOC_DOWNLOAD') || (in_array($object->element, array('facture','suplier_invoice')) && $action === 'DOC_PREVIEW')
|
||||||
)
|
)
|
||||||
|
|||||||
@ -3885,6 +3885,8 @@ function migrate_event_assignement_contact($db,$langs,$conf)
|
|||||||
*/
|
*/
|
||||||
function migrate_reset_blocked_log($db,$langs,$conf)
|
function migrate_reset_blocked_log($db,$langs,$conf)
|
||||||
{
|
{
|
||||||
|
global $user;
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
|
||||||
|
|
||||||
print '<tr><td colspan="4">';
|
print '<tr><td colspan="4">';
|
||||||
@ -3945,7 +3947,7 @@ function migrate_reset_blocked_log($db,$langs,$conf)
|
|||||||
$object->entity = $obj->entity;
|
$object->entity = $obj->entity;
|
||||||
$object->date = dol_now();
|
$object->date = dol_now();
|
||||||
|
|
||||||
$b=new BlockedLog($this->db);
|
$b=new BlockedLog($db);
|
||||||
$b->setObjectData($object, 'MODULE_SET', 0);
|
$b->setObjectData($object, 'MODULE_SET', 0);
|
||||||
|
|
||||||
$res = $b->create($user);
|
$res = $b->create($user);
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class UserGroup extends CommonObject
|
|||||||
public $datem; // Modification date of group
|
public $datem; // Modification date of group
|
||||||
public $members=array(); // Array of users
|
public $members=array(); // Array of users
|
||||||
|
|
||||||
public $nb_rights; // Number of rights granted to the user
|
public $nb_rights; // Number of rights granted to the user
|
||||||
|
|
||||||
private $_tab_loaded=array(); // Array of cache of already loaded permissions
|
private $_tab_loaded=array(); // Array of cache of already loaded permissions
|
||||||
|
|
||||||
@ -66,8 +66,6 @@ class UserGroup extends CommonObject
|
|||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->nb_rights = 0;
|
$this->nb_rights = 0;
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user