@if(!empty($details['product_details']) && count($details['product_details']) > 0)

@lang('lang_v1.product_sold_details_register')

@php $total_amount = 0; $total_quantity = 0; @endphp @foreach($details['product_details'] as $detail) @endforeach
# @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
@lang('sale.total'): {{$total_quantity}} {{$total_amount}}
@endif @if(!empty($details['product_details_by_brand']) && count($details['product_details_by_brand']) > 0)

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

@php $total_amount_brand = 0; $total_quantity_brand = 0; @endphp @foreach($details['product_details_by_brand'] as $detail) @endforeach
# @lang('brand.brands') @lang('sale.qty') @lang('sale.total_amount')
{{$loop->iteration}} {{$detail->brand_name}} {{@format_quantity($detail->total_quantity)}} @php $total_quantity_brand += $detail->total_quantity; @endphp {{$detail->total_amount}} @php $total_amount_brand += $detail->total_amount; @endphp
@lang('sale.total'): {{$total_quantity_brand}} {{$total_amount_brand}}
@endif @if(!empty($details['types_of_service_details']) && count($details['types_of_service_details']) > 0)

@lang('lang_v1.types_of_service_details')

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