Added 'View Attachments' if any in all popup view windows
[fa-stable.git] / gl / view / bank_transfer_view.php
index c0a25e2786df5205cec1923d44cb1447139bbccb..a2e0da4b614018df5d90e8bf6eb1abdfaa828e66 100644 (file)
@@ -1,11 +1,20 @@
 <?php
-
-$page_security = 1;
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
+$page_security = 'SA_BANKTRANSVIEW';
 $path_to_root="../..";
 
 include($path_to_root . "/includes/session.inc");
 
-page(_("View Bank Transfer"), true);
+page(_($help_context = "View Bank Transfer"), true);
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/ui.inc");
@@ -16,10 +25,10 @@ if (isset($_GET["trans_no"])){
        $trans_no = $_GET["trans_no"];
 }
 
-$result = get_bank_trans(systypes::bank_transfer(), $trans_no);
+$result = get_bank_trans(ST_BANKTRANSFER, $trans_no);
 
 if (db_num_rows($result) != 2)
-       display_db_error("Bank transfer does not contain two records", $sql);
+       display_db_error("Bank transfer does not contain two records");
 
 $trans1 = db_fetch($result);
 $trans2 = db_fetch($result);
@@ -49,7 +58,7 @@ if ($from_trans['bank_curr_code'] != $to_trans['bank_curr_code'])
        $show_both_amounts = true;
 }
 
-display_heading(systypes::name(systypes::bank_transfer()) . " #$trans_no");
+display_heading($systypes_array[ST_BANKTRANSFER] . " #$trans_no");
 
 echo "<br>";
 start_table("$table_style width=80%");
@@ -72,14 +81,15 @@ if ($show_both_amounts)
 end_row();
 start_row();
 label_cells(_("Date"), sql2date($from_trans['trans_date']), "class='tableheader2'");
-label_cells(_("Transfer Type"), $from_trans['BankTransType'], "class='tableheader2'");
+label_cells(_("Transfer Type"), $bank_transfer_types[$from_trans['account_type']],
+        "class='tableheader2'");
 label_cells(_("Reference"), $from_trans['ref'], "class='tableheader2'");
 end_row();
-comments_display_row(systypes::bank_transfer(), $trans_no);
+comments_display_row(ST_BANKTRANSFER, $trans_no);
 
 end_table(1);
 
-is_voided_display(systypes::bank_transfer(), $trans_no, _("This transfer has been voided."));
+is_voided_display(ST_BANKTRANSFER, $trans_no, _("This transfer has been voided."));
 
-end_page(true);
+end_page(true, false, false, ST_BANKTRANSFER, $trans_no);
 ?>
\ No newline at end of file