$trans_no = $_GET["trans_no"]; } $transfer_items = get_stock_transfer($trans_no); $from_trans = $transfer_items[0]; $to_trans = $transfer_items[1]; display_heading($systypes_array[ST_LOCTRANSFER] . " #{$trans_no}"); echo "<br>"; start_table(TABLESTYLE2, "width=90%"); start_row(); label_cells(_("Item"), $from_trans['stock_id'] . " - " . $from_trans['description'], "class='tableheader2'"); label_cells(_("From Location"), $from_trans['location_name'], "class='tableheader2'"); label_cells(_("To Location"), $to_trans['location_name'], "class='tableheader2'"); end_row(); start_row(); label_cells(_("Reference"), $from_trans['reference'], "class='tableheader2'"); $adjustment_type = get_movement_type($from_trans['person_id']); label_cells(_("Adjustment Type"), $adjustment_type['name'], "class='tableheader2'"); label_cells(_("Date"), sql2date($from_trans['tran_date']), "class='tableheader2'"); end_row(); comments_display_row(ST_LOCTRANSFER, $trans_no); end_table(2); start_table(TABLESTYLE, "width=90%"); $th = array(_("Item"), _("Description"), _("Quantity"), _("Units")); table_header($th); $transfer_items = get_stock_moves(ST_LOCTRANSFER, $trans_no); $k = 0; while ($item = db_fetch($transfer_items)) { if ($item['loc_code'] == $to_trans['loc_code']) { alt_table_row_color($k); label_cell($item['stock_id']); label_cell($item['description']);
if ($myrow["type"] == 10 || $myrow["type"] == 11) { $cust_row = get_customer_details_from_trans($myrow["type"], $myrow["trans_no"]); if (strlen($cust_row['name']) > 0) { $person = $cust_row['name'] . " (" . $cust_row['br_name'] . ")"; } } elseif ($myrow["type"] == 25) { // get the supplier name $sql = "SELECT supp_name FROM suppliers WHERE supplier_id = '" . $myrow["person_id"] . "'"; $supp_result = db_query($sql, "check failed"); $supp_row = db_fetch($supp_result); if (strlen($supp_row['supp_name']) > 0) { $person = $supp_row['supp_name']; } } elseif ($myrow["type"] == systypes::location_transfer() || $myrow["type"] == systypes::inventory_adjustment()) { // get the adjustment type $movement_type = get_movement_type($myrow["person_id"]); $person = $movement_type["name"]; } elseif ($myrow["type"] == systypes::work_order() || $myrow["type"] == 28 || $myrow["type"] == 29) { $person = ""; } label_cell($person); label_cell($myrow["qty"] >= 0 ? $quantity_formatted : "", "nowrap align=right"); label_cell($myrow["qty"] < 0 ? $quantity_formatted : "", "nowrap align=right"); label_cell(number_format2($after_qty, user_qty_dec()), "nowrap align=right"); end_row(); $j++; if ($j == 12) { $j = 1; table_header($th); } //end of page full new headings if
include $path_to_root . "/includes/session.inc"; page(_($help_context = "View Inventory Adjustment"), true); include_once $path_to_root . "/includes/date_functions.inc"; include_once $path_to_root . "/includes/ui.inc"; include_once $path_to_root . "/inventory/includes/inventory_db.inc"; if (isset($_GET["trans_no"])) { $trans_no = $_GET["trans_no"]; } display_heading($systypes_array[ST_INVADJUST] . " #{$trans_no}"); br(1); $adjustment_items = get_stock_adjustment_items($trans_no); $k = 0; $header_shown = false; while ($adjustment = db_fetch($adjustment_items)) { if (!$header_shown) { $adjustment_type = get_movement_type($adjustment['person_id']); start_table(TABLESTYLE2, "width='90%'"); start_row(); label_cells(_("At Location"), $adjustment['location_name'], "class='tableheader2'"); label_cells(_("Reference"), $adjustment['reference'], "class='tableheader2'", "colspan=6"); label_cells(_("Date"), sql2date($adjustment['tran_date']), "class='tableheader2'"); label_cells(_("Adjustment Type"), $adjustment_type['name'], "class='tableheader2'"); end_row(); comments_display_row(ST_INVADJUST, $trans_no); end_table(); $header_shown = true; echo "<br>"; start_table(TABLESTYLE, "width='90%'"); $th = array(_("Item"), _("Description"), _("Quantity"), _("Units"), _("Unit Cost")); table_header($th); }
} //----------------------------------------------------------------------------------- $result = get_all_movement_type(); start_table("{$table_style} width=30%"); $th = array(tr("Description"), "", ""); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["name"]); edit_link_cell("selected_id=" . $myrow["id"]); delete_link_cell("selected_id=" . $myrow["id"] . "&delete=1"); end_row(); } end_table(); //----------------------------------------------------------------------------------- hyperlink_no_params($_SERVER['PHP_SELF'], tr("New Inventory Movement Type")); start_form(); start_table(); if (isset($selected_id)) { //editing an existing status code $myrow = get_movement_type($selected_id); $_POST['name'] = $myrow["name"]; hidden('selected_id', $selected_id); } text_row(tr("Description:"), 'name', null, 50, 50); end_table(1); submit_add_or_update_center(!isset($selected_id)); end_form(); //------------------------------------------------------------------------------------ end_page();