@extends('layouts.app') @section('title', __('app.dashboard')) @section('content')
@can('dashboard.can.view.widget.cards')

{{ __('sale.order.pending') }}

{{ $pendingSaleOrders }}

{{ __('sale.order.completed') }}

{{ $totalCompletedSaleOrders }}

{{ __('payment.payment_receivables') }}

{{ $totalPaymentReceivables }}

{{ __('payment.payment_paybles') }}

{{ $totalPaymentPaybles }}

{{ __('purchase.order.pending') }}

{{ $pendingPurchaseOrders }}

{{ __('purchase.order.completed') }}

{{ $totalCompletedPurchaseOrders }}

{{ __('expense.total_expenses') }}

{{ $totalExpense }}

{{ __('customer.total') }}

{{ $totalCustomers }}

@endcan
@can('dashboard.can.view.sale.vs.purchase.bar.chart')
{{ __('sale.sale_vs_purchase') }}
{{ __('purchase.purchase_bills') }} {{ __('sale.sale_invoices') }}
@endcan @can('dashboard.can.view.trending.items.pie.chart')
{{ __('item.trending') }}
    @foreach($trendingItems as $item)
  • {{ $item['name'] }} {{ $formatNumber->formatQuantity($item['total_quantity']) }}
  • @endforeach
@endcan
@can('dashboard.can.view.recent.invoices.table')
{{ __('sale.recent_invoices') }}
@foreach($recentInvoices as $recent) @php if($recent->grand_total == $recent->paid_amount){ $class = 'success'; $message = 'Paid'; }else if($recent->grand_total < $recent->paid_amount){ $class = 'warning'; $message = 'Partial'; }else{ $class = 'danger'; $message = 'Unpaid'; } @endphp @endforeach
{{ __('sale.invoice_date') }} {{ __('sale.code') }} {{ __('customer.name') }} {{ __('app.grand_total') }} {{ __('app.balance') }} {{ __('app.status') }}
{{ $recent->formatted_sale_date }} {{ $recent->sale_code }} {{ $recent->party->getFullName() }} {{ $formatNumber->formatWithPrecision($recent->grand_total) }} {{ $formatNumber->formatWithPrecision($recent->grand_total - $recent->paid_amount) }}
{{ $message }}
@endcan
@endsection @section('js') @endsection