Stable branch merged up to 2.3.21
[fa-stable.git] / gl / gl_bank.php
index 788cf83b26595d16e943bfe1c1e7613f5ef36233..14a8518d1ecf81b00a2f37ebdbfa4c99f3dd641e 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'));
@@ -192,7 +195,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();
@@ -263,7 +266,7 @@ function check_trans()
        }
        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;
        }