isLoggedIn())
{
header ("location: ../login.php");
exit();
}
$display=new display($dbf->conn,$cfg_theme,$cfg_currency_symbol,$lang);
$display->displayTitle("$cfg_company $lang->dateRangeReport");
if(isset($_POST['month1']))
{
$month1=$_POST['month1'];
$day1=$_POST['day1'];
$year1=$_POST['year1'];
$month2=$_POST['month2'];
$day2=$_POST['day2'];
$year2=$_POST['year2'];
$date1=date("$year1-$month1-$day1");
$date2=date("$year2-$month2-$day2");
}
$tableheaders=array("$lang->rowID","$lang->date","$lang->customer","$lang->itemsPurchased","$lang->paidWith","$lang->soldBy","$lang->saleSubTotal","$lang->saleTotalCost","$lang->showSaleDetails");
$tablefields=array('id','date','customer_id','items_purchased','paid_with','sold_by','sale_sub_total','sale_total_cost','sale_details');
$display->displayReportTable("$cfg_tableprefix",'sales',$tableheaders,$tablefields,'','',"$date1","$date2",'id',"$lang->listOfSalesBetween $date1 $lang->and $date2");
?>