<table class="table table-slim mb-0 bg-light-gray" <?php if(!empty($for_pdf)): ?> style="width: 100%;" <?php endif; ?>>
        <tr>
        <th>#</th>
        <th><?php echo app('translator')->get('sale.product'); ?></th>
        <th><?php echo e(__('sale.qty'), false); ?></th>
        <th><?php echo e(__('sale.unit_price'), false); ?></th>
        <th><?php echo app('translator')->get( 'lang_v1.discount_percent' ); ?></th>
        <th><?php echo app('translator')->get('sale.tax'); ?></th>
        <th><?php echo e(__('sale.price_inc_tax'), false); ?></th>
        <th><?php echo app('translator')->get('sale.subtotal'); ?></th>
        </tr>
  <?php $__currentLoopData = $purchase->purchase_lines; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $purchase_line): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
    <tr>
      <td><?php echo e($loop->iteration, false); ?></td>
      <td>
        <?php echo e($purchase_line->product->name, false); ?>

         <?php if( $purchase_line->product->type == 'variable'): ?>
          - <?php echo e($purchase_line->variations->product_variation->name, false); ?>

          - <?php echo e($purchase_line->variations->name, false); ?>

         <?php endif; ?>
         - <?php echo e($purchase_line->variations->sub_sku ?? '', false); ?>

      </td>
          
      <td><?php echo e(number_format($purchase_line->quantity, session('business.quantity_precision', 2), session('currency')['decimal_separator'], session('currency')['thousand_separator']), false); ?> <?php if(!empty($purchase_line->sub_unit)): ?> <?php echo e($purchase_line->sub_unit->short_name, false); ?> <?php else: ?> <?php echo e($purchase_line->product->unit->short_name, false); ?> <?php endif; ?>
      </td>
      <td ><?php 
            $formated_number = "";
            if (session("business.currency_symbol_placement") == "before") {
                $formated_number .= session("currency")["symbol"] . " ";
            } 
            $formated_number .= number_format((float) $purchase_line->pp_without_discount, session("business.currency_precision", 2) , session("currency")["decimal_separator"], session("currency")["thousand_separator"]);

            if (session("business.currency_symbol_placement") == "after") {
                $formated_number .= " " . session("currency")["symbol"];
            }
            echo $formated_number; ?></td>
      <td ><?php echo e(number_format($purchase_line->discount_percent, session('business.currency_precision', 2), session('currency')['decimal_separator'], session('currency')['thousand_separator']), false); ?> %</td>
      <td ><?php 
            $formated_number = "";
            if (session("business.currency_symbol_placement") == "before") {
                $formated_number .= session("currency")["symbol"] . " ";
            } 
            $formated_number .= number_format((float) $purchase_line->item_tax, session("business.currency_precision", 2) , session("currency")["decimal_separator"], session("currency")["thousand_separator"]);

            if (session("business.currency_symbol_placement") == "after") {
                $formated_number .= " " . session("currency")["symbol"];
            }
            echo $formated_number; ?></td>
      <td ><?php 
            $formated_number = "";
            if (session("business.currency_symbol_placement") == "before") {
                $formated_number .= session("currency")["symbol"] . " ";
            } 
            $formated_number .= number_format((float) $purchase_line->purchase_price_inc_tax, session("business.currency_precision", 2) , session("currency")["decimal_separator"], session("currency")["thousand_separator"]);

            if (session("business.currency_symbol_placement") == "after") {
                $formated_number .= " " . session("currency")["symbol"];
            }
            echo $formated_number; ?></span></td>
      <td ><?php 
            $formated_number = "";
            if (session("business.currency_symbol_placement") == "before") {
                $formated_number .= session("currency")["symbol"] . " ";
            } 
            $formated_number .= number_format((float) $purchase_line->purchase_price_inc_tax * $purchase_line->quantity, session("business.currency_precision", 2) , session("currency")["decimal_separator"], session("currency")["thousand_separator"]);

            if (session("business.currency_symbol_placement") == "after") {
                $formated_number .= " " . session("currency")["symbol"];
            }
            echo $formated_number; ?></td>
    </tr>
  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</table><?php /**PATH /home/xsoftdev/marwakamalsteel.xsoftdevelop.com/resources/views/contact/partials/ledger_purchase_lines_details.blade.php ENDPATH**/ ?>