<?php
/**********************************************************************
***********************************************************************/

$page_security = 'SA_ASSET_TRANSFER_INQ';
if (!@$_GET['popup'])
	$path_to_root = "../..";
else	
	$path_to_root = "..";
include_once($path_to_root . "/includes/db_pager.inc");
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/assets/includes/db/asset_transfer_inquiry_db.inc");
include_once($path_to_root . "/assets/includes/ui/asset_transfer_inquiry_ui.inc");
include_once($path_to_root . "/includes/ui/ui_lists_group_companies.inc");
include_once($path_to_root . "/includes/db/group_companies_db.inc");
include_once($path_to_root . "/assets/includes/db/asset_locations_db.inc"); 

$js = '';

if($use_popup_windows){
    $js .= get_js_open_window(1000, 500);
}
if($use_date_picker){
    $js .= get_js_date_picker();
}

global $systypes_array;
page($help_context = $systypes_array[ST_ASSET_REQUISITION_TRANSFER]."s Inquiry", false, false, "", $js);

simple_page_mode(true);

global $Ajax;



//function _edit_link($row) {  
//    if ($row['approval_status'] != AS_COMPLETED) {
//        return pager_link(_("Asset Transfer Receipts"),"/assets/asset_transfer_receipts.php?ARTNo=".$row['id'], ICON_DOC);  
//    } else {
//        return '';
//    }
//}


asset_transfer_inquiry_filtering_parameters();

//---------------------------------------------------------------------------------------------

display_asset_transfer_inquiry(ST_ASSET_REQUISITION_TRANSFER, "outstanding");


//$from_date = date2sql($_POST['from_date']);
//$to_date = date2sql($_POST['to_date']);
//
//$from_location = "";
//if(isset($_POST['from_location'])){
//  $from_location = $_POST['from_location'];
//}
//$to_location = "";
//if(isset($_POST['to_location'])){
//  $to_location = $_POST['to_location'];
//}
//
//$sql = get_sql_for_asset_transfer_inquiry($trans_no, $from_date, $to_date, $from_location, $to_location, '', ST_ASSET_REQUISITION_TRANSFER);    
//
//$cols = array(
//            _("Date")=>array('fun' => '_tran_date', 'align' => 'center'),    
//            _("Type")=> array('fun' => '_type'),                           
//            _("#")=> array('fun' => '_type_no', 'align' => 'center'),                           
//            _("Source")=> array('fun' => '_request_no', 'align' => 'center'),                           
//            _("Reference")=> array('fun' => '_reference'),         
//            _("From Location")=> array('fun' => '_from_location'),                            
//            _("To Location")=> array('fun' => '_to_location'),          
//            _("Comment")=> array('fun' => '_comment'),
//            _("Status")=> array('fun' => '_status', 'align' => 'center'));
//
//    array_append($cols, array(array('insert' => true, 'fun' => '_requisition_transfer_link', 'align' => 'center')));
//
//$table =& new_db_pager('orders_tbl', $sql, $cols, null, null);
//$table->width = "99%";
//display_db_pager($table);

br();

if(!@$_GET['popup']){
    end_form();
    end_page();
}	

?>