<?php
session_start();
include 'config.php';
	
$sql = "EXECUTE PROCEDURE GRABE_FACTURA_WEBCR(".$_POST["idped"].",'".$_POST["recicaja"]."')";

echo $sql;

try {
	$dbh = new PDO("firebird:dbname=$dbname", $_SESSION['usuario'], $_SESSION['clave']);	
	$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
	$stmt = $dbh->prepare($sql);
	$stmt->execute();
	$dbh = null;
} catch(PDOException $e) {
	echo '{"error":{"text":'. $e->getMessage() .'}}'; 
}


?>