<!DOCTYPE html>
<html>
	<head>
		<title>Vista Preliminar</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                <style type="text/css"> 
table { 
font-family: "Helvetica"; 
} 
</style>
	</head>
	<body>
            
		<table style="width:100%;border:2px solid #d3d3d3;padding:10px; font-family:Helvetica; ">
                   
			<tr>
				<td style="width:70%;padding:0px;">
					<table style="width:100%;"CELLPADDING="-2">
						<tr>
                                                    <th><img src="assets/bootstrap/css/light/images/logo-proforma.jpg"/>
                                                <!--<th style="font-size:28px;"><?php echo $this->conf->RazonSocial; ?></td>-->
						</tr>
						<tr>
							<td style="text-align:center;font-size:6px;padding: 1px;"><?php echo $this->conf->Direccion; ?></td>
						</tr>
                                                <tr>
							<!--<td style="text-align:center;font-size:6px;padding: 1px;"><?php echo $this->conf->telefono; ?></td>-->
                                                        <td style="text-align:center;font-size:6px;">Quito - Ecuador</td>
                                                </tr>
					</table>				
				</td>
				<td>
					<table style="width:100%;border:1px solid #ddd;">
						<tr>
							<td style="text-align:center;"><b>RUC:</b> <?php echo $this->conf->Ruc; ?></td>
						</tr>
						<tr>
							<th style="font-size:18px;">PROFORMA</th>
						</tr>
						<tr>
							<td style="text-align:center;font-size:15px;"><b>Nº</b>: <?php echo $comprobante->Correlativo; ?></td>
						</tr>
                                                <tr>
                                                <td style="font-size:10px;text-align:center;"><b>Fecha:   </b></
							<?php echo $comprobante->FechaEmitido; ?></td>
                                                </tr>
					</table>				
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<table style="width:100%;"CELLPADDING="-2">
						<tr>
							<td style="width:100px;height:20px;"><b>Señores:</b></td>
							<td style="border-bottom:1px solid #ddd;"><?php echo $comprobante->ClienteNombre; ?></td>
						</tr>
						<tr>
							<td style="width:100px;height:20px;"><b>Dirección:</b></td>
							<td style="border-bottom:1px solid #ddd;"><?php echo $comprobante->ClienteDireccion; ?></td>
						</tr>
						<tr>
							<td style="width:100px;height:20px;"><b>Empresa:</b></td>
							<td style="border-bottom:1px solid #ddd;"><?php echo $comprobante->ClienteEmpresa; ?></td>
						</tr>
					</table>
				</td>
                                
                                
			</tr>
                        <tr><td colspan="2">
					<table style="width:100%; padding-top: -4px;"CELLPADDING="-2">
                                            <tr>
							<td style="width:100px;height:20px;"><b>Correo:</b></td>
							<td style="border-bottom:1px solid #ddd;"><?php echo $comprobante->ClienteCorreo; ?></td>
							<td style="width:80px;height:20px;"><b>Telefono:</b></td>
							<td style="border-bottom:1px solid #ddd;"><?php echo $comprobante->ClienteCorreo; ?></td>
                                                        
						</tr>
                                </table>
				</td></tr>
			<tr>
				<td colspan="2">
					<table style="width:100%;">
						<tr >
							<th style="background-color: #c4c4c4;height:20px;text-align:center;border-bottom:1px solid #ddd;">Descripción</th>
							<th style="background-color: #c4c4c4;width:40px;text-align:left;border-bottom:1px solid #ddd;">UND</th>
							<th style="background-color: #c4c4c4;width:40px;text-align:left;border-bottom:1px solid #ddd;">Cantidad</th>
							<th style="background-color: #c4c4c4;width:80px;text-align:right;border-bottom:1px solid #ddd;">P. Unitario</th>
							<th style="background-color: #c4c4c4;width:80px;text-align:right;border-bottom:1px solid #ddd;">Total</th>
						</tr>
						<?php foreach($comprobante->Detalle as $k => $c):?>
						<tr>
							<td style="height:20px;border-bottom:1px solid #ddd;"><?php echo $c->ProductoNombre; ?></td>
							<td style="border-bottom:1px solid #ddd;"><?php echo $c->UnidadMedida_id; ?></td>
							<td style="border-bottom:1px solid #ddd;"><?php echo $c->Cantidad; ?></td>
							<td style="text-align:right;border-bottom:1px solid #ddd;"><?php echo number_format($c->PrecioUnitario, 2); ?></td>
							<td style="text-align:right;border-bottom:1px solid #ddd;"><?php echo number_format($c->PrecioUnitario * $c->Cantidad, 2); ?></td>
						</tr>
						<?php endforeach; ?>
						<?php for($i= count($comprobante->Detalle)+1; $i <= $this->conf->Lineas; $i++):?>
						<tr>
							<td style="height:20px;border-bottom:1px solid #ddd;"></td>
							<td style="border-bottom:1px solid #ddd;"></td>
							<td style="border-bottom:1px solid #ddd;"></td>
							<td style="border-bottom:1px solid #ddd;"></td>
							<td style="border-bottom:1px solid #ddd;"></td>
						</tr>
						<?php endfor; ?>
					</table>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<table style="width:100%;">
						<tr>
							<th style="height:30px;text-align:right;" colspan="4">Total</th>
							<td style="border:1px solid #ddd;text-align:right;width:140px;"><?php echo number_format($comprobante->Total, 2); ?></td>
						</tr>
					</table>
				</td>
			</tr>
                        

                        <tr>
				<td colspan="2">
					<table style="width:100%;">
						<tr>
                            <th style="width:100px;height:20px;"><b>Observaciones:</b></th>
                            <td style="border-bottom:1px solid #ddd;"><?php echo $comprobante->Observaciones; ?></td>
                        </tr>
					</table>
				</td>
			</tr>
                        
		</table>
            <b style="font-size:7px;">Los valores expuestos no incluyen IVA ni impuestos.</b>
            </font>
	</body>
</html>