<?php

include_once '../Controller/Cotizar.php';
include_once '../Controller/Visual.php';
$Cotizar = new Cotizar();
$Render = new Visual();
$Res = $Cotizar->VerCabCotizacion();
$Res = $Render->FunctionTable($Res, 0, 'VerDetalle', 'images/lapiz.png');
echo $Render->Tabla($Res, '', array('#', 'Ver', 'Nombre', 'Apellido', 'Email', 'Telefono', 'Fecha de pedido', 'Fecha para viaje', 'Descripción', 'Valor estimado'), 'table', '', TRUE);
<?php

include_once '../Controller/Cotizar.php';
$Update = new Cotizar();
$Update->ActualizarCotizaciones($_POST);
echo '<h1>Se ha guardado la cotizacion</h1>';
<?php

include_once '../Controller/Cotizar.php';
include_once '../Controller/Visual.php';
$Render = new Visual();
$Cot = new Cotizar();
$id_cotizacion = $_POST['id'];
$Datos = $Cot->VerCotizacionAprobadas($id_cotizacion);
$Precio = $Cot->VerTotal($id_cotizacion);
echo '<center><button class="btn btn-primary" onclick="Recargar()">Cancelar</button><button class="btn btn-success" onclick="AprobarCotizacion(' . $id_cotizacion . ')">Generar reserva</button><button onclick="EliminarCotizacion(' . $id_cotizacion . ')" class="btn btn-danger">Eliminar reserva</button></center><br/>';
$Form = '<div class="panel panel-primary">
    <div class="panel-heading">
        <h1> Precio total $' . number_format($Precio, '0', ',', '.') . '</h1>
    </div>
    <div class="panel-body">
    <form id="ArmarCotizaciones" type="post">
    <div class="row">
        <div id="proveedor">
        </div>
    </div>

    <div class="row">

        <div class="col-lg-2">
            <label>Servicio</label>
        </div>
        <div class="col-lg-10">
            <div id="servicios">

                <select class="form-control"></select>
            </div>
<?php

include_once '../Controller/Cotizar.php';
include_once '../Controller/Visual.php';
$Render = new Visual();
$coti = new Cotizar();
$FechaInicio = $_POST['FechaInicio'];
$descripcion_cotizacion = $_POST['descripcion_cotizacion'];
$codusuario = $_POST['codusuario'];
$id = $coti->CabCotizacion($FechaInicio, $descripcion_cotizacion, $codusuario);
echo $id;
<?php

include_once '../Controller/Cotizar.php';
include_once '../Controller/Visual.php';
$cotizar = new Cotizar();
$Render = new Visual();
$id_cotizacion = $_POST['id'];
$Res = $cotizar->VerCotizacionEdit($id_cotizacion);
$Res = $Render->FormatoNumerico($Res, 4, '$', 0, '.', ',');
$Total = $cotizar->Total($id_cotizacion);
$Datos = $Render->Tabla($Res, '', array('#', 'Proveedor', 'Servicio', 'Cantidad', 'Valor', 'Valor total'), 'table', '', true);
echo json_encode(array('Datos' => $Datos, 'Total' => 'Precio estimado $' . number_format($Total, 0, '.', ',')));
<?php

include_once '../Controller/Cotizar.php';
echo '<pre>';
$id_servicio = $_POST['Servicios'];
$cantidad = $_POST['cantida'];
$id_cotizacion = $_POST['CodCabCotizacion'];
$Precio = $_POST['precio'];
$cot = new Cotizar();
$id = $cot->DetalleCotizacion($id_servicio, $cantidad, $id_cotizacion, $Precio);
var_dump($id);
<?php

include_once '../Controller/Cotizar.php';
include_once '../Controller/Visual.php';
$Render = new Visual();
$cot = new Cotizar();
$Servicios = $_POST["Servicios"];
$cantidad = $_POST["cantida"];
$CodCabCotizacion = $_POST["CodCabCotizacion"];
$id = $cot->DetalleCotizacion($Servicios, $cantidad, $CodCabCotizacion);
$Res = $cot->VerCotizacion($CodCabCotizacion);
echo '<h1 align="center">Precio $' . number_format($cot->Total($CodCabCotizacion), 0, ',', '.') . '</h1><br/>';
$Res = $Render->FormatoNumerico($Res, 3, '$', 0);
$Res = $Render->FormatoNumerico($Res, 4, '$', 0);
echo $Render->Tabla($Res, '', array('#', 'Proveedor', 'Servicio', 'Cantidad', 'Valor unitario', 'Valor total'), 'table', '', TRUE);
<?php

include_once '../Controller/Cotizar.php';
include_once '../Controller/Reserva.php';
$id_cotizacion = $_POST['id_cotizacion'];
$Cot = new Cotizar();
$Reserva = new Reserva();
$Datos = $Cot->VerCabCotizaciones($id_cotizacion);
$id = $Reserva->Reservar(NULL, $Datos['id_cliente'], $Datos['precio'], $Datos['fecha_cotizacion'], $Datos['fecha_inicio'], 'Cotizacion', 'N', $id_cotizacion);