X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_view.inc;h=186c7a1414d70b1f6ab7924e2468dcd1939bf1f2;hb=8110c7a16ca343e6a48658db2ab95a573e22118f;hp=98af52cc0971042c18765dddfa1def692e97c9ec;hpb=e91772a2716825a6aeb358d1defba47d5f3892c1;p=fa-stable.git
diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc
index 98af52cc..186c7a14 100644
--- a/includes/ui/ui_view.inc
+++ b/includes/ui/ui_view.inc
@@ -117,8 +117,6 @@ function get_banking_trans_view_str($type, $trans_no, $label="",
$viewer = "gl_payment_view.php";
elseif ($type == 2)
$viewer = "gl_deposit_view.php";
- elseif ($type == 0)
- return $label;
else
return null;
@@ -177,7 +175,23 @@ 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;
+
+ if ($label == "")
+ $label = $trans_no;
+
+ return viewer_link($label, $viewer, $class, $id, $icon);
+}
+/*
+ Journal entry or cost update postings link
+*/
+function get_journal_trans_view_str($type, $trans_no, $label="", $icon=false,
+ $class='', $id='')
+{
+ if ($type == 0 || $type == 35)
+ $viewer = "gl/view/gl_trans_view.php?type_id=$type&trans_no=$trans_no";
else
return null;
@@ -216,6 +230,10 @@ function get_trans_view_str($type, $trans_no, $label="", $icon=false,
if ($view_str != null)
return $view_str;
+ $view_str = get_journal_trans_view_str($type, $trans_no, $label, $icon, $class, $id);
+ if ($view_str != null)
+ return $view_str;
+
return null;
}
@@ -586,16 +604,12 @@ function display_quick_entries(&$cart, $id, $base, $type, $descr='')
function get_js_open_window($width, $height)
{
- $js = "\n\n";
+ . "}\n";
return $js;
}
@@ -613,8 +627,9 @@ function set_focus($name, $form_no=0) {
// Returns unique name if $name=null
//
function default_focus($name=null, $form_no=0) {
+ static $next;
if ($name==null)
- $name = uniqid('_el');
+ $name = uniqid('_el',true);
if (!isset($_POST['_focus'])) {
set_focus($name);
}
@@ -623,8 +638,7 @@ function default_focus($name=null, $form_no=0) {
function get_js_png_fix()
{
- $js = "\n";
+ . "}\n";
return $js;
}