Buenas tardes, ante todo un cordial saludos para todos en el foro. tengo un inconveniente, y necesito ayuda. por favor serian tan amables de ayudarme con información , textos, ejemplos, para realizar operaciones matematicas en cakephp, el problema es que aun soy muy novato y se me complica un poco todo este tema, para tener una idea mejor esta es mi vista :
English: Good afternoon, first of all a cordial greetings to all forum. I have a problem and need help. please would be so kind to help me with information, text, illustrations, to perform mathematical operations in cakephp, the problem is that I am still a newbie and I was a bit complicated this whole issue, to get a better idea this is my view: <http://www.subirimagenes.com/imagedata.php?url=http://s2.subirimagenes.com/otros/9234902vistaprevia.jpg> Lo que yo quiero es ir poniendo las cantidades y luego hacer la operación con respecto al precio hacer un solo calculo y colocarlo en el total, por ejemplo en cantidad_adulto ingresar 2 y por detras multiplicarlo con el 7.50 que es el valor y asi con todos y hacer un calculo global y guardarlo en el campo total, creanme que voy dias en esto y no logro realizarlo. les agradezco su ayuda English: What I want is to put the amounts and then do the operation with respect to price calculation and make a single place in total, eg cantidad_adulto enter 2 and from behind multiply with 7.50 being the value and thus to each and make a global calculation and store in the total field, trust me you'll days on this and I can not do it. thank you for your help <http://www.subirimagenes.com/imagedata.php?url=http://s2.subirimagenes.com/otros/9234906db.jpg> La base de datos es esta: y este es el código de la vista: add.ctp <div class="ventas form"> <?php echo $this->Form->create('Venta'); ?> <fieldset> <legend><?php echo __('PROCESO DE COMPRA'); ?></legend> <?php echo $this->Form->input('nombre'); echo $this->Form->input('apellido'); echo $this->Form->input('cedula'); echo $this->Form->input('direccion'); echo $this->Form->input('mail'); echo $this->Form->input('telefono'); echo $this->Form->input('tarjeta'); echo $this->Form->input('numtarjeta'); echo __('<legend>SELECCIONE SU PELICULA</legend>'); echo $this->Form->input('cartelera_id',array('label' => 'Seleccione su pelicula'));//el array permite modificar los atributos del formulario en este caso el label para modificar el nombre del campo que bake arroja de forma magica echo $this->Form->input('cant_adulto', array('label' => 'Cantidad de boletos - Precio normal $ 7,50')); echo $this->Form->input('cant_niño', array('label' => 'Cantidad de boletos - Precio niños/ancianos $ 5,50')); echo $this->Form->input('cant_discapacitado', array('label' => 'Cantidad de boletos - Precio discapacitados $ 4,90')); echo __('<legend>SELECCIONE SU COMBO</legend>'); echo $this->Form->input('combo_id'); echo $this->Form->input('numcombo', array('label' => 'Cantidad de combos - Precio discapacitados $ 12,90')); echo $this->Form->input('total'); ?> </fieldset> <?php echo $this->Form->end(__('Guardar')); ?> </div> <div class="actions"> <h3><?php echo __('Acciones'); ?></h3> <ul> <li><?php echo $this->Html->link(__('Listar Ventas'), array('action' => 'index')); ?></li> <li><?php echo $this->Html->link(__('Listar Clientes'), array('controller' => 'clientes', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('Nuevo Cliente'), array('controller' => 'clientes', 'action' => 'add')); ?> </li> <li><?php echo $this->Html->link(__('Listar Combos'), array('controller' => 'combos', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('Nuevo Combo'), array('controller' => 'combos', 'action' => 'add')); ?> </li> <li><?php echo $this->Html->link(__('Listar Carteleras'), array('controller' => 'carteleras', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('Nueva Cartelera'), array('controller' => 'carteleras', 'action' => 'add')); ?> </li> </ul> </div> -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.