diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php
index 7995b2957af..77686afc42d 100644
--- a/htdocs/admin/multicurrency.php
+++ b/htdocs/admin/multicurrency.php
@@ -61,9 +61,10 @@ if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg))
}
}
-if ($action == 'setobject')
+if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg))
{
- if (dolibarr_set_const($db, GETPOST('value', 'alpha'), GETPOST('status', 'alpha'),'chaine',0,'',$conf->entity) > 0)
+ $code=$reg[1];
+ if (dolibarr_del_const($db, $code, 0) > 0)
{
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
@@ -186,51 +187,36 @@ print '';
print '
';
print '| '.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE").' | ';
print '';
-if (!empty($conf->global->MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE))
-{
- print '';
- print img_picto($langs->trans("Activated"),'switch_on');
+if ($conf->use_javascript_ajax) {
+ print ajax_constantonoff('MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE');
+} else {
+ $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
+ print $form->selectarray("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE", $arrval, $conf->global->MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE);
}
-else
-{
- print '';
- print img_picto($langs->trans("Disabled"),'switch_off');
-}
-print '';
print ' |
';
print '';
print '| '.$langs->transnoentitiesnoconv("multicurrency_useOriginTx").' | ';
print '';
-if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX))
-{
- print '';
- print img_picto($langs->trans("Activated"),'switch_on');
+if ($conf->use_javascript_ajax) {
+ print ajax_constantonoff('MULTICURRENCY_USE_ORIGIN_TX');
+} else {
+ $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
+ print $form->selectarray("MULTICURRENCY_USE_ORIGIN_TX", $arrval, $conf->global->MULTICURRENCY_USE_ORIGIN_TX);
}
-else
-{
- print '';
- print img_picto($langs->trans("Disabled"),'switch_off');
-}
-print '';
print ' |
';
//Online payment with currency on document
print '';
print '| '.$langs->transnoentitiesnoconv("multicurrency_useCurrency").' | ';
print '';
-if (!empty($conf->global->MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT))
-{
- print '';
- print img_picto($langs->trans("Activated"),'switch_on');
+if ($conf->use_javascript_ajax) {
+ print ajax_constantonoff('MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT');
+} else {
+ $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
+ print $form->selectarray("MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT", $arrval, $conf->global->MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT);
}
-else
-{
- print '';
- print img_picto($langs->trans("Disabled"),'switch_off');
-}
-print '';
print ' |
';
/* TODO uncomment when the functionality will integrated