@lang('lang_v1.product_sold_details_register')

@php $total_amount = 0; $total_quantity = 0; @endphp @foreach($details['product_details'] as $detail) @endforeach @php $tax_amount = $details['transaction_details']->total_tax ?? 0; $discount_amount = $details['transaction_details']->total_discount ?? 0; $shipping_charges = $details['transaction_details']->total_shipping_charges ?? 0; $total_amount += ($tax_amount - $discount_amount); $total_amount += $shipping_charges; @endphp
# @lang('product.sku') @lang('sale.product') @lang('sale.qty') @lang('sale.total_amount')
{{$loop->iteration}}. {{$detail->sku}} {{$detail->product_name}} @if($detail->type == 'variable') {{$detail->product_variation_name}} - {{$detail->variation_name}} @endif {{@format_quantity($detail->total_quantity)}} @php $total_quantity += $detail->total_quantity; @endphp {{$detail->total_amount}} @php $total_amount += $detail->total_amount; @endphp
# {{$total_quantity}} @if(!empty($tax_amount) && $tax_amount != 0) @lang('sale.order_tax'): (+) {{$tax_amount}}
@endif @if(!empty($discount_amount) && $discount_amount != 0) @lang('sale.discount'): (-) {{$discount_amount}}
@endif @if(!empty($shipping_charges) && $shipping_charges != 0) @lang('lang_v1.total_shipping_charges'): (+) {{$shipping_charges}}
@endif @lang('lang_v1.grand_total'): {{$total_amount}}

@lang('lang_v1.product_sold_details_register') (@lang('lang_v1.by_brand'))

@php $total_amount = 0; $total_quantity = 0; @endphp @foreach($details['product_details_by_brand'] as $detail) @endforeach @php $tax_amount = $details['transaction_details']->total_tax ?? 0; $discount_amount = $details['transaction_details']->total_discount ?? 0; $shipping_charges = $details['transaction_details']->total_shipping_charges ?? 0; $total_amount += ($tax_amount - $discount_amount); $total_amount += $shipping_charges; @endphp
# @lang('brand.brands') @lang('sale.qty') @lang('sale.total_amount')
{{$loop->iteration}}. {{$detail->brand_name}} {{@format_quantity($detail->total_quantity)}} @php $total_quantity += $detail->total_quantity; @endphp {{$detail->total_amount}} @php $total_amount += $detail->total_amount; @endphp
# {{$total_quantity}} @if(!empty($tax_amount) && $tax_amount != 0) @lang('sale.order_tax'): (+) {{$tax_amount}}
@endif @if(!empty($discount_amount) && $discount_amount != 0) @lang('sale.discount'): (-) {{$discount_amount}}
@endif @if(!empty($shipping_charges) && $shipping_charges != 0) @lang('lang_v1.total_shipping_charges'): (+) {{$shipping_charges}}
@endif @lang('lang_v1.grand_total'): {{$total_amount}}
@if(!empty($details['returned_product_details']) && count($details['returned_product_details']) > 0)

Customer Goods Return (@lang('lang_v1.total_sell_return'))

@php $total_return_amount = 0; $total_return_quantity = 0; @endphp @foreach($details['returned_product_details'] as $detail) @endforeach
# @lang('product.sku') @lang('sale.product') @lang('lang_v1.quantity_returned') @lang('sale.total_amount')
{{$loop->iteration}}. {{$detail->sku}} {{$detail->product_name}} @if($detail->type == 'variable') {{$detail->product_variation_name}} - {{$detail->variation_name}} @endif {{@format_quantity($detail->total_quantity)}} @php $total_return_quantity += $detail->total_quantity; @endphp {{$detail->total_amount}} @php $total_return_amount += $detail->total_amount; @endphp
# {{$total_return_quantity}} @lang('sale.total'): {{$total_return_amount}}
@endif @if($details['types_of_service_details'])

@lang('lang_v1.types_of_service_details')

@php $total_sales = 0; @endphp @foreach($details['types_of_service_details'] as $detail) @php $total_sales += $detail->total_sales; @endphp @endforeach
# @lang('lang_v1.types_of_service') @lang('sale.total_amount')
{{$loop->iteration}} {{$detail->types_of_service_name ?? "--"}} {{$detail->total_sales}} @php $total_sales += $detail->total_sales; @endphp
# @lang('lang_v1.grand_total'): {{$total_amount}}
@endif