<div class="row">
	<div class="col-md-12">
		<div class="page-header">
			<h1>Dashboard</h1>
		</div>
		<?php if($this->user->Tipo == 1 || $this->user->Tipo == 3): ?>
		<div class="row resume">
			<div class="col-md-12">
				<div class="row">
					
                                    <div class="col-md-2">
						<div class="well3 well-sm">
							<span class="legend">Vendido Ayer</span>
							<span class="glyphicon glyphicon-usd"></span>
							<?php echo $this->conf->Moneda_id; ?> <span class="total"><?php echo number_format($resumen1->Vendido, 2); ?></span>						
						</div>
					</div>
                                    
                                        <div class="col-md-2">
						<div class="well3 well-sm">
							<span class="legend">Ganado Ayer</span>
							<span class="glyphicon glyphicon-heart"></span>
							<?php echo $this->conf->Moneda_id; ?> <span class="total"><?php echo number_format($resumen1->Ganado, 2); ?></span>						
						</div>
					</div>
                                    <div class="col-md-2">
						<div class="well3 well-sm">
							<span class="legend">Ventas de Ayer</span>
							<span class="glyphicon glyphicon-book"></span>
							<span class="total"><?php echo $resumen1->Comprobantes; ?></span>						
						</div>
					</div>
				
                                    
                                    <div class="col-md-2">
						<div class="well5 well-sm">
							<span class="legend">Vendido Hoy</span>
							<span class="glyphicon glyphicon-usd"></span>
							<?php echo $this->conf->Moneda_id; ?> <span class="total"><?php echo number_format($resumen->Vendido, 2); ?></span>						
						</div>
					</div>
					<div class="col-md-2">
						<div class="well5 well-sm">
							<span class="legend">Ganado Hoy</span>
							<span class="glyphicon glyphicon-heart"></span>
							<?php echo $this->conf->Moneda_id; ?> <span class="total"><?php echo number_format($resumen->Ganado, 2); ?></span>						
						</div>
					</div>
                                    
                                        

                                    
					<div class="col-md-2">
						<div class="well5 well-sm">
							<span class="legend">Ventas de Hoy</span>
							<span class="glyphicon glyphicon-book"></span>
							<span class="total"><?php echo $resumen->Comprobantes; ?></span>						
						</div>
					</div>
                                  	<!--<div class="col-md-2">
						<div class="well6 well-sm">
							<span class="legend">Clientes</span>
							<span class="glyphicon glyphicon-user"></span>
							<span class="total"><?php echo $resumen->Clientes; ?></span>						
						</div>
					</div>-->
                                   <!-- <div class="col-md-2">
						<div class="well5 well-sm">
							<span class="legend">Productos</span>
							<span class="glyphicon glyphicon-shopping-cart"></span>
							<span class="total"><?php echo $resumen->Productos; ?></span>						
						</div>
					</div>-->
					<!--<div class="col-md-2">
						<div class="well6 well-sm">
							<span class="legend">Servicios</span>
							<span class="glyphicon glyphicon-briefcase"></span>
							<span class="total"><?php echo $resumen->Servicios; ?></span>						
						</div>
					</div>-->
				</div>
			</div>
		</div>
		<hr />
		<?php endif; ?>
		<?php if(HasModule('stock') && count($ProductosSinStock) > 0): ?>
			<fieldset>
				<legend class="text-right">Stock próximo a terminarse</legend>
				<div class="well well-sm">
					<table class="table table-striped">
					<?php foreach($ProductosSinStock as $p): ?>
						<tr>
							<td><?php echo $p->Nombre; ?></td>
							<td class="text-right" style="width:100px;">
								<b><?php echo $p->Stock . ' ' . $p->UnidadMedida_id; ?></b>
							</td>
							<td class="text-right" style="width:100px;">
								<a target="_blank" href="<?php echo base_url('index.php/almacen/entrada/' . $p->id); ?>" class="btn btn-success btn-xs">
									<i class="glyphicon glyphicon-circle-arrow-up"></i> Aumentar
								</a>
							</td>
						</tr>
					<?php endforeach; ?>
					</table>
				</div>
			</fieldset>
		<?php endif; ?>
		
                
                
                
                
                
                
                
	</div>
</div>