<?php
include('../include/session.php');	

$quote_no = $_GET['quote_no_text'];
$today = date('Y-m-d');

$table_name = $_SESSION['db_prefix']."_quotations";
$status_query = "UPDATE $table_name SET status = 'quoted' WHERE quote_no = '".$_SESSION['quote_no']."' ";
execsql($status_query);

$table_name = $_SESSION['db_prefix']."_quotation_notes";
$notes_query = "INSERT INTO $table_name (quote_number, note_date, note_text ) VALUES ( '".$quote_no."', '".$today."', 'Status of this quote was returned to Quoted after canceling the Create Job wizard.' ) ";
execsql($notes_query);

//echo $notes_query;
?>

<script language="javascript" type="text/javascript">
        <!--
		  window.location="../sales/sales_main.php?date=0";
        -->
       </script>