<?php
/* $Id: SalesInquiry.php 7675 2016-11-21 14:55:36Z rchacon $*/
/*  */
// SalesInquiry.php
// Inquiry on Sales Orders - If Date Type is Order Date, salesorderdetails is the main table
// If Date Type is Invoice, stockmoves is the main table

include('includes/session.inc');
$Title = _('Sales Inquiry');
include('includes/header.inc');
include('includes/SQL_CommonFunctions.inc');
//Sets default date range for current month
if(!isset($_POST['FromDate'])) {

	$_POST['FromDate']=Date($_SESSION['DefaultDateFormat'], mktime(0,0,0,Date('m'),1,Date('Y')));
}
if(!isset($_POST['ToDate'])) {
	$_POST['ToDate'] = Date($_SESSION['DefaultDateFormat']);
}




	echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">
          <div>
			<br/>
			<br/>';
	echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';

	echo '<table>';

	
	echo '<tr>
			<td>' . _('Date Range') . ':</td>
			<td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] . '" /></td>
			<td>' . _('To') . ':</td>
			<td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td>
		</tr>';
	
	
	echo '
		<tr>
			<td>&nbsp;</td>
			<td><input type="submit" name="submit" value="' . _('Run Cem Reconcilation') . '" /></td>
		</tr>
		</table>
	<br />';
   echo '</div>
         </form>';



	

if (isset($_POST['submit']) ){

echo '<p class="page_title_text"><a href=cemaviationwest.php>' . _('CEM reconcilation Run successfully. Go and grab coffee!and then click here to view this detailed reconcilation and approve the final timesheet for guards');
	
	
}




include('includes/footer.inc');
?>
