Merged changes up to 2.3.16 into unstable
[fa-stable.git] / gl / gl_bank.php
index 17547fb2114914a6e9ecf8d6b581b560f20ea1c2..3cf2c8d2d275c21f93a90dca4fc842420b9befe5 100644 (file)
@@ -48,6 +48,9 @@ page($_SESSION['page_title'], false, false, '', $js);
 //-----------------------------------------------------------------------------------------------
 check_db_has_bank_accounts(_("There are no bank accounts defined in the system."));
 
+if (isset($_GET['ModifyDeposit']) || isset($_GET['ModifyPayment']))
+       check_is_editable($_SESSION['pay_items']->trans_type, $_SESSION['pay_items']->order_id);
+
 //----------------------------------------------------------------------------------------
 if (list_updated('PersonDetailID')) {
        $br = get_branch(get_post('PersonDetailID'));
@@ -194,7 +197,7 @@ function create_cart($type, $trans_no)
                // apply exchange rate
                foreach($cart->gl_items as $line_no => $line)
                        $cart->gl_items[$line_no]->amount *= $ex_rate;
-               
+
        } else {
                $cart->reference = $Refs->get_next($cart->trans_type);
                $cart->tran_date = new_doc_date();
@@ -264,7 +267,7 @@ if (isset($_POST['Process']))
        }
        elseif (!is_date_in_fiscalyear($_POST['date_']))
        {
-               display_error(_("The entered date is not in fiscal year."));
+               display_error(_("The entered date is out of fiscal year or is closed for further data entry."));
                set_focus('date_');
                $input_error = 1;
        } 
@@ -296,7 +299,7 @@ if (isset($_POST['Process']))
                $_SESSION['pay_items']->trans_type, $_SESSION['pay_items']->order_id, $_POST['bank_account'],
                $_SESSION['pay_items'], $_POST['date_'],
                $_POST['PayType'], $_POST['person_id'], get_post('PersonDetailID'),
-               $_POST['ref'], $_POST['memo_'], true);
+               $_POST['ref'], $_POST['memo_'], false);
 
        $trans_type = $trans[0];
        $trans_no = $trans[1];