<?php $__env->startSection('title',trans('front.orderdetails')); ?>
<?php $__env->startSection('content'); ?>
	<!-- Content Header (Page header) -->
	<section class="content-header">
		<h1>
			<?php echo app('translator')->getFromJson('front.orderdetails'); ?>
		</h1>
	</section>
	<!-- Main content -->
	<section class="content">
		<div class="row">
			<div class="col-xs-12">
				<div class="box">

				 <div class="box-header">
					 <?php echo $__env->make('layouts.partial.filter', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                 </div>
				<!-- /.box-header -->
					<div class="box-body">
						<table id="dataList" class="table table-bordered table-striped">
							<thead>
								<tr>
                                    <th>#</th>
                                    <th><?php echo app('translator')->getFromJson('front.invoicenumber'); ?></th>
                                    <th><?php echo app('translator')->getFromJson('front.name'); ?></th>
                                    <th><?php echo app('translator')->getFromJson('front.date'); ?></th>
                                    <th><?php echo app('translator')->getFromJson('front.product'); ?></th>
                                    <th><?php echo app('translator')->getFromJson('front.quantity'); ?></th>
                                    <th><?php echo app('translator')->getFromJson('front.saleprice'); ?></th>
                                    <th><?php echo app('translator')->getFromJson('front.sale'); ?></th>
								</tr>
							</thead>
							<tbody>
                            <?php
                                $index = 0;
                            ?>
							<?php $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php $__currentLoopData = $order->details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td><?php echo e(++$index); ?></td>
                                        <td><?php echo e($order->invoice_number); ?></td>
                                        <td><?php echo e(optional($order->client)->name); ?></td>
                                        <td><?php echo e($order->invoice_date); ?></td>
                                        <td><?php echo e($item->name); ?></td>
                                        <td><?php echo e($item->pivot->qty); ?></td>
                                        <td><?php echo e($item->pivot->price); ?></td>
                                        <td><?php echo e(optional($order->saleMan)->name); ?></td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
							<?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(); ?>