<?php
/**********************************************************************
***********************************************************************/
$page_security = 'SA_MANUFTRANSVIEW';
$path_to_root = "../..";

include_once($path_to_root . "/includes/session.inc");

include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/inventory.inc");
include_once($path_to_root . "/includes/data_checks.inc");

include_once($path_to_root . "/manufacturing/includes/manufacturing_db.inc");
include_once($path_to_root . "/manufacturing/includes/db/manufacturing_requirements_db.inc");
include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
$js = "";
if ($SysPrefs->use_popup_windows)
	$js .= get_js_open_window(800, 500);
page(_($help_context = "View Manufacturing Requirement"), true, false, "", $js);

//-------------------------------------------------------------------------------------------------
$woid = 0;
if ($_GET['trans_no'] != "")
{
	$manuf_reqr_id = $_GET['trans_no'];
}
function display_row($name, $value)
{
    start_row();        
    label_cells($name, $value, "width=100px class='tableheader2'", "width=100px");
    end_row();
    
}
display_heading('Manufacturing Requirement' . " # " . $manuf_reqr_id);

br(2);


start_table(TABLESTYLE, "width=90%");

display_heading('Manufacturing Requirements');
//table_header($th);
$myrow = view_manuf_requirement($manuf_reqr_id);

display_row("Id:",$myrow["id"]);
display_row("Project :",$myrow["project"]);
display_row("Type",$myrow["source_type"]);
display_row("Order No",$myrow["order_no"]);
display_row("Item code",$myrow["stk_code"]);
display_row("Item Description",$myrow["description"]);
display_row("Qty",$myrow["tran_unit_quantity"]);
display_row("Units",$myrow["tran_unit_name"]);
display_row("Required Date",sql2date($myrow["required_date"]));    
display_row("Unit",$myrow["manufacturing_unit"]);
display_row("Qty",$myrow["manufacturing_unit_qty"]);
display_row("Manuf. End Date",sql2date($myrow["required_by"]));
display_row("Location",$myrow["loc_code"]);

end_row();

end_table(1);
//
//is_voided_display(ST_LOCTRANSFER, $trans_no, _("This transfer has been voided."));

end_page(true, false, false, ST_WORKORDER, $woid);

?>
