<?php 	

require_once '../../Server/connection.php';


$valid['success'] = array('success' => false, 'messages' => array());

$quotId = $_POST['categoriesId'];

if($quotId){ 


 $sql = "DELETE FROM quotation WHERE quot_id = {$quotId}";
 
 $sql2 = "DELETE FROM quotation_items WHERE quot_id = {$quotId}";
 
 //$sql3 = "DELETE FROM client_docs WHERE file_id = {$file_id}";

 if($conn->query($sql) === TRUE && $conn->query($sql2) === TRUE) {
 	$valid['success'] = true;
	$valid['messages'] = "Quotation is Successfully Deleted";		
 } else {
 	$valid['success'] = false;
 	$valid['messages'] = "Error while Deleting Quotation";
 }
 
 $conn->close();

 echo json_encode($valid);
 
} // /if $_POST