<?php
/**********************************************************************
***********************************************************************/
$page_security = 'SA_SUPPTRANSVIEW';
$path_to_root = "../..";
include($path_to_root . "/purchasing/includes/po_class.inc");

include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/purchasing/includes/ui/purchasing_ui.inc");
include_once($path_to_root . "/purchasing/includes/db/purchase_requisitions_db.inc");
include_once($path_to_root . "/purchasing/includes/ui/view_pr_allocations_ui.inc");
include_once($path_to_root . "/includes/ui.inc");


$js = "";
if ($SysPrefs->use_popup_windows){
	$js .= get_js_open_window(900, 500);
}

page(_($help_context = "View Supplier Invoice Allocations"), true, false, "", $js);


if ($_GET['type'] != "")
{
	$type = $_GET['type'];
}
if ($_GET['trans_no'] != "")
{
	$trans_no = $_GET['trans_no'];
}

global $systypes_array;

$msg = "Allocations for ".$systypes_array[$type]." #".$trans_no;
display_heading($msg);

br(1);

$supp_trans = get_supp_trans($trans_no, $type);
$final_total = $supp_trans['ov_amount'] + $supp_trans['ov_gst'];
display_allocations_to(PT_SUPPLIER, $supp_trans['supplier_id'], $type, $trans_no, 
    ($final_total));


end_page(true, false, false, ST_PURCHORDER, $_GET['trans_no']);

?>
