



<?php $__env->startSection('main-content'); ?>

	<div class="container-fluid spark-screen">
		<div class="row">
			<div class="col-md-12 ">
				<div class="box-body ">
					<div class="container-fluid spark-screen">
						<div class="row">
							<div class="col-md-12">
								<div class="box box-admin-border">
									<div class="box-header with-border">
										<i class="fa fa-bar-chart"></i><h3 class="box-title"><b>Movimientos de:  <?php echo e($nombre->name); ?></b></h3>

									 
									 
									</div>
									<div class="col-sm-12 add_top_10">
										<form action="/account/detalle/<?php echo e($id); ?>" method = "get">
										
											<div class="form-group col-sm-5">
												<input type="date" name="start" placeholder="Fecha Inicio" class="form-control">
											</div>
											<div class="form-group col-sm-5">
												<input type="date" name="finish" placeholder="Fecha Final"  class="form-control">
											</div>
											<div class="form-group col-sm-2 text-right">
												 <button type="submit" class="btn btn-sm  btn-default form-control"><i class="fa fa-filter"></i>Filtrar</button>
											</div>
										</form>
										
									</div>
									
									<div class="box-body responsive-table ">

										<div id="lista_item_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
											<div class="row">
												<div class="col-sm-12">
													
													<table id="summary" class="display" cellspacing="0" width="100%">
						                                <thead>
						                                   	<tr>
																<th>ID</th>
																<th>Fecha de creación</th>
																<th>Tipo</th>
																<th>Monto</th>
																<th>Impuesto</th>
																<th>Motivo</th>
																
																<th>Categorias</th>
																<th>Acción</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->id); ?></td>
															    	<?php if( $summarys->created_at ): ?>
															    	<?php  $datef= date_create($summarys->created_at); 
																	 $fecha=date_format($datef, 'd-m-Y ');
															    	?>
																	<?php endif; ?>
															    	<td><?php echo e($fecha); ?></td> 
															    	<!-- <td><?php echo e($summarys->created_at); ?></td> -->
															    	<?php if($summarys->type=="add"): ?>
															    	<td>Abono <small class="label pull-right bg-primary"><i class="fa fa-sort-up"></i></small></td>
															    	<?php else: ?>
															    	<td>Retiro <small class="label pull-right bg-red"><i class="fa fa-sort-desc"></i></small></td>
															    	<?php endif; ?>
															        <td><?php echo e(number_format($summarys->amount, 2, '.', ',')); ?> <?php echo e($divisa->value); ?></td>
															        <td><?php echo e(number_format($summarys->tax, 2, '.', ',')); ?> </td>
															        <td><?php echo e($summarys->concept); ?></td>
															       
															        <td><?php echo e($summarys->name_categories); ?></td>
															        <td>
																 		<form role="form" action = "/summary/eliminar/<?php echo e($summarys->id); ?>" method="post"  enctype="multipart/form-data">
							                                          			<?php echo e(method_field('DELETE')); ?>

							                                          			<?php echo e(csrf_field()); ?>

							                                          		<a class="btn btn-sm btn-default"  href="/detalle/detalle/<?php echo e($summarys->id); ?>"><i class="fa fa fa-eye"></i></a> 
																			<?php if($summarys->attached): ?>
							                                          		 <a class="btn btn-sm btn-default" target="_blank" href="/download/<?php echo e($summarys->attached->id); ?>"><i class="fa fa-paperclip"></i></a>
																			<?php endif; ?>

							                                       			
							                                      			<a class="btn btn-sm btn-default" href="/summary/edit/<?php echo e($summarys->id); ?>"><i class="fa fa-edit"></i></a>
							                                      			<button  onclick='if(confirmDel() == false){return false;}' class="btn btn-sm btn-default" type="submit"><i class="fa fa-trash"></i></button>
						                                      			</form>
															        </td>
															    </tr>  
															    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
														</tbody>
						                          	</table>
												</div>
											</div>
										</div>
										<!-- /.box-body -->
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
								<div class="col-md-3 col-sm-6 col-xs-12 "> 

									<div class="small-box box">
							            <div class="inner">
							              <h3><?php echo e(number_format($totalf, 2, '.', ',')); ?></h3>

							              <p><?php echo e($divisa->value); ?></p>
							            </div>
							            <div class="icon">
							              <i class="fa fa-money"></i>
							            </div>
							            <label class="small-box-footer">
							              Saldo Total 
							            </label>
							          </div>
							    </div>
	</div>
<?php $__env->stopSection(); ?>

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