public function insertar_servicio($servicio, $cantidad, $precio) { $esta_clase = new venta(); $id_venta = $esta_clase->MaxIdVenta(); $consulta = "insert into ventas_servicios(id_venta, id_servicio, cantidad, precio_servicio) values\n\t\t(" . $id_venta . "," . $servicio . "," . $cantidad . "," . $precio . ")"; conexion::consultar($consulta); return true; }
<html lang="es" ng-app="app"> <?php if (!isset($_SESSION)) { session_start(); } if (isset($_SESSION['id_imprimere'])) { require_once '/../../php/clases/producto.class.php'; require_once '/../../php/clases/servicio.class.php'; require_once '../../php/clases/ventas.class.php'; $class_producto = new producto(); $productos = $class_producto->getproductos_venta(); $class_venta = new venta(); $venta_max = $class_venta->MaxIdVenta() + 1; } else { session_destroy(); header("Location: ../../index.php"); } ?> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <title>Facturar</title> <link rel="shortcut icon" type="image/x-icon" href="../../favicon.png"> <link rel="stylesheet" href="../../css/bootstrap.css"> <link rel="stylesheet" href="../../css/flat-ui.css"> <link rel="stylesheet" href="../../css/spinner.css"> </head> <body>