*** empty log message ***
[fa-stable.git] / inventory / view / view_transfer.php
1 <?php
2
3 $page_security = 1;
4 $path_to_root="../..";
5
6 include($path_to_root . "/includes/session.inc");
7
8 page(_("View Inventory Transfer"), true);
9
10 include_once($path_to_root . "/includes/date_functions.inc");
11 include_once($path_to_root . "/includes/ui.inc");
12 include_once($path_to_root . "/gl/includes/gl_db.inc");
13
14 if (isset($_GET["trans_no"]))
15 {
16         $trans_no = $_GET["trans_no"];
17 }
18
19 $transfer_items = get_stock_transfer($trans_no);
20
21 $from_trans = $transfer_items[0];
22 $to_trans = $transfer_items[1];
23
24 display_heading(systypes::name(systypes::location_transfer()) . " #$trans_no");
25
26 echo "<br>";
27 start_table("$table_style2 width=90%");
28
29 start_row();
30 label_cells(_("Item"), $from_trans['stock_id'] . " - " . $from_trans['description'], "class='tableheader2'");
31 label_cells(_("From Location"), $from_trans['location_name'], "class='tableheader2'");
32 label_cells(_("To Location"), $to_trans['location_name'], "class='tableheader2'");
33 end_row();
34 start_row();
35 label_cells(_("Reference"), $from_trans['reference'], "class='tableheader2'");
36 $adjustment_type = get_movement_type($from_trans['person_id']) ;
37 label_cells(_("Adjustment Type"), $adjustment_type['name'], "class='tableheader2'");
38 label_cells(_("Date"), sql2date($from_trans['tran_date']), "class='tableheader2'");
39 end_row();
40
41 comments_display_row(systypes::location_transfer(), $trans_no);
42
43 end_table(1);
44
45 echo "<br>";
46 start_table("$table_style width=90%");
47
48 $th = array(_("Item"), _("Description"), _("Quantity"), _("Units"));
49 table_header($th);
50 $transfer_items = get_stock_moves(systypes::location_transfer(), $trans_no);
51
52 while ($item = db_fetch($transfer_items))       
53 {
54         if ($item['loc_code'] == $to_trans['loc_code']) 
55         {
56         alt_table_row_color($k);
57
58         label_cell($item['stock_id']);
59         label_cell($item['description']);
60         qty_cell($item['qty']);
61         label_cell($item['units']);
62         end_row();;
63         }
64 }
65
66 end_table(1);
67
68 is_voided_display(systypes::location_transfer(), $trans_no, _("This transfer has been voided."));
69
70 end_page(true);
71 ?>