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 ''."\n"; -print ''; -print ''."\n"; - +print ''."\n"; +print ''; print ''; print ''; -print ''; -print ''; - print ''; print ''; -print ''; -print ''; print ''; print ''; -print ''; -print ''; print ''; print ''; -print ''; -print ''; */ print '
'.$langs->trans("Parameters").' '.$langs->trans("Value").''.$langs->trans("Value").'
'.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE").' '; +print ''; print '
'; print ''; print ''; @@ -200,11 +196,9 @@ print '
'; print '
'.$langs->transnoentitiesnoconv("multicurrency_useOriginTx").' '; +print ''; print '
'; print ''; print ''; @@ -217,8 +211,7 @@ print '
'.$langs->transnoentitiesnoconv("multicurrency_buyPriceInCurrency").' '; +print ''; print ''; print ''; print ''; @@ -232,8 +225,7 @@ print '
'.$langs->transnoentitiesnoconv("multicurrency_modifyRateApplication").' '; +print ''; print ''; print ''; print ''; @@ -245,16 +237,17 @@ print '
'; + print '
'; if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) { - $var=false; + print '
'; print ''; + print ''; print ''."\n"; - print ''; - print ''; - print ''; print ''; - print ''; - print ''; print ''; - print ''; - print ''; print ''; - print ''; - print ''; print '
'.$form->textwithpicto($langs->trans("CurrencyLayerAccount"), $langs->trans("CurrencyLayerAccount_help_to_synchronize")).' '; + print ''; print ''; print ''; print ''; @@ -263,11 +256,9 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print '
'.$langs->transnoentitiesnoconv("multicurrency_appId").' '; + print ''; print ''; print ''; print ''; @@ -279,8 +270,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print '
'.$langs->transnoentitiesnoconv("multicurrency_appCurrencySource").' '; + print ''; print ''; print ''; print ''; @@ -291,8 +281,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print '
'.$langs->transnoentitiesnoconv("multicurrency_alternateCurrencySource").' '; + print ''; print ''; print ''; print ''; @@ -302,35 +291,35 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print '
'; + print '
'; print '
'; } +print '
'; print ''; print ''; print ''."\n"; -print ''; -print ''."\n"; +print ''."\n"; +print ''; - -print ''; print ''; +print ''; +print ''; +print ''; -print ''; -print ''; - +print ''; +print ''; +print ''; print ''; print ''; -print ''; -print ''; +print ''; +print ''; foreach ($TCurrency as &$currency) { @@ -338,8 +327,7 @@ foreach ($TCurrency as &$currency) print ''; print ''; - print ''; - print ''; } print '
'.$form->textwithpicto($langs->trans("CurrenciesUsed"), $langs->transnoentitiesnoconv("CurrenciesUsed_help_to_add")).' '.$langs->trans("Rate").''.$langs->trans("Rate").'
'.$form->selectCurrency('', 'code').''; print ''; print ''; -print ''.$form->selectCurrency('', 'code').' '; print ' '; print ''; -print '
'.$conf->currency.$form->textwithpicto(' ', $langs->trans("BaseCurrency")).' 1'; -print '
1
'.$currency->code.' - '.$currency->name.' '; + print ''; print '
'; print ''; print ''; @@ -349,13 +337,11 @@ foreach ($TCurrency as &$currency) print ' '; print ''; print '
'; - print '
'; - - +print '
'; print '