예제 #1
0
				FICHA DE ENTRADA DE MERCANCIAS
			</td>
		</tr>
		<tr>
			<td style="border: 1px solid #555;"><b>Fecha</b></td>
			<td style="border: 1px solid #555;"><b>Materia prima</b></td>
			<td style="border: 1px solid #555;"><b>Proveedor</b></td>
			<td style="border: 1px solid #555;"><b>Lote / Albaran</b></td>
			<td style="border: 1px solid #555;"><b>Estado</b></td>
			<td style="border: 1px solid #555;"><b>Temperatura</b></td>
			<td style="border: 1px solid #555;"><b>Caducidad</b></td>
			<td style="border: 1px solid #555;"><b>Observaciones</b></td>
		</tr>
		
		<?php 
$modelMerchandise = Merchandise::model()->findAllByAttributes(array("UserID" => Yii::app()->user->ID));
foreach ($modelMerchandise as $Merchandise) {
    ?>
				<tr>
					<td><?php 
    echo $Merchandise->Date;
    ?>
</td>
					<td><?php 
    echo $Merchandise->raw->Name;
    ?>
</td>
					<td><?php 
    echo $Merchandise->provider->Name;
    ?>
</td>
예제 #2
0
 /**
  * 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 the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = Merchandise::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }