<?php $__env->startSection('htmlheader_title'); ?>
	<?php echo e(trans('adminlte_lang::message.home')); ?>

<?php $__env->stopSection(); ?>


<?php $__env->startSection('main-content'); ?>
	<div class="container-fluid spark-screen">
		<div class="row">
		
		
        <div class="col-md-3 col-sm-6 col-xs-12">
          <div class="info-box">
            <span class="info-box-icon bg-aqua"><i class="fa fa-money"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">Abonos</span>
              </br>
              <a href="/summary/create?type=add">Añadir Depositos</a>
            </div>
            <!-- /.info-box-content -->
          </div>
          <!-- /.info-box -->
        </div>
        <!-- /.col -->
        <div class="col-md-3 col-sm-6 col-xs-12">
          <div class="info-box">
            <span class="info-box-icon bg-yellow "><i class="fa fa-tag"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">Retiros</span>
              </br>
             <a href="/summary/create?type=out">Añadir Retiros</a>
            </div>
            <!-- /.info-box-content -->
          </div>
          <!-- /.info-box -->
        </div>
        <!-- /.col -->
        <div class="col-md-3 col-sm-6 col-xs-12">
          <div class="info-box">
            <span class="info-box-icon bg-green"><i class="fa fa-thumbs-o-up"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">Abonos</span>
              </br>
              <span class="info-box-number"><?php echo e(number_format($add, 2, ',', '.')); ?> <?php echo e($divisa->value); ?></span>
            </div>
            <!-- /.info-box-content -->
          </div>
          <!-- /.info-box -->
        </div>
        <!-- /.col -->
        <div class="col-md-3 col-sm-6 col-xs-12">
          <div class="info-box">
            <span class="info-box-icon bg-red"><i class="fa fa-bars"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">Retiros</span>
              </br>
              <span class="info-box-number"><?php echo e(number_format($out, 2, ',', '.')); ?>  <?php echo e($divisa->value); ?></span>
            </div>
            <!-- /.info-box-content -->
          </div>
          <!-- /.info-box -->
        </div>
        <!-- /.col -->
      </div>
		<div class="row">
			<div class="col-md-12 ">

				<!-- Default box -->
				<div class="box">
					<div class="box-header with-border">
						<i class="fa fa-bar-chart"></i><h3 class="box-title">Grafica de movimientos</h3>
					</div>
					<div class="col-sm-12 add_top_10">
						<form id="form_filter">
							<div class="form-group col-sm-5">
								<input type="date" name="start" id="start" class="form-control">
							</div>
							<div class="form-group col-sm-5">
								<input type="date" name="finish" id="finish" class="form-control">
							</div>
							<div class="form-group col-sm-2">
								<a href="javascript:void(0)" id="filter_btn" class="btn btn-sm btn-default form-control"><i class="fa fa-filter"></i> Filtrar</a>
							</div>
						</form>
						
					</div>
					<div class="box-body">
						<canvas id="myChart" class="col-sm-12"></canvas>
						<center><label>Abonos&nbsp; </label><label class="entrada" >&nbsp;&nbsp;&nbsp;&nbsp; </label> &nbsp;&nbsp;  <label>Retiros &nbsp;</label><label class="salida" > &nbsp;&nbsp;&nbsp;&nbsp;</label></center>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="container-fluid spark-screen">
		<div class="row">
			<div class="col-md-6">

				<!-- Default box -->
				<div class="box">
					<div class="box-header with-border">
						<i class="fa fa-credit-card"></i> <h3 class="box-title">Saldo Disponible</h3>

						
					</div>
					<div class="box-body responsive-table">
						<table  class="table table-striped">
														<thead>
															<tr>
																
																<th>Nombre</th>
																<th>tipo </th>
																<th>Numero</th>
																
																<th>Saldo</th>
															
															</tr>
														</thead>
														<tbody>
															    <?php $__currentLoopData = $summary; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $summarys): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
															    <tr>
															    	
															    	<td><?php echo e($summarys->name); ?></td>
															    	<td><?php echo e($summarys->type); ?></td>
															    	<td><?php echo e($summarys->number); ?></td>
															    	<td><n class="n"><?php echo e(number_format($summarys->total , 2, ',', '.')); ?> </n> <?php echo e($divisa->value); ?></td>
															    </tr>  
															    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
														</tbody>
													</table>
					</div>
				</div>
			</div>
			<div class="col-md-6">

				<!-- Default box -->
				<div class="box">
					<div class="box-header with-border">
						<i class="fa fa-code-fork"></i><h3 class="box-title">Movimientos</h3>

						
					</div>
					<div class="box-body responsive-table">
						<table  class="table table-striped">
														<thead>
															<tr>
																
																<th>Tipo</th>
																<th>Monto</th>
																<th>Impuesto</th>
																<th>Cuenta</th>
																<th>Categorias</th>
																
															</tr>
														</thead>
														<tbody>
															    <?php $__currentLoopData = $account; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $accounts): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
															    <tr>
															    	
															    	<?php if($accounts->type=="add"): ?>
															    	<td>Ingreso</td>
															    	<?php else: ?>
															    	<td>Salida</td>
															    	<?php endif; ?>
															    	
															        <td><?php echo e(number_format($accounts->amount, 2, ',', '.')); ?> <?php echo e($divisa->value); ?></td>
															        <td><?php echo e($accounts->tax); ?></td>
															        <td><?php echo e($accounts->name_account); ?></td>
															        <td><?php echo e($accounts->name_categories); ?></td>
															        <td>
																 		
															        </td>
															    </tr>  
															    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
														</tbody>
													</table>
					</div>
					<!-- /.box-body -->
				</div>
				<!-- /.box -->

			</div>
		</div>
	</div>
	
	

<?php $__env->stopSection(); ?>

<?php echo $__env->make('adminlte::layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>