Fixed access to payment when deposits are disabled.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 30 Sep 2009 22:20:12 +0000 (22:20 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 30 Sep 2009 22:20:12 +0000 (22:20 +0000)
gl/gl_bank.php

index 1e5718b514060c1854ebef6e3aabab340c2f6a4f..0458b15213402f25fe6d3d400290075a8cf6ea03 100644 (file)
@@ -9,10 +9,12 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = isset($_GET['NewPayment']) ? 'SA_PAYMENT' : 'SA_DEPOSIT';
 $path_to_root = "..";
 include_once($path_to_root . "/includes/ui/items_cart.inc");
 include_once($path_to_root . "/includes/session.inc");
+$page_security = isset($_GET['NewPayment']) || 
+       @($_SESSION['pay_items']->trans_type==ST_BANKPAYMENT)
+ ? 'SA_PAYMENT' : 'SA_DEPOSIT';
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/data_checks.inc");