X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_view.inc;h=99111d9d03efb9b560bcdf7cf3be23c1a35a529b;hb=90c08330ed36df13b13b7bf8577a70699acf85d3;hp=186c7a1414d70b1f6ab7924e2468dcd1939bf1f2;hpb=8110c7a16ca343e6a48658db2ab95a573e22118f;p=fa-stable.git diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc index 186c7a14..99111d9d 100644 --- a/includes/ui/ui_view.inc +++ b/includes/ui/ui_view.inc @@ -257,9 +257,12 @@ function exchange_rate_display($from_currency, $to_currency, $date_, $edit_rate= if ($date_ == Today()) { $rate = get_date_exchange_rate($currency, $date_); if (!$rate) { - $rate = get_ecb_rate($currency); - if ($rate) - add_exchange_rate($currency, $date_, $rate, $rate); + $row = get_currency($currency); + if ($row['auto_update']) { + $rate = retrieve_exrate($currency, $date_); + if ($rate) + add_exchange_rate($currency, $date_, $rate, $rate); + } } } if (!$rate) @@ -635,6 +638,13 @@ function default_focus($name=null, $form_no=0) { } return $name; } +/* + Reset focus to next control element (e.g. link). +*/ +function reset_focus() +{ + unset($_POST['_focus']); +} function get_js_png_fix() {