Added company switch for placing company logo on certain views.
[fa-stable.git] / gl / view / gl_trans_view.php
index 38ba7f265885c9b291f13f7b7631572dbea35ea9..b9afd240e223a25103840e822b297d2e7ed57d7b 100644 (file)
@@ -29,14 +29,17 @@ if (!isset($_GET['type_id']) || !isset($_GET['trans_no']))
 
 function display_gl_heading($myrow)
 {
-       global $systypes_array;
-
+       global $systypes_array, $SysPrefs;
+       
+       if (!empty($SysPrefs->prefs['company_logo_on_views']))
+               company_logo_on_view();
+       
        $trans_name = $systypes_array[$_GET['type_id']];
        $journal = $_GET['type_id'] == ST_JOURNAL;
 
     start_table(TABLESTYLE, "width='95%'");
     $th = array(_("General Ledger Transaction Details"), _("Reference"),
-       _("Transaction Date"), _("Journal #"));
+       _("Transaction Date"), _("GL #"));
 
        if ($_GET['type_id'] == ST_JOURNAL)
                array_insert($th, 3, array(_("Document Date"), _("Event Date")));
@@ -59,8 +62,8 @@ function display_gl_heading($myrow)
        if ($journal)
        {
                $header = get_journal($myrow['type'], $_GET['trans_no']);
-               label_cell(sql2date($header["doc_date"]), "align='center'");
-               label_cell(sql2date($header["event_date"]), "align='center'");
+               label_cell($header["doc_date"] == '0000-00-00' ? '-' : sql2date($header["doc_date"]), "align='center'");
+               label_cell($header["event_date"] == '0000-00-00' ? '-' : sql2date($header["event_date"]), "align='center'");
        } else
                label_cell(get_counterparty_name($_GET['type_id'],$_GET['trans_no']));
        label_cell( get_journal_number($myrow['type'], $_GET['trans_no']), "align='center'");
@@ -94,7 +97,7 @@ $dim = get_company_pref('use_dimension');
 if ($dim == 2)
        $th = array(_("Journal Date"), _("Account Code"), _("Account Name"), _("Dimension")." 1", _("Dimension")." 2",
                _("Debit"), _("Credit"), _("Memo"));
-else if ($dim == 1)
+elseif ($dim == 1)
        $th = array(_("Journal Date"), _("Account Code"), _("Account Name"), _("Dimension"),
                _("Debit"), _("Credit"), _("Memo"));
 else