diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 537b6f76a63..5d7664b13aa 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -464,7 +464,7 @@ class Adherent extends CommonObject
$action='update';
// Actions on extra fields
- if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
+ if (! $error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
{
$result=$this->insertExtraFields();
if ($result < 0)
diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php
index 75f518074b1..ca8372c04ed 100644
--- a/htdocs/adherents/class/adherent_type.class.php
+++ b/htdocs/adherents/class/adherent_type.class.php
@@ -142,7 +142,7 @@ class AdherentType extends CommonObject
/**
* Met a jour en base donnees du type
*
- * @param User $user Object user making change
+ * @param User $user Object user making change
* @param int $notrigger 1=do not execute triggers, 0 otherwise
* @return int >0 if OK, < 0 if KO
*/
@@ -172,7 +172,7 @@ class AdherentType extends CommonObject
$action='update';
// Actions on extra fields
- if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
+ if (! $error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
{
$result=$this->insertExtraFields();
if ($result < 0)
diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php
index 3e4af5438c6..f7a074106b9 100644
--- a/htdocs/adherents/subscription.php
+++ b/htdocs/adherents/subscription.php
@@ -330,7 +330,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
if (! $error)
{
-// $db->commit();
+ $db->commit();
}
else
{
diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php
index d4a031a6148..b301a2c7a03 100644
--- a/htdocs/admin/multicurrency.php
+++ b/htdocs/admin/multicurrency.php
@@ -19,14 +19,11 @@
/**
* \file admin/multicurrency.php
* \ingroup multicurrency
- * \brief This file is an example module setup page
- * Put some comments here
+ * \brief Page to setup multicurrency module
*/
+
// Dolibarr environment
-
require '../main.inc.php';
-
-// Libraries
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/multicurrency.lib.php';
require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
@@ -42,6 +39,8 @@ if (! $user->admin) {
// Parameters
$action = GETPOST('action', 'alpha');
+
+
/*
* Actions
*/
@@ -164,6 +163,8 @@ if ($resql)
* View
*/
+$form=new Form($db);
+
$page_name = "MultiCurrencySetup";
llxHeader('', $langs->trans($page_name));
@@ -176,21 +177,16 @@ print_fiche_titre($langs->trans($page_name), $linkback);
$head = multicurrencyAdminPrepareHead();
dol_fiche_head($head, 'settings', $langs->trans("ModuleSetup"), -1, "multicurrency");
-// Setup page goes here
-$form=new Form($db);
-$var=false;
print '
';
print '';
print '| '.$langs->trans("Parameters").' | '."\n";
-print ' | ';
-print ''.$langs->trans("Value").' | '."\n";
-
+print ''.$langs->trans("Value").' | '."\n";
+print '
';
print '';
print '| '.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE").' | ';
-print ' | ';
-print '';
+print ' | ';
print '';
print ' |
';
-
print '';
print '| '.$langs->transnoentitiesnoconv("multicurrency_useOriginTx").' | ';
-print ' | ';
-print '';
+print ' | ';
print ' |
';
print '';
print '| '.$langs->transnoentitiesnoconv("multicurrency_buyPriceInCurrency").' | ';
-print ' | ';
-print '';
+print ' | ';
print ' |
';
print '';
print '| '.$langs->transnoentitiesnoconv("multicurrency_modifyRateApplication").' | ';
-print ' | ';
-print '';
+print ' | ';
print ' |
';
*/
print '
';
+
print '
';
if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
{
- $var=false;
+ print '';
print '
';
+
print '';
print '| '.$form->textwithpicto($langs->trans("CurrencyLayerAccount"), $langs->trans("CurrencyLayerAccount_help_to_synchronize")).' | '."\n";
- print ' | ';
- print '';
+ print ' | ';
print ' |
';
-
print '';
print '| '.$langs->transnoentitiesnoconv("multicurrency_appId").' | ';
- print ' | ';
- print '';
+ print ' | ';
print ' |
';
+ print '
';
print '
';
}
+print '';
print '
';
-
-
+print '
';
print '