2 /**********************************************************************
3 Copyright (C) FrontAccounting, LLC.
4 Released under the terms of the GNU General Public License, GPL,
5 as published by the Free Software Foundation, either version 3
6 of the License, or (at your option) any later version.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ***********************************************************************/
12 $page_security = 'SA_ITEMSTRANSVIEW';
13 $path_to_root = "../..";
15 include($path_to_root . "/includes/session.inc");
17 page(_($help_context = "View Inventory Transfer"), true);
19 include_once($path_to_root . "/includes/date_functions.inc");
20 include_once($path_to_root . "/includes/ui.inc");
21 include_once($path_to_root . "/gl/includes/gl_db.inc");
23 if (isset($_GET["trans_no"]))
25 $trans_no = $_GET["trans_no"];
28 $trans = get_stock_transfer($trans_no);
30 display_heading($systypes_array[ST_LOCTRANSFER] . " #$trans_no");
33 start_table(TABLESTYLE2, "width='90%'");
36 label_cells(_("Reference"), $trans['reference'], "class='tableheader2'");
37 label_cells(_("Date"), sql2date($trans['tran_date']), "class='tableheader2'");
40 label_cells(_("From Location"), $trans['from_name'], "class='tableheader2'");
41 label_cells(_("To Location"), $trans['to_name'], "class='tableheader2'");
44 comments_display_row(ST_LOCTRANSFER, $trans_no);
48 start_table(TABLESTYLE, "width='90%'");
50 $th = array(_("Item Code"), _("Description"), _("Quantity"), _("Units"));
52 $transfer_items = get_stock_moves(ST_LOCTRANSFER, $trans_no);
54 while ($item = db_fetch($transfer_items))
56 if ($item['loc_code'] == $trans['to_loc'])
58 alt_table_row_color($k);
60 label_cell($item['stock_id']);
61 label_cell($item['description']);
62 qty_cell($item['qty'], false, get_qty_dec($item['stock_id']));
63 label_cell($item['units']);
70 is_voided_display(ST_LOCTRANSFER, $trans_no, _("This transfer has been voided."));
72 end_page(true, false, false, ST_LOCTRANSFER, $trans_no);