From 44b44b1d0c12d778583c2a556de002ddedd19d4c Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Fri, 8 May 2009 10:25:13 +0000 Subject: [PATCH] Added journal entry view link. --- includes/ui/ui_view.inc | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc index e2265f9d..f2f36f53 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; @@ -186,6 +184,22 @@ function get_dimensions_trans_view_str($type, $trans_no, $label="", $icon=false, 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; + + if ($label == "") + $label = $trans_no; + + return viewer_link($label, $viewer, $class, $id, $icon); +} //-------------------------------------------------------------------------------------- @@ -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; } -- 2.30.2