<?php
$baseUrl = Yii::$app->getUrlManager()->getBaseUrl();
?>
<style>
	.results {
		border: 1px solid #ccc;
		max-height: 200px;
		overflow-y: auto;
	}

	.result-item {
		padding: 0.5em;
		cursor: pointer;
	}

	.result-item:hover {
		background-color: #f8f9fa;
	}
</style>
<div id="tblinforme-grid" class="grid-view">
	<div class=" border-top">
		<table class="items table  table-bordered table-sm table-hover table-condensed table-responsive-yoha">
			<thead>
				<tr>
					<th id="tblinforme-grid_c0">Id</th>
					<th id="tblinforme-grid_c0">Cod. Producto</th>
					<th id="tblinforme-grid_c0">Nom. Producto</th>
					<th id="tblinforme-grid_c0">Cantidad</th>					
					<th id="tblinforme-grid_c0">P. Unitario</th>
					<th id="tblinforme-grid_c0">SubTotal</th>
				</tr>
			</thead>
			<tbody>
				<?php
				if (isset($data)) {
					foreach ($data as $key => $detalle) {
				?>
						<tr class="odd">
							<td><?php echo $detalle['id']; ?></td>
							<td><?php echo $detalle['pro_codigo']; ?></td>
							<td><?php echo $detalle['nombre']; ?></td>
							<td><?php echo $detalle['cantidad']; ?></td>
							<td><?php echo $detalle['precio_unitario']; ?></td>	
							<td><?php echo $detalle['cantidad']*$detalle['precio_unitario']; ?></td>							
						</tr>
				<?php
					}
				}
				?>
			</tbody>
		</table>		

		<table class="table table-responsive-yoha">
			<tr>
				<?php
				if (isset($foto)) {					
				?>
					<td style="text-align: center; border: 1px solid black;">
						<?php
						?>
						<img src="<?php echo $baseUrl . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . $foto; ?>" style="max-height: 450px" />
					</td>
				<?php
				}
				?>
			<tr>
		</table>

	</div>
</div>