<?php
require_once('DataManager.Class.php');

class Reporte {
    
    public $conn;

    function __construct($c) {
        
        if(isset($c)){
                $this->conn = $c;
        } else {
                $this->conn = DataManager::getInstance();
        }
    }

	public function informacionReporteReserva($fecInicio, $fecFin, $cliente, $proveedorSils, $proveedorCliente, $bodega, $puerta,
												$razonSocial, $numero, $estado, $inicio, $cantidad) 
	{
		$stmt = $this->conn->prepare("{CALL agenda.SP_reserva_adm_reporte_informacion_limit (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}");
        
		$stmt->execute(array($fecInicio, $fecFin, $cliente, $proveedorSils, $proveedorCliente, $bodega, $puerta,
							$razonSocial, $numero, $estado, $inicio, $cantidad));
		return $stmt->fetchAll();	

    }
	
    public function informacionReservaFechaMinMaxReporte() 
	{
		$stmt = $this->conn->prepare("{CALL agenda.SP_reserva_fechas_min_max_report_informacion ()}");
        
		$stmt->execute(array());
		return $stmt->fetch();	

    }
	
    function Close() {
        
        $this->conn = null;
        
    }
}
?>
