<?php
/**********************************************************************
***********************************************************************/
$page_security = 'SA_SUPP_TRANS_INQ';

	$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/ui.inc");

include_once($path_to_root . "/purchasing/includes/db/purchasing_inquiry_db.inc");
include_once($path_to_root . "/purchasing/includes/ui/supplier_balances_ui.inc");
include_once($path_to_root . "/includes/ui.inc");



$js = '';

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

if (user_use_date_picker()) {
	$js .= get_js_date_picker();
}

if (!@$_GET['popup'])
	page(_($help_context = "Supplier Balances"), @$_GET['popup'], false, "", $js);

simple_page_mode(true);

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


global $Ajax;


start_form();

display_supplier_balances_filtering_criteria();

$Ajax->activate('doc_tbl');

div_start('doc_tbl');

br(1);

//display_customer_opening_balance($_POST['customer_id'], $_POST['from_date']);

br(1);

display_supplier_balances($_POST['supplier_id'], $_POST['from_date'], $_POST['to_date'], $_POST['suppess_zeros']);

div_end();
//-----------------------------------------------------------------------------------




end_form();

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

end_page();

?>
