diff --git a/htdocs/compta/bank/bilan.php b/htdocs/compta/bank/bilan.php index 69370faa34e..22f7c8c9e79 100644 --- a/htdocs/compta/bank/bilan.php +++ b/htdocs/compta/bank/bilan.php @@ -41,6 +41,9 @@ if (!$user->rights->banque->lire) function valeur($sql) { global $db; + + $valeur = 0; + $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 5570a0a8afa..05664080ed3 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -60,8 +60,6 @@ class Deplacement extends CommonObject $this->statuts_short = array(0 => 'Draft', 1 => 'Validated', 2 => 'Refunded'); $this->statuts = array(0 => 'Draft', 1 => 'Validated', 2 => 'Refunded'); - - return 1; } /** diff --git a/htdocs/compta/deplacement/class/deplacementstats.class.php b/htdocs/compta/deplacement/class/deplacementstats.class.php index 942c6c4cafa..75ac39a7cca 100644 --- a/htdocs/compta/deplacement/class/deplacementstats.class.php +++ b/htdocs/compta/deplacement/class/deplacementstats.class.php @@ -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'; /** - * \class DeplacementStats - * \brief Classe permettant la gestion des stats des deplacements et notes de frais + * Classe permettant la gestion des stats des deplacements et notes de frais */ class DeplacementStats extends Stats { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 839a4c56fe0..b7ac69d0fc8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -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 (! $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 if (is_numeric($type)) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index bf8433cb5d6..4b78bb53bb7 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -581,6 +581,8 @@ function getFormeJuridiqueLabel($code) */ function isInEEC($object) { + if (empty($object->country_code)) return false; + // 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 $country_code_in_EEC=array( diff --git a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php index edb7772eb9c..d7e146938ac 100644 --- a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php +++ b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php @@ -57,6 +57,7 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers // Event/record is qualified $qualified = 0; + $amounts = 0; 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') ) diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 4e4269e3699..eda1a4d26d5 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -3885,6 +3885,8 @@ function migrate_event_assignement_contact($db,$langs,$conf) */ function migrate_reset_blocked_log($db,$langs,$conf) { + global $user; + require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; print '