X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fgl_journal.php;h=3ce28e3aa4c91c8512fe0567ac202a2b42a7a4a7;hb=8f7ac519b7aaf8ec219862597e878d3a28316ac6;hp=ee4f05932e310c42073e60d4ebfb8c946539d9b3;hpb=70b1677c6f437b3ee9cee17147bd8b40591adbe6;p=fa-stable.git diff --git a/gl/gl_journal.php b/gl/gl_journal.php index ee4f0593..3ce28e3a 100644 --- a/gl/gl_journal.php +++ b/gl/gl_journal.php @@ -55,7 +55,8 @@ if (isset($_GET['AddedID'])) display_note(get_gl_view_str($trans_type, $trans_no, _("&View this Journal Entry"))); - hyperlink_no_params($_SERVER['PHP_SELF'], _("Enter &Another Journal Entry")); + reset_focus(); + hyperlink_params($_SERVER['PHP_SELF'], _("Entry &New Journal Entry"), "NewJournal=Yes"); display_footer_exit(); } elseif (isset($_GET['UpdatedID'])) @@ -184,7 +185,7 @@ if (isset($_POST['Process'])) $cart->memo_ = $_POST['memo_']; $cart->tran_date = $_POST['date_']; - $trans_no = write_journal_entries($cart); + $trans_no = write_journal_entries($cart, check_value('Reverse')); $cart->clear_items(); new_doc_date($_POST['date_']); @@ -231,7 +232,12 @@ function check_item_data() set_focus('AmountCredit'); return false; } - + + if (!is_tax_gl_unique(get_post('code_id'))) { + display_error(_("Cannot post to GL account used by more than one tax type.")); + set_focus('code_id'); + return false; + } if ($_SESSION["wa_current_user"]->access != 2 && is_bank_account($_POST['code_id'])) {