function insertarEjemplo($ejemplo)
{
    $retorno = false;
    $tabla = "ejemplo";
    $operacion = insertarRegistro($tabla, $ejemplo);
    if ($operacion != false) {
        $retorno = true;
    }
    return $retorno;
}
Example #2
0
<?php

$folder = "../../";
include_once "../../basededatos.php";
if (!empty($_POST)) {
    $nombre = $_POST['nombre'];
    $descripcion = $_POST['descripcion'];
    $valores = array("nombre" => "'{$nombre}'", "descripcion" => "'{$descripcion}'");
    insertarRegistro("categoria", $valores);
}
include_once $folder . "cabecerahtml.php";
?>

<?php 
include_once $folder . "cabecera.php";
?>
<div class="col-lg-offset-2 col-lg-8 col-sm-8 col-xs-8 trans" >
    <div class="well with-header with-footer">
    <div class="header bordered-green">MENSAJE</div>
        <div class="alert alert-success">
        Datos Guardados <strong>Correctamente</strong>
        </div>
        <a href="index.php" class="btn btn-blue">Nueva Categoria</a>
        <a href="listar.php" class="btn btn-success">Ver Categorias</a>
    </div>
   
</div>
<?php 
include_once $folder . "pie.php";
Example #3
0
        $nombreproducto = $pr['nombre'];
        if ($totalproducto < $cantidad) {
            $mensaje[] = "No Existe en Inventario la Cantidad que Solicita<hr><strong><br>Nombre Producto: {$nombreproducto}<br>Cantidad de Inventario: {$totalproducto}<br>Cantidad de Solicitada: {$cantidad}</strong>";
        } else {
            $sql = "SELECT * FROM compra WHERE codproducto={$codproductos} and cantidadstock>0 ORDER BY fechacompra";
            $com = consulta($sql);
            foreach ($com as $inv) {
                if ((double) $cantidad <= (double) $inv['cantidadstock']) {
                    //echo "si";
                    $mensaje[] = "La Venta del producto " . mb_strtoupper($nombreproducto, "utf8") . " se registro correctamente";
                    $cantidad = $inv['cantidadstock'] - $cantidad;
                    $valores = array("cantidadstock" => "{$cantidad}");
                    actualizarRegistro("compra", $valores, $inv["codcompra"]);
                    //print_r($valores);
                    $valores = array("codventa" => "'{$codventa}'", "codproducto" => "'" . $r['codproducto'] . "'", "cantidad" => "'" . $r['cantidad'] . "'", "precioventa" => "'" . $r['precioventa'] . "'", "total" => "'" . $r['total'] . "'");
                    insertarRegistro("ventadetalle", $valores);
                    break;
                } else {
                    //echo $cantidadsalida;
                    $cantidad = $cantidad - $inv['cantidadstock'];
                    $valores = array("cantidadstock" => 0);
                    actualizarRegistro("compra", $valores, $inv["codcompra"]);
                }
            }
        }
        /*HAsta Aqui*/
        $sql = "DELETE FROM detalleventatemporal WHERE coddetalleventatemporal=" . $r['coddetalleventatemporal'];
        consulta($sql);
    }
}
include_once $folder . "cabecerahtml.php";
Example #4
0
<?php

$folder = "../../";
include_once "../../basededatos.php";
if (!empty($_POST)) {
    extract($_POST);
    /*echo "<pre>";
    	print_r($_POST);
    	echo "</pre>";
    	exit();*/
    foreach ($g as $r) {
        $valores = array("detalle" => "'" . $r['detalle'] . "'", "subtotal" => "'" . $r['subtotal'] . "'", "fechagasto" => "'{$fechagasto}'");
        insertarRegistro("gasto", $valores);
    }
}
//print_r($g);
//exit();
include_once $folder . "cabecerahtml.php";
?>

<?php 
include_once $folder . "cabecera.php";
?>
<div class="col-lg-offset-2 col-lg-8 col-sm-8 col-xs-8 trans" >
    <div class="well with-header with-footer">
    <div class="header bordered-green">MENSAJE</div>
        <div class="alert alert-success">
        <strong>Gasto Registrado Correctamente</strong>
        </div>
        <a href="index.php" class="btn btn-blue">Nuevo Gasto</a>
        <a href="listar.php" class="btn btn-blue">Ver Gastos</a>
				$error = "Columna AE: Valor inválido.";
				insertarRegistroError($seqTrans, $row, $error);
			}
			elseif ($cols["AE"] < 0) {
				$error = "Columna AE: El valor debe ser un número mayor o igual a cero.";
				insertarRegistroError($seqTrans, $row, $error);
			}
		}


		// Inserto la C.U.I.L. en el arreglo de cuiles..
		if ($cols["C"] != "")
			$cuits[] = $cols["C"];

		if ($error == "")
			insertarRegistro($seqTrans, $row, $cols);
	}

	if (!$hayRegistros)
		insertarRegistroError($seqTrans, 0, "No hay registros para procesar.");

	$hayErrores = transaccionConErrores($seqTrans);
	actualizarRegistros($hayErrores, $seqTrans);
	DBCommit($conn);

	if ($hayErrores)
		echo "<script type='text/javascript'>window.parent.location.href = '/index.php?pageid=46&page=paso3.php&id=".$seqTrans."';</script>";
	else {
?>
		<script type="text/javascript">
<?
Example #6
0
<?php

$folder = "../../";
include_once "../../basededatos.php";
if (!empty($_POST)) {
    $cantidadnueva = $_POST['cantidadnueva'];
    $codproducto = $_POST['codproducto'];
    $valores = array("cantidad" => "'{$cantidadnueva}'", "cantidadstock" => "'{$cantidadnueva}'", "fechacompra" => "'{$fechacompra}'", "codproducto" => "'{$codproducto}'");
    insertarRegistro("compra", $valores);
}
include_once $folder . "cabecerahtml.php";
?>

<?php 
include_once $folder . "cabecera.php";
?>
<div class="col-lg-offset-2 col-lg-8 col-sm-8 col-xs-8 trans" >
    <div class="well with-header with-footer">
    <div class="header bordered-green">MENSAJE</div>
        <div class="alert alert-success">
        Datos Guardados <strong>Correctamente</strong>
        </div>
        <a href="index.php" class="btn btn-blue">Nueva Recarga</a>
    </div>
   
</div>
<?php 
include_once $folder . "pie.php";
Example #7
0
<?php

$folder = "../../";
include_once "../../basededatos.php";
if (!empty($_POST)) {
    extract($_POST);
    if ($_FILES['foto']['name'] != "") {
        @copy($_FILES['foto']['tmp_name'], "../../imagenes/productos/" . $_FILES['foto']['name']);
        $foto = $_FILES['foto']['name'];
    }
    $valores = array("codcategoria" => "'{$codcategoria}'", "nombre" => "'{$nombre}'", "descripcion" => "'{$descripcion}'", "codigo" => "'{$codigo}'", "talla" => "'{$talla}'", "descripcion" => "'{$descripcion}'", "preciominimo" => "'{$preciominimo}'", "preciomaximo" => "'{$preciomaximo}'", "foto" => "'{$foto}'");
    insertarRegistro("producto", $valores);
}
include_once $folder . "cabecerahtml.php";
?>

<?php 
include_once $folder . "cabecera.php";
?>
<div class="col-lg-offset-2 col-lg-8 col-sm-8 col-xs-8 trans" >
    <div class="well with-header with-footer">
    <div class="header bordered-green">MENSAJE</div>
        <div class="alert alert-success">
        Datos Guardados <strong>Correctamente</strong>
        </div>
        <a href="index.php" class="btn btn-blue">Nuevo Producto</a>
        <a href="listar.php" class="btn btn-success">Ver Productos</a>
    </div>
   
</div>
<?php