@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') }}
@can('sale.invoice.view') @endcan
@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 @can('dashboard.can.view.low.stock.items.table')
{{ __('item.low_stock_items') }}
@can('item.view') @endcan
@php $i = 1; @endphp @foreach($lowStockItems as $item) @endforeach
# {{ __('item.item_name') }} {{ __('item.brand.brand') }} {{ __('item.category.category') }} {{ __('item.min_stock') }} {{ __('item.current_stock') }} {{ __('unit.unit') }}
{{ $i++ }} {{ $item->name }} {{ $item->brand->name??'' }} {{ $item->category->name }} {{ $formatNumber->formatQuantity($item->min_stock) }} {{ $formatNumber->formatQuantity($item->current_stock) }} {{ $item->baseUnit->name }}
@endcan
@endsection @section('js') @endsection