Removed bank payment print links (not implemented yet).
[fa-stable.git] / gl / gl_journal.php
index 10cde058c7b76dd714ceeb38c54d41e081e5405d..bc3e15e963286245665aec8bcee31404c28b80cf 100644 (file)
@@ -118,10 +118,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;
@@ -264,8 +264,8 @@ function handle_update_item()
        else
                $amount = -input_num('AmountCredit');
 
-       $_SESSION['journal_items']->update_gl_item($_POST['Index'], $_POST['dimension_id'],
-               $_POST['dimension2_id'], $amount, $_POST['LineMemo']);
+       $_SESSION['journal_items']->update_gl_item($_POST['Index'], $_POST['code_id'], 
+           $_POST['dimension_id'], $_POST['dimension2_id'], $amount, $_POST['LineMemo']);
     }
        line_start_focus();
 }
@@ -321,7 +321,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']);