@if(isset($inputs) && (isset($result) && count($result) > 0)) @endif @if(isset($result) && count($result) > 0) @php $deliveryFee = $riderTip = $saleDiscount = $customerDiscount = $totalItemPrice = $total = $totalPromoPrice = $orderTotal = 0; $orderId = $result[0]->order_id; $i = 0; $itemTotal = 0; @endphp @foreach($result as $k => $detail) @php if($orderId != $detail->order_id || $i == 0) { $deliveryFee += $detail->delivery_fee; $riderTip += $detail->tip; $saleDiscount += $detail->sale_discount; $customerDiscount += $detail->customer_discount_amount; $totalPromoPrice += $detail->promo_code_value; $orderTotal += $detail->order_total_price; } $totalItemPrice += $detail->total_price; if($detail->order_id != $orderId) { $itemTotal = $detail->total_price; } else { $itemTotal += $detail->total_price; } $p = $k+1; @endphp @if($orderId != $detail->order_id || $i == 0) @else @endif @if(isset($result[$p]) && $result[$p]->order_id == $detail->order_id) @else @endif @php $orderId = $detail->order_id; $i++; @endphp @endforeach @else @endif

{{ __('report.order_item_summary') }}

@if( (isset($inputs['from_date']) && $inputs['from_date'] != '') && (isset($inputs['to_date']) && $inputs['to_date'] != '') ) {{ __('report.from') }}: {{ dateFormat($inputs['from_date'], SHOW_DATE2) }}, {{ __('report.to') }}:  {{ dateFormat($inputs['to_date'], SHOW_DATE2) }}
@endif @if((isset($inputs['payment_status']) && count($inputs['payment_status']) > 0)) {{ __('report.payment_status') }}:  @foreach($inputs['payment_status'] as $ps) {{ paymentStatus($ps) }},   @endforeach
@endif @if((isset($inputs['payment_method']) && count($inputs['payment_method']) > 0)) {{ __('report.payment_method') }}:  @foreach($inputs['payment_method'] as $pm) {{ paymentMethodService($pm) }}, @endforeach
@endif @if((isset($inputs['order_from']) && count($inputs['order_from']) > 0)) {{ __('report.platform') }}:  @foreach($inputs['order_from'] as $of) {{ orderFrom($of) }}, @endforeach
@endif
{{ __('common.sr-no')}} {{ __('report.order_date')}} {{ __('report.order_id')}} {{ __('report.order_number')}} {{ __('report.platform')}} {{ __('report.promo_code_value')}} {{ __('report.delivery_fees')}} {{ __('report.rider_tip')}} {{ __('report.sale_discount')}} {{ __('report.customer_discount_amount')}} {{ __('report.item_name')}} {{ __('report.category_name')}} {{ __('report.tax_perc')}} {{ __('report.quantity')}} {{ __('report.item_price')}} {{ __('report.item_total_price')}} {{ __('report.order_total')}}
{{ $p }} {{ dateFormat($detail->created_at, SHOW_DATE2) }} {{ $detail->order_id }} {{ '#' . orderNumber($detail->order_from, $detail->order_number, $detail->order_prefix) }} {{ orderFrom($detail->order_from) }}{{ ($detail->promo_code_value > 0) ? numberFormat($detail->promo_code_value, false, false) : '' }} {{ ($detail->delivery_fee > 0) ? numberFormat($detail->delivery_fee, false, false) : '' }} {{ ($detail->tip > 0) ? numberFormat($detail->tip, false, false) : '' }} {{ ($detail->sale_discount > 0) ? numberFormat($detail->sale_discount, false, false) : '' }} {{ ($detail->customer_discount_amount > 0) ? numberFormat($detail->customer_discount_amount, false, false) : '' }} @php $variationName = ($detail->variation_name != '') ? ' - ' . $detail->variation_name : ''; @endphp @if($detail->is_half==1 && $detail->item_json != null) @php $itemJson=json_decode($detail->item_json); $itemName=$itemJson[0]->item_name ."+".$itemJson[1]->item_name; @endphp {!! $itemName !!} @else {{ $detail->item_name . ' ' . $variationName }} @endif {{ $detail->category_name }} {{ $detail->tax_perc }} {{ $detail->quantity }} {{ ($detail->total_price > 0) ? numberFormat($detail->total_price, false, false) : '' }}{{ ($itemTotal > 0) ? numberFormat($itemTotal, false, false) : '' }} {{ ($detail->order_total_price > 0) ? numberFormat($detail->order_total_price, false, false) : '' }}
{{ __('report.total') }}: {{ ($totalPromoPrice > 0) ? numberFormat($totalPromoPrice, false, false) : '' }} {{ ($deliveryFee > 0) ? numberFormat($deliveryFee, false, false) : '' }} {{ ($riderTip > 0) ? numberFormat($riderTip, false, false) : '' }} {{ ($saleDiscount > 0) ? numberFormat($saleDiscount, false, false) : '' }} {{ ($customerDiscount > 0) ? numberFormat($customerDiscount, false, false) : '' }} {{ ($totalItemPrice > 0) ? numberFormat($totalItemPrice, false, false) : '' }} {{ ($totalItemPrice > 0) ? numberFormat($totalItemPrice, false, false) : '' }} {{ ($orderTotal > 0) ? numberFormat($orderTotal, false, false) : '' }}
{{ __('common.no_records') }}