diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 9843c6a4fb0..7995b2957af 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -61,10 +61,9 @@ if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) } } -if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) +if ($action == 'setobject') { - $code=$reg[1]; - if (dolibarr_del_const($db, $code, 0) > 0) + if (dolibarr_set_const($db, GETPOST('value', 'alpha'), GETPOST('status', 'alpha'),'chaine',0,'',$conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; @@ -181,30 +180,57 @@ dol_fiche_head($head, 'settings', $langs->trans("ModuleSetup"), -1, "multicurren print ''; print ''; print ''."\n"; -print ''."\n"; +print ''."\n"; print ''; print ''; print ''; -print ''; print ''; print ''; -print ''; + +//Online payment with currency on document +print ''; +print ''; +print ''; /* TODO uncomment when the functionality will integrated
'.$langs->trans("Parameters").''.$langs->trans("Value").''.$langs->trans("Status").'
'.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE").''; -print '
'; -print ''; -print ''; -print $form->selectyesno("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE",$conf->global->MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE,1); -print ''; -print '
'; +print '
'; +if (!empty($conf->global->MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE)) +{ + print ''; + print img_picto($langs->trans("Activated"),'switch_on'); +} +else +{ + print ''; + print img_picto($langs->trans("Disabled"),'switch_off'); +} +print ''; print '
'.$langs->transnoentitiesnoconv("multicurrency_useOriginTx").''; -print '
'; -print ''; -print ''; -print $form->selectyesno("MULTICURRENCY_USE_ORIGIN_TX",$conf->global->MULTICURRENCY_USE_ORIGIN_TX,1); -print ''; -print '
'; +print '
'; +if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX)) +{ + print ''; + print img_picto($langs->trans("Activated"),'switch_on'); +} +else +{ + print ''; + print img_picto($langs->trans("Disabled"),'switch_off'); +} +print ''; +print '
'.$langs->transnoentitiesnoconv("multicurrency_useCurrency").''; +if (!empty($conf->global->MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT)) +{ + print ''; + print img_picto($langs->trans("Activated"),'switch_on'); +} +else +{ + print ''; + print img_picto($langs->trans("Disabled"),'switch_off'); +} +print ''; print '