<?php
/**********************************************************************
***********************************************************************/
$page_security = 'SA_PETTYCASH_TRANSVIEW';
$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 . "/includes/ui.inc");
include_once($path_to_root . "/petty_cash/includes/db/project_float_inquiry_db.inc");
include_once($path_to_root . "/includes/db/group_companies_db.inc");
include_once($path_to_root . "/includes/common_functions.inc");

        
$js = "";
if ($SysPrefs->use_popup_windows)
	$js .= get_js_open_window(800, 500);
page(_($help_context = "View Project Float Entry"), true, false, "", $js);

//-------------------------------------------------------------------------------------------------
$woid = 0;
if ($_GET['trans_no'] != "")
{
	$id = $_GET['trans_no'];
}

global $approval_statuses;

display_heading("Project Float Entry No: " . $id);
br();
$myrow = view_project_float_adjustment($id);

start_table(TABLESTYLE2, "width=50%");

start_row();

label_cells(_("Reference"), $myrow['reference'], "class='tableheader2'");
end_row();
label_cells(_("Project"), $myrow['project_description'], "class='tableheader2'");
end_row();
$group_company_name = get_group_company_name($myrow['company_code']);
label_cells(_("Company"), $group_company_name, "class='tableheader2'");
end_row();
$employee_name = get_group_company_employee_formatted_long_name($myrow['company_code'], $myrow['employee_code']);
label_cells(_("Employee"), $employee_name, "class='tableheader2'");
end_row();
label_cells(_("Date"), sql2date($myrow['tran_date']), "class='tableheader2'");
end_row();
label_cells(_("Type"), ($myrow['is_return'] == 1?"Deduct from float": "Add to float"), "class='tableheader2'");
end_row();
label_cells(_("Amount"), number_format($myrow['amount'],2), "class='tableheader2'");
end_row();
label_cells(_("Comment"), $myrow['comment'], "class='tableheader2'");
end_row();

label_cells(_("Created By"), $myrow['user_name'], "class='tableheader2'");
end_row();

end_row();



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

?>
