Delete fiscal year buttons prepared for final js confirmation dialog.
[fa-stable.git] / includes / ui / ui_view.inc
index f2f36f534eb2d8bd77e526da94438ba6289366d3..99111d9d03efb9b560bcdf7cf3be23c1a35a529b 100644 (file)
@@ -175,7 +175,7 @@ function get_dimensions_trans_view_str($type, $trans_no, $label="", $icon=false,
        $class='', $id='')
 {
        if ($type == 40)
-               $viewer = "dimensions/view_dimension.php?trans_no=$trans_no";
+               $viewer = "dimensions/view/view_dimension.php?trans_no=$trans_no";
        else
                return null;
 
@@ -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()
 {