@extends('layouts.admin.app') @section('content')

{{ __('Dashboard') }}

@php $packageAdmin = \App\Support\AdminAccess::currentAdmin(); @endphp @if ($packageAdmin)
{{ __('Package') }}: {{ $packageAdmin->package?->name ?? __('Not assigned') }} @if ($packageAdmin->package) {{ $packageAdmin->isPackageExpired() ? __('Expired') : __('Expires') }}: {{ $packageAdmin->package_expires_at?->format('d M Y') ?? __('Not set') }} @endif
@endif

{{ __('Overview of your business') }}

{{ __("Today's Total Sales") }}

Rs. {{ number_format($todaySales, 2) }}

{{ __('Invoices today') }}

{{ __("Today's Total Purchases") }}

Rs. {{ number_format($todayPurchases, 2) }}

{{ __('Purchase bills today') }}

{{ __("Today's Total Customer Payments") }}

{{ __('Received') }} Rs. {{ number_format($todayCustomerPaymentsReceived, 2) }}
{{ __('Walk-in') }} Rs. {{ number_format($todayWalkInPayments, 2) }}
{{--
{{ __('Paid') }} Rs. {{ number_format($todayCustomerPaymentsPaid, 2) }}
--}}

{{ __("Today's Net Cash Flow") }}

Rs. {{ number_format($todayNetCashFlow, 2) }}

{{ __('Combined inflow / outflow') }}

{{ __("Today's Total Supplier Payments") }}

Rs. {{ number_format($todaySupplierPayments, 2) }}

{{ __('Payments to suppliers') }}

{{ __("Today's Total Sales Return") }}

Rs. {{ number_format($todaySalesReturns, 2) }}

{{ __('Returned sales') }}

{{ __("Today's Total Purchases Return") }}

Rs. {{ number_format($todayPurchaseReturns, 2) }}

{{ __('Returned purchases') }}

{{ __("Today's Total Expenses") }}

Rs. {{ number_format($todayExpenses + $todayPayrollPaid, 2) }}

{{ __('Paid expenses and staff salaries') }}

{{ __('Staff Salary Paid') }}: Rs. {{ number_format($todayPayrollPaid, 2) }}

{{-- Chart + finance summary --}}

{{ __('Monthly Sales') }}

{{ __('Last 6 months from invoices') }}

@foreach ($monthlySales as $month)
{{ $month['label'] }}
@endforeach
{{ __('Sales amount') }}
{{-- Low stock preview --}}

{{ __('Low Stock Report') }}

{{ __('Items below alert quantity') }} ยท {{ number_format((int) $lowStockItems) }} {{ __('items') }}

@if (empty($lowStockPreview))

{{ __('No low stock items found.') }}

@else
    @foreach ($lowStockPreview as $item)
  • {{ $item['name'] }} @if (!empty($item['group_name'])) {{ $item['group_name'] }} @endif
    {{ number_format((float) $item['stock'], 2) }} {{ __('Shortage') }}: {{ number_format((float) $item['shortage'], 2) }}
  • @endforeach
@endif {{ __('View full report') }}
{{-- Recent sales --}}

{{ __('Recent Sales') }}

{{ __('Latest invoices') }}

@if ($recentInvoices->isEmpty())

{{ __('No sales yet.') }}

@else
    @foreach ($recentInvoices as $invoice)
  • {{ $invoice->customer->name ?? __('Walk-in Customer') }} {{ $invoice->created_at?->format('d M Y') }}
    Rs. {{ number_format((float) $invoice->total, 2) }}
  • @endforeach
@endif {{ __('Sale List') }}
{{-- Recent purchases --}}

{{ __('Recent Purchases') }}

{{ __('Latest purchase bills') }}

@if ($recentPurchases->isEmpty())

{{ __('No purchases yet.') }}

@else
    @foreach ($recentPurchases as $purchase)
  • {{ $purchase->supplier->name ?? '-' }} {{ $purchase->purchase_date }}
    Rs. {{ number_format((float) $purchase->grand_total, 2) }}
  • @endforeach
@endif {{ __('Purchases') }}
{{-- --}} @endsection