<?php 
		header("Access-Control-Allow-Origin: *");
		header("Content-Type: application/json; charset=UTF-8");

		include_once '../Database.php';
		include_once 'concepto.php';

		$database = new DataBase();
		$db = $database->getConnection();

		$concepto = new Concepto($db);
		try{
		$concepto->id=isset($_GET['id'])?$_GET['id']:die();
		if($concepto->delete()){
			echo json_encode(array("Mensaje"=>"Registro Eliminado"));
		}else{
			echo json_encode(array("Error"=>"No se pudo eliminar el registro"));
		}
		
	}catch(Exception $e){
		echo json_encode(array("Error"=>"Codigo mal construido"));
	}
	
		
?>