@foreach($order->items as $item)
@php
$sellingPrice = $item->price;
$qty = (int) $item->qty;
$totalQuantity += $qty;
$discountPercentage = $order->customer_vat;
$vatPercentage = $item->vat;
$item->weight > 0 ? ($totalWeight += ($item->weight * $item->qty)) : null;
$itemTotalAmount = $sellingPrice * $qty;
$originalItemTotal += $itemTotalAmount;
$discount = findDiscountAmount($itemTotalAmount, $discountPercentage);
$totalDiscount += $discount;
$afterDiscountItemTotal = ($itemTotalAmount - $discount);
$totalVat += findVatAmount($afterDiscountItemTotal, $vatPercentage);
@endphp
-
-
{{ $item->title }}
@lang('frontend_lang.qty') : {{ $item->qty }}
@lang('frontend_lang.price') : {{ $item->price }}
@endforeach
@lang('frontend_lang.sub_total') ({{ $totalQuantity }} items, {{ $totalWeight }} kg)
{{ showAmount($originalItemTotal) }}
@if($totalDiscount > 0)
@lang('frontend_lang.discount')
{{ showAmount($totalDiscount) }}
@endif
@if($totalVat > 0)
@lang('frontend_lang.vat')
{{ showAmount($totalVat) }}
@endif
@lang('frontend_lang.net_total')
{{ showAmount(($originalItemTotal - $totalDiscount) + $totalVat) }}