Fixed Quote Valid Days in System and GL Setup, Setup tab.
[fa-stable.git] / gl / gl_journal.php
index d515b179b8825c7d7f1ae9478d38a7092ac67312..be1dc607c0c16a50c5055df236cfde030b1cfd83 100644 (file)
@@ -58,6 +58,8 @@ if (isset($_GET['AddedID']))
        reset_focus();
        hyperlink_params($_SERVER['PHP_SELF'], _("Enter &New Journal Entry"), "NewJournal=Yes");
 
+       hyperlink_params("$path_to_root/admin/attachments.php", _("Add an Attachment"), "filterType=$trans_type&trans_no=$trans_no");
+
        display_footer_exit();
 } elseif (isset($_GET['UpdatedID'])) 
 {
@@ -118,10 +120,10 @@ function create_cart($type=0, $trans_no=0)
        } else {
                $cart->reference = $Refs->get_next(0);
                $cart->tran_date = new_doc_date();
+               if (!is_date_in_fiscalyear($cart->tran_date))
+                       $cart->tran_date = end_fiscalyear();
                $_POST['ref_original'] = -1;
        }
-       if (!is_date_in_fiscalyear($cart->tran_date))
-               $cart->tran_date = end_fiscalyear();
 
        $_POST['memo_'] = $cart->memo_;
        $_POST['ref'] = $cart->reference;
@@ -321,7 +323,7 @@ start_form();
 
 display_order_header($_SESSION['journal_items']);
 
-start_table("$table_style2 width=90%", 10);
+start_table(TABLESTYLE2, "width=90%", 10);
 start_row();
 echo "<td>";
 display_gl_items(_("Rows"), $_SESSION['journal_items']);