@extends('admin.layouts.master') @section('content')
{{ trans('app.revenue') }} {{ get_formated_currency($sales_total, 2, config('system_settings.currency.id')) }}
{{ trans('app.latest_months', ['months' => config('charts.default.months')]) }}
{{ trans('app.conversion_rate') }} @if ($orders_count) {{ get_formated_decimal(($orders_count / ($orders_count + $abandoned_carts_count)) * 100, true, 1) }} {{ trans('app.percent') }} @else 0 @endif
{{ trans('app.latest_months', ['months' => config('charts.default.months')]) }}
{{ trans('app.abandoned_carts') }} {{ $abandoned_carts_count }}
{{ trans('app.latest_months', ['months' => config('charts.default.months')]) }}
{{ trans('app.avg_order_value') }} @if ($orders_count) {{ get_formated_currency($sales_total / $orders_count, 2, config('system_settings.currency.id')) }} @else 0 @endif
{{ trans('app.latest_months', ['months' => config('charts.default.months')]) }}

{{ trans('app.sales_by_months') }}

{{ trans('app.total') }}: {{ get_formated_currency($sales_total, 2, config('system_settings.currency.id')) }} {{ $orders_count . ' ' . trans('app.orders') }}

{!! $chart->container() !!}

{{ trans('app.finances') }}

{{ trans('app.sales_total') }} {{ get_formated_currency($sales_total, 2, config('system_settings.currency.id')) }}
{{ trans('app.discounts') }} -{{ get_formated_currency($discount_total, 2, config('system_settings.currency.id')) }}
{{ trans('app.refunds') }} -{{ get_formated_currency($latest_refund_total, 2, config('system_settings.currency.id')) }}
{{ trans('app.net_sales') }} {{ get_formated_currency($sales_total - ($discount_total + $latest_refund_total), 2, config('system_settings.currency.id')) }}
{{ trans('app.latest_months', ['months' => config('charts.default.months')]) }}

{{ trans('app.top_selling_items') }}

@foreach ($top_listings as $inventory) @endforeach
  {{ trans('app.listing') }} {{ trans('app.attributes') }} {{ trans('app.units_sold') }} {{ trans('app.gross_sales') }}  
{{ trans('app.image') }}
{{ trans('app.sku') . ': ' }} @can('view', $inventory) {{ $inventory->sku }} @else {{ $inventory->sku }} @endcan
{{ $inventory->name }}
{{ implode(' | ', array_column($inventory->attributeValues->toArray(), 'value')) }} {{ $inventory->sold_qtt }} {{ get_formated_currency($inventory->gross_sales, 2, config('system_settings.currency.id')) }}  

{{ trans('app.top_customers') }}

@forelse($top_customers as $customer) @empty @endforelse
  {{ trans('app.name') }} {{ trans('app.revenue') }}
@if ($customer->image) {{ trans('app.avatar') }} @else {{ trans('app.avatar') }} @endif @can('view', $customer) {{ $customer->getName() }} @else {{ $customer->getName() }} @endcan {{ $customer->orders_count }} {{ get_formated_currency(round($customer->orders->sum('total')), 2, config('system_settings.currency.id')) }}
{{ trans('app.no_data_found') }}

{{ trans('app.returning_customers') }}

@forelse($returning_customers as $customer) @empty @endforelse
  {{ trans('app.name') }} {{ trans('app.revenue') }}
@if ($customer->image) {{ trans('app.avatar') }} @else {{ trans('app.avatar') }} @endif @can('view', $customer) {{ $customer->getName() }} @else {{ $customer->getName() }} @endcan {{ $customer->orders_count }} {{ get_formated_currency(round($customer->orders->sum('total')), 2, config('system_settings.currency.id')) }}
{{ trans('app.no_data_found') }}

{{ trans('app.top_categories') }}

@foreach ($top_categories as $category) @endforeach
{{ trans('app.name') }} {{ trans('app.items') }} {{ trans('app.status') }}
{{ $category->name }} {{ $category->listings_count }} {{ $category->active ? trans('app.active') : trans('app.inactive') }}

{{ trans('app.top_suppliers') }}

@foreach ($top_suppliers as $supplier) @endforeach
  {{ trans('app.name') }} {{ trans('app.items') }} {{ trans('app.status') }}
{{ trans('app.logo') }} {{ $supplier->name }} {{ $supplier->inventories_count }} {{ $supplier->active ? trans('app.active') : trans('app.inactive') }}
@endsection @section('page-script') @include('plugins.chart') {!! $chart->script() !!} @endsection