isLoggedIn())
{
header ("location: ../login.php");
exit();
}
if(isset($_GET['sale_id']))
{
$sale_id=$_GET['sale_id'];
$customer_id=$_GET['sale_customer_id'];
$sale_date=$_GET['sale_date'];
$temp_first_name=$dbf->idToField("$cfg_tableprefix".'customers','first_name',$customer_id);
$temp_last_name=$dbf->idToField("$cfg_tableprefix".'customers','last_name',$customer_id);
$sale_customer_name=$temp_first_name.' '.$temp_last_name;
}
$display=new display($dbf->conn,$cfg_theme,$cfg_currency_symbol,$lang);
$display->displayTitle("$lang->saleDetails");
$tableheaders=array("$lang->rowID","$lang->itemName","$lang->brand","$lang->category","$lang->supplier","$lang->quantityPurchased","$lang->unitPrice","$lang->totalItemCost");
$tablefields=array('id','item_id','brand_id','category_id','supplier_id','quantity_purchased','item_unit_price','item_total_cost');
$display->displayReportTable("$cfg_tableprefix",'sales_items',$tableheaders,$tablefields,'sale_id',"$sale_id",'','','id',"$sale_customer_name
$sale_date
Items in sale
");
?>