<?php $__env->startSection('title',trans('front.payments')); ?>
<?php $__env->startSection('content'); ?>
	<!-- Content Header (Page header) -->
	<section class="content-header">
		<h1>
			<?php echo app('translator')->getFromJson('front.payments'); ?>
		</h1>
	</section>

	<!-- Main content -->
	<section class="content">
		<?php echo $__env->make('layouts.partial.filter', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
		<div class="row">
			<div class="col-xs-12">
				<div class="box">
				
				<!-- /.box-header -->
					<div class="box-body">
						<table id="dataList" class="table table-bordered">
							<thead>
							<tr>
								<th>#</th>
                                <th><?php echo app('translator')->getFromJson('front.name'); ?></th>
                                <th><?php echo app('translator')->getFromJson('front.sale'); ?></th>
								<th>البيان</th>
								<th><?php echo app('translator')->getFromJson('front.paid'); ?></th>
								<th><?php echo app('translator')->getFromJson('front.date'); ?></th>
								<th><?php echo app('translator')->getFromJson('front.due'); ?></th>
								<th class="hide"></th>
							</tr>
							</thead>
							<tbody>
							<?php $__currentLoopData = $list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
								<tr>

									<td><?php echo e($loop->iteration); ?></td>
                                    <td>
                                        <a href = "<?php echo e(route('persons.show',$item->id)); ?>" >
                                            <?php echo e($item->name); ?>

                                        </a>
                                    </td>
                                    <td><?php echo e(\App\Employee::find($item->sale_id)->name??''); ?> </td>
									<td>
                                        <span style="color: #dd4b39"><?php echo e($item->note); ?></span>
                                    </td>
                                    <td>
                                        <?php echo e(abs($item->value)); ?>

                                    </td>
									<td><?php echo e(date('Y-m-d',strtotime($item->date))); ?></td>
									<td><?php echo e($item->total_due); ?></td>
									<td class="hide"></td>
								</tr>
							<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
							</tbody>
						</table>
					</div>
					<!-- /.box-body -->
				</div>
				<!-- /.box -->
			</div>
			<!-- /.col -->
		</div>
		<!-- /.row -->
	</section>
	<!-- /.content -->

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

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