Esempio n. 1
0
<div class="span2"></div>
</div>

<h3 class="text-center">Detalle de Pedido</h3>
<div class="row">
	<div class="span2"></div>
	<div class="span8">
		<table class="table table-striped">
			<tr>
				<th>Tipo</th>
				<th>Detalle</th>
				<th>Area</th>
				<th>Cantidad</th>
			</tr>
		<?php 
$elPedido = OrdenPedidoDetalle::model()->findAll("orden_pedido_id = {$model->id}");
?>
		<?php 
foreach ($elPedido as $el_pedido) {
    ?>
				<tr>
					
					<td><?php 
    echo $el_pedido->tipoOrdenPedido->tipo_corto;
    ?>
</td>
			
					<td><?php 
    echo $el_pedido->producto->nombre_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 OrdenPedidoDetalle the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = OrdenPedidoDetalle::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }