<?php
/**
 * This is general file which contains
 * connection file, common function file, etc.,
 *
 * PHP version 5
 *
 * @category Admin_Tool
 * @package  Admin_Tool
 * @author   Aum Infosys <admin@auminfosys.com>
 * @license  ACE
 * @version  CVS:1.0.1
 * @link     http://auminfosys.com/
 * @filesource
 */
 
/**
 * This is general file which contains
 * connection file, common function file, etc.,
 *
 */
  	require "../commonincludefiles.php";
    $Product_Ids = $_POST['ids']; // Get our array back and translate it :
	$deleteProduct_Id = 0;
   	$deleteProduct_Id = json_decode(stripslashes($Product_Ids));

	if(sizeof($deleteProduct_Id)<1){
		echo '0';
	}
	else{
		$product_id  = implode(",",$deleteProduct_Id);
		$objCustomerInvoiceMgmt = new CustomerInvoiceMgmt();
		//commente by smit
		//$objCustomerInvoiceProductMgmt = new CustomerInvoiceProductMgmt();
		//$objCustomerInvoiceTaxMgmt = new CustomerInvoiceTaxMgmt();
		
		//$objCustomerInvoiceProductMgmt->customerinvoice_id = $product_id ;
		//$objCustomerInvoiceProductMgmt->delete();	
       // $objCustomerInvoiceTaxMgmt->customerinvoice_id = $product_id;
		//$objCustomerInvoiceTaxMgmt->delete();	
		//$objCustomerInvoiceMgmt ->deleteId = $product_id;
		//$objCustomerInvoiceMgmt ->delete();
		
		$objCustomerInvoiceMgmt ->deleteId = $product_id;
		$objCustomerInvoiceMgmt ->cancelinvoice();
		echo '1';
	}       
?>
