Feature 5388: Print Invoices (documents) list gets too long. Fixed by default 180...
[fa-stable.git] / gl / view / gl_trans_view.php
index 7e37d0a6e188ccf404e3d6419e02628ed7641c13..75ee82a3f66ff498a482c16103f08958a7652b1a 100644 (file)
@@ -29,14 +29,14 @@ if (!isset($_GET['type_id']) || !isset($_GET['trans_no']))
 
 function display_gl_heading($myrow)
 {
-       global $systypes_array, $type_shortcuts;
+       global $systypes_array;
 
        $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")));
@@ -50,7 +50,7 @@ function display_gl_heading($myrow)
     table_header($th); 
     start_row();       
     label_cell("$trans_name #" . $_GET['trans_no']);
-    label_cell($type_shortcuts[$myrow['type']].' '.$myrow["reference"], "align='center'");
+    label_cell($myrow["reference"], "align='center'");
        if($myrow['supp_reference'])
        {
        label_cell($myrow["supp_reference"], "align='center'");
@@ -59,8 +59,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 +94,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