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

$page_security = 'SA_ASSETTRANSVIEW';
$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/data_checks.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/finance/includes/db/letters_of_credit_db.inc");
include_once($path_to_root . "/finance/includes/db/letters_of_credit_inquiry_db.inc");

$js = "";
if ($SysPrefs->use_popup_windows)
	$js .= get_js_open_window(800, 500);
page(_($help_context = "View Letters of Credit"), true, false, "", $js);

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

//$woid = 0;

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

display_heading("Letter of Credit No : " . $lc_id);

//br(1);

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

$myrow = view_letters_of_credit($lc_id);
start_row();

label_cells(_("Reference"), $myrow['name'], "class='tableheader2'");
end_row();
label_cells(_("Description"), $myrow['description'], "class='tableheader2'");
end_row();
label_cells(_("Beneficiary"), $myrow['supp_name'], "class='tableheader2'");
end_row();
label_cells(_("Credit Facility"), $myrow['credit_facility_name'], "class='tableheader2'");
end_row();
label_cells(_("Bank Account"), $myrow['bank_account_name'], "class='tableheader2'");
end_row();
label_cells(_("Total Loan"), $myrow['lc_amount'], "class='tableheader2'");
end_row();
label_cells(_("Bank Charge"), $myrow['bank_charge'], "class='tableheader2'");
end_row();
label_cells(_("Start Date"), sql2date($myrow['start_date']), "class='tableheader2'");
end_row();
label_cells(_("Expiry Date"), sql2date($myrow['expiry_date']), "class='tableheader2'");
end_row();
label_cells(_("Payable Type"), $myrow['payable_type_name'], "class='tableheader2'");
end_row();
label_cells(_("Payable No of Days"), $myrow['payable_no_of_days'], "class='tableheader2'");
end_row();
label_cells(_("Delivery Type"), $myrow['delivery_type_name'], "class='tableheader2'");
end_row();
label_cells(_("On Hold"), $myrow['inactive'], "class='tableheader2'");
end_row();
label_cells(_("Expired"), $myrow['expired'], "class='tableheader2'");
end_row();


end_page(true, false, false, ST_LETTERS_OF_CREDIT, $lc_id);


?>
