<h1>Sale Details</h1>
<p><strong>Reference: </strong><?php echo e($sale_data['reference_no']); ?></p>
<p>
	<strong>Sale Status: </strong>
	<?php if($sale_data['sale_status']==1): ?><?php echo e('Completed'); ?>

	<?php elseif($sale_data['sale_status']==2): ?><?php echo e('Pending'); ?>

	<?php endif; ?>
</p>
<p>
	<strong>Payment Status: </strong>
	<?php if($sale_data['payment_status']==1): ?><?php echo e('Pending'); ?>

	<?php elseif($sale_data['payment_status']==2): ?><?php echo e('Due'); ?>

	<?php elseif($sale_data['payment_status']==3): ?><?php echo e('Partial'); ?>

	<?php else: ?><?php echo e('Paid'); ?><?php endif; ?>
</p>
<h3>Order Table</h3>
<table style="border-collapse: collapse; width: 100%;">
	<thead>
		<th style="border: 1px solid #000; padding: 5px">#</th>
		<th style="border: 1px solid #000; padding: 5px">Product</th>
		<th style="border: 1px solid #000; padding: 5px">Download Link</th>
		<th style="border: 1px solid #000; padding: 5px">Qty</th>
		<th style="border: 1px solid #000; padding: 5px">Unit Price</th>
		<th style="border: 1px solid #000; padding: 5px">SubTotal</th>
	</thead>
	<tbody>
		<?php $__currentLoopData = $sale_data['products']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
		<tr>
			<td style="border: 1px solid #000; padding: 5px"><?php echo e($key+1); ?></td>
			<td style="border: 1px solid #000; padding: 5px"><?php echo e($product); ?></td>
			<?php if($sale_data['file'][$key]): ?>
				<td style="border: 1px solid #000; padding: 5px"><a href="<?php echo e($sale_data['file'][$key]); ?>">Download</a></td>
			<?php else: ?>
				<td style="border: 1px solid #000; padding: 5px">N/A</td>
			<?php endif; ?>
			<td style="border: 1px solid #000; padding: 5px"><?php echo e($sale_data['qty'][$key].' '.$sale_data['unit'][$key]); ?></td>
			<td style="border: 1px solid #000; padding: 5px"><?php echo e(number_format((float)($sale_data['total'][$key] / $sale_data['qty'][$key]), $general_setting->decimal, '.', '')); ?></td>
			<td style="border: 1px solid #000; padding: 5px"><?php echo e($sale_data['total'][$key]); ?></td>
		</tr>
		<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
		<tr>
			<td colspan="3" style="border: 1px solid #000; padding: 5px"><strong>Total </strong></td>
			<td style="border: 1px solid #000; padding: 5px"><?php echo e($sale_data['total_qty']); ?></td>
			<td style="border: 1px solid #000; padding: 5px"></td>
			<td style="border: 1px solid #000; padding: 5px"><?php echo e($sale_data['total_price']); ?></td>
		</tr>
		<tr>
			<td colspan="5" style="border: 1px solid #000; padding: 5px"><strong>Order Tax </strong> </td>
			<td style="border: 1px solid #000; padding: 5px"><?php echo e($sale_data['order_tax'].'('.$sale_data['order_tax_rate'].'%)'); ?></td>
		</tr>
		<tr>
			<td colspan="5" style="border: 1px solid #000; padding: 5px"><strong>Order discount </strong> </td>
			<td style="border: 1px solid #000; padding: 5px">
				<?php if($sale_data['order_discount']): ?><?php echo e($sale_data['order_discount']); ?>

				<?php else: ?> 0 <?php endif; ?>
			</td>
		</tr>
		<tr>
			<td colspan="5" style="border: 1px solid #000; padding: 5px"><strong>Shipping Cost</strong> </td>
			<td style="border: 1px solid #000; padding: 5px">
				<?php if($sale_data['shipping_cost']): ?><?php echo e($sale_data['shipping_cost']); ?>

				<?php else: ?> 0 <?php endif; ?>
			</td>
		</tr>
		<tr>
			<td colspan="5" style="border: 1px solid #000; padding: 5px"><strong>Grand Total</strong></td>
			<td style="border: 1px solid #000; padding: 5px"><?php echo e($sale_data['grand_total']); ?></td>
		</tr>
		<tr>
			<td colspan="5" style="border: 1px solid #000; padding: 5px"><strong>Paid Amount</strong></td>
			<td style="border: 1px solid #000; padding: 5px">
				<?php if($sale_data['paid_amount']): ?><?php echo e($sale_data['paid_amount']); ?>

				<?php else: ?> 0 <?php endif; ?>
			</td>
		</tr>
		<tr>
			<td colspan="5" style="border: 1px solid #000; padding: 5px"><strong>Due</strong></td>
			<td style="border: 1px solid #000; padding: 5px"><?php echo e(number_format((float)($sale_data['grand_total'] - $sale_data['paid_amount']), $general_setting->decimal, '.', '')); ?></td>
		</tr>
	</tbody>
</table>

<p>Thank You</p><?php /**PATH C:\Users\MHNazary\Pictures\sellbox\resources\views\backend\mail\sale_details.blade.php ENDPATH**/ ?>