@lang('menu.salesReport')

@lang('modules.report.salesReportMessage')

@lang('modules.report.totalSales')

{{ currency_format($menuItems->sum('total_amount'), restaurant()->currency_id) }}

@lang('modules.report.orders') {{ $menuItems->sum('total_orders') }}

@lang('modules.report.traditionalPayments')

{{ currency_format($menuItems->sum('cash_amount') + $menuItems->sum('card_amount') + $menuItems->sum('upi_amount'), restaurant()->currency_id) }}

@php $traditionalPayments = [ 'cash' => $menuItems->sum('cash_amount'), 'card' => $menuItems->sum('card_amount'), 'upi' => $menuItems->sum('upi_amount') ]; @endphp @foreach($traditionalPayments as $method => $amount)
@lang("modules.order.{$method}") {{ currency_format($amount, restaurant()->currency_id) }}
@endforeach

@lang('modules.report.paymentGateways')

{{ currency_format($menuItems->sum('razorpay_amount') + $menuItems->sum('stripe_amount') + $menuItems->sum('flutterwave_amount'), restaurant()->currency_id) }}

@php $paymentMethods = [ 'razorpay' => [ 'status' => $paymentGateway->razorpay_status, 'amount' => $menuItems->sum('razorpay_amount') ], 'stripe' => [ 'status' => $paymentGateway->stripe_status, 'amount' => $menuItems->sum('stripe_amount') ], 'flutterwave' => [ 'status' => $paymentGateway->flutterwave_status, 'amount' => $menuItems->sum('flutterwave_amount') ] ]; @endphp @foreach($paymentMethods as $method => $details) @if($details['status'])
@lang("modules.order.{$method}") {{ currency_format($details['amount']) }}
@endif @endforeach

@lang('modules.report.additionalAmounts')

@php $additionalAmounts = [ 'totalCharges' => [ 'label' => 'modules.report.totalCharges', 'amount' => $charges->sum(fn($charge) => $menuItems->sum(fn($item) => $item['charges'][$charge->charge_name] ?? 0)) ], 'totalTaxes' => [ 'label' => 'modules.report.totalTaxes', 'amount' => $menuItems->sum(fn($item) => collect($item['taxes'])->sum()) ], 'discount' => [ 'label' => 'modules.order.discount', 'amount' => $menuItems->sum('discount_amount') ], 'tip' => [ 'label' => 'modules.order.tip', 'amount' => $menuItems->sum('tip_amount') ] ]; @endphp @foreach($additionalAmounts as $key => $data)
@lang($data['label']) {{ currency_format($data['amount']) }}
@endforeach
@lang('app.to')
@lang('app.export')
@if(count($charges) > 0) @endif @if(count($taxes) > 0) @endif @foreach ($charges as $charge) @endforeach @foreach ($taxes as $tax) @endforeach @if($paymentGateway->razorpay_status) @endif @if($paymentGateway->stripe_status) @endif @if($paymentGateway->flutterwave_status) @endif @forelse ($menuItems as $item) @foreach ($charges as $charge) @endforeach @foreach ($taxes as $tax) @endforeach @if($paymentGateway->razorpay_status) @endif @if($paymentGateway->stripe_status) @endif @if($paymentGateway->flutterwave_status) @endif @empty @endforelse
@lang('app.date') @lang('modules.report.totalOrders') @lang('modules.order.extraCharges') @lang('modules.order.taxes') count() }}" class="p-4 text-xs font-medium tracking-wider text-center text-gray-600 uppercase dark:text-gray-300 bg-green-50 dark:bg-green-900/20"> @lang('modules.report.paymentMethods') @lang('modules.order.deliveryFee') @lang('modules.order.discount') @lang('modules.order.tip') @lang('modules.order.total')
{{ $charge->charge_name }} {{ $tax->tax_name }} ({{ $tax->tax_percent }}%) @lang('modules.order.cash') @lang('modules.order.upi') @lang('modules.order.card') @lang('modules.order.razorpay') @lang('modules.order.stripe') @lang('modules.order.flutterwave')
{{ \Carbon\Carbon::parse($item['date'])->format('M d, Y') }} {{ $item['total_orders'] }} {{ currency_format($item['charges'][$charge->charge_name] ?? 0) }} {{ currency_format($item['taxes'][$tax->tax_name] ?? 0) }} {{ currency_format($item['cash_amount']) }} {{ currency_format($item['upi_amount']) }} {{ currency_format($item['card_amount']) }} {{ currency_format($item['razorpay_amount']) }} {{ currency_format($item['stripe_amount']) }} {{ currency_format($item['flutterwave_amount']) }} {{ currency_format($item['delivery_fee']) }} {{ currency_format($item['discount_amount']) }} {{ currency_format($item['tip_amount']) }} {{ currency_format($item['total_amount']) }}
@lang('messages.noItemAdded')
@script @endscript