<?php /* @var $this DetallepedidocompraController */ /* @var $model Detallepedidocompra */ $this->breadcrumbs = array('Detallepedidocompras' => array('index'), 'Administrar'); $this->menu = array(array('label' => 'Listar', 'url' => array('index')), array('label' => 'Crear', 'url' => array('create')), array('label' => 'MENU', 'url' => array('Menup/index'))); Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#detallepedidocompra-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n"); ?> <h1>Administrar Detalle pedido compras</h1> <?php /* * <p> * También puede escribir un operador de comparación (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b> * o <b>=</b>) al principio de cada uno de los valores de búsqueda para especificar cómo se debe hacer la comparación. * </p> * * <?php echo CHtml::link('Busqueda Avanzada','#',array('class'=>'search-button')); ?> * <div class="search-form" style="display:none"> * <?php $this->renderPartial('_search',array( * 'model'=>$model, * )); ?> * </div><!-- search-form --> */ ?> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'detallepedidocompra-grid', 'itemsCssClass' => 'table table-striped', 'pager' => array('htmlOptions' => array('class' => 'pagination')), 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', array('name' => 'producto_id', 'value' => '$data->tipoproducto->descripcion', 'header' => 'Tipo de producto', 'filter' => CHtml::listData(Tipoproducto::model()->findAll(), 'id', 'descripcion')), 'cantidad', array('name' => 'fechacreacion', 'value' => 'date_format(new DateTime($data->fechacreacion),"d/m/Y")'), array('name' => 'fechamodificacion', 'value' => 'date_format(new DateTime($data->fechamodificacion),"d/m/Y")'), array('class' => 'CButtonColumn'))));
public function getMenuTipoDeProductos() { return CHtml::listData(Tipoproducto::model()->findAll(), "id", "descripcion"); }
<?php /* @var $this ProductoController */ /* @var $model Producto */ $this->breadcrumbs = array('Productos' => array('index'), 'Administrar'); $this->menu = array(array('label' => 'Listar', 'url' => array('index')), array('label' => 'Crear', 'url' => array('create')), array('label' => 'MENU', 'url' => array('Menup/index'))); Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#producto-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n"); ?> <h1>Administrar Productos</h1> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'producto-grid', 'itemsCssClass' => 'table table-striped', 'pager' => array('htmlOptions' => array('class' => 'pagination')), 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'id', 'htmlOptions' => array('width' => '30')), 'nombre', array('name' => 'descripcion', 'htmlOptions' => array('width' => '120')), array('name' => 'tipoproducto_id', 'value' => '$data->tipoproducto->descripcion', 'header' => 'Tipo de producto', 'htmlOptions' => array('width' => '150'), 'filter' => CHtml::listData(Tipoproducto::model()->findAll(), 'id', 'descripcion')), array('name' => 'stockminimo', 'htmlOptions' => array('width' => '40')), array('name' => 'stockmaximo', 'htmlOptions' => array('width' => '40')), array('name' => 'proveedor_id', 'value' => '$data->proveedor->razonsocial', 'header' => 'Proveedor', 'htmlOptions' => array('width' => '150'), 'filter' => CHtml::listData(Proveedor::model()->findAll(), 'id', 'razonsocial')), array('class' => 'CButtonColumn'))));
<?php session_start(); //require_once('../clases/session_data.php'); require_once "../clases/productos_data.php"; //$session= new sessiondata(); $producto = new Producto(); $tipoproducto = new Tipoproducto(); if (!isset($_SESSION['sesion_id_usuario'])) { die("No tiene acceso a esta seccion"); } if (!isset($_REQUEST['npaginas'])) { $_REQUEST['npaginas'] = 50; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>SISTEMA DE GESTION DE CONSULTORIO MEDICO</title> <link href="../estilos/css_sistema.css" rel="stylesheet" type="text/css" /> <link href="../imagenes/logo.ico" type="image/x-icon" rel="shortcut icon"> <script src="../javascript/eventos.js"></script> <div ID="waitDiv" style="position:absolute;left:300;top:300;visibility:hidden"> <table border="0" align="center"> <tr><td> <img src="../imagenes/loading9.gif" border="0"> </td> </tr></table> </div> <SCRIPT>
<?php session_start(); require_once "../clases/ventas_data.php"; include_once "../clases/PHPPaging.lib.php"; $paging = new PHPPaging(); $venta = new Venta(); $producto = new Producto(); $tipoproducto = new Tipoproducto(); if (!isset($_SESSION['sesion_id_usuario'])) { die("No tiene acceso a esta seccion"); } if (!isset($_REQUEST['npaginas'])) { $_REQUEST['npaginas'] = 15; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>SISTEMA DE GESTION DE CONSULTORIO MEDICO</title> <link href="../estilos/css_sistema.css" rel="stylesheet" type="text/css" /> <link href="../imagenes/logo.ico" type="image/x-icon" rel="shortcut icon"> <script src="../javascript/eventos.js"></script> <!-- jQuery --> <script type="text/javascript" src="../librerias/jquery/jquery-1.2.6.pack.js"></script> <!-- required plugins --> <script type="text/javascript" src="../librerias/date_picker/date.js"></script> <!-- jquery.datePicker.js -->
<?php session_start(); require_once "../clases/tipoproducto_data.php"; $tipoproducto = new Tipoproducto(); if (!isset($_SESSION['sesion_id_usuario'])) { die("Usted no tiene acceso a esta area"); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>NUEVA CATEGORIA DE PRODUCTO</title> <script src="../javascript/eventos.js"></script> <link href="../estilos/css_sistema.css" rel="stylesheet" type="text/css" /> </head> <?php if ($_POST['id'] == '1') { $rs = $tipoproducto->tipoproducto_insertar($_POST['descripcion']); if ($rs) { echo "<script LANGUAGE='JavaScript'> window.opener.location.href = 'producto_registrar.php?tipoproducto=" . $_SESSION['tipoproducto_id'] . "';\r\nwindow.close(); </script>"; } } ?> <body onload="centrar_pagina()"> <form id="form1" name="form1" > <table width="389" border="0"> <tr> <td width="90" align="right" class="enfasis">Tipo Producto</td>
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * * @param integer $id * the ID of the model to be loaded * @return Tipoproducto the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Tipoproducto::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }