@extends('layouts.master') @section('css') @endsection @section('title') {{ __('home.home') }} @stop @section('page-header')
{{ (App::getLocale() == 'en' ? (optional(Auth::user()->branch)->name_en ?? optional(Auth::user()->branch)->name) : optional(Auth::user()->branch)->name) ?? __('home.all_branches') }} {{ Auth::user()->roles_name[0] ?? (app()->getLocale() == 'en' ? 'Authorized User' : 'مستخدم معتمد') }}

{{ __('home.welcome') }}{{ app()->getLocale() == 'en' ? ', ' : '، ' }}{{ Auth::user()->name }} 👋

{{ app()->getLocale() == 'en' ? 'Live executive overview of sales, inventory, and daily operations.' : 'لوحة القيادة والمؤشرات الحية لأداء المبيعات والمخزون والعمليات اليومية.' }}

@endsection @section('content') @can('Home')
{{ __('home.select_branch') }}:
{{ __('home.branch_filter_hint') }}
{{ __('home.salesdoday') }}
{{ $todayInvoicesCount }} {{ __('home.invoice') }}
{{ __('home.TODAYEARNINGS') }}
{{ number_format($todayEarnings, 2) }} {{ __('home.SAR') }}
{{ __('home.purchasesdoday') }}
{{ $todayPurchasesCount }} {{ __('home.invoice') }}
{{ __('home.TODAYpurchases') }}
{{ number_format($todayPurchasesTotal, 2) }} {{ __('home.SAR') }}
{{ __('home.receipt_vouchers') }}
{{ $receiptVouchersCount }} {{ app()->getLocale() == 'en' ? 'voucher(s)' : 'سند' }}
{{ number_format($receiptVouchersTotal, 2) }} {{ __('home.SAR') }}
{{ __('home.payment_vouchers') }}
{{ $paymentVouchersCount }} {{ app()->getLocale() == 'en' ? 'voucher(s)' : 'سند' }}
{{ number_format($paymentVouchersTotal, 2) }} {{ __('home.SAR') }}
{{ __('home.branch_transfers') }}
{{ $transfersCount }} {{ __('home.transfer') }}
{{ number_format($transfersTotal, 2) }} {{ __('home.SAR') }}
{{ __('home.returns_total') }}
{{ app()->getLocale() == 'en' ? 'Sales: ' : 'مبيعات: ' }}{{ number_format($salesReturnsTotal, 2) }} {{ app()->getLocale() == 'en' ? 'Purchases: ' : 'مشتريات: ' }}{{ number_format($purchaseReturnsTotal, 2) }}
{{ __('home.sales_purchases_comparison_current_month') }}
{{ now()->translatedFormat('F Y') }}
{{ __('home.customers_and_suppliers') }}
{{ __('home.total_customers') }} {{ $customersCount }}
{{ __('home.total_suppliers') }} {{ $suppliersCount }}
{{ __('home.returns_and_delivery') }}
{{ __('home.sel_product_withoud_tax') }} ({{ __('home.today') }})
{{ $todayDeliveryCount }} {{ __('home.invoice') }} ({{ number_format($todayDeliveryNet, 2) }} {{ __('home.SAR') }})
{{ __('home.numberodreturnsSale') }}
{{ $uniqueReturnSalesCount }} {{ __('home.invoice') }}
{{ __('home.numberodreturnsPurchases') }}
{{ $resourcePurchasesCount }} {{ __('home.invoice') }}
{{ __('home.top_branch_today') }}
{{ __('home.today') }}
{{ __('home.top_employee_today') }}
{{ __('home.today') }}
{{ __('home.view_employee_sales_today') }}
{{ __('home.invoices_count') }} 0
{{ __('home.total_sales') }} 0
{{ __('home.select_employee_hint') }}
{{ __('home.search_invoices_by_date_employee') }}
{{ __('home.invoice_number') }} {{ __('home.customer') }} {{ __('home.employee') }} {{ __('home.total') }} {{ __('home.payment_method') }} {{ __('home.time') }}
{{ __('home.select_date_search_hint') }}
{{ __('home.branch_transfers_today') }}
@include('partials.branch-transfers')
# {{ __('home.from_branch') }} {{ __('home.to_branch') }} {{ __('home.amount_sar') }} {{ __('home.status') }}
{{ __('home.latest_transactions_today') }}
{{ __('home.view_all') }}
@include('partials.latest-invoices')
{{ __('home.invoice_number') }} {{ __('home.customer') }} {{ __('home.total_amount') }} {{ __('home.payment_method') }} {{ __('home.status') }} {{ __('home.time') }}
{{ app()->getLocale() == 'en' ? "Today's Latest 5 Purchases" : 'آخر 5 عمليات شراء اليوم' }}
{{ __('home.view_all') }}
@forelse($latestPurchasesToday as $purchase) @empty @endforelse
{{ __('home.invoice_number') }} {{ __('home.supplier') }} {{ __('home.amount') }} {{ __('home.payment_method') }} {{ __('home.time') }}
#{{ $purchase->orderId ?? $purchase->purchase_invoice_no ?? $purchase->id }} {{ optional($purchase->supllier)->name ?? '—' }} {{ number_format($purchase->In_debt, 2) }} {{ __('home.SAR') }} {{ $purchase->Pay_Method_Name ?? '—' }} {{ \Carbon\Carbon::parse($purchase->created_at)->format('H:i') }}
{{ app()->getLocale() == 'en' ? 'No purchase transactions recorded today' : 'لا توجد عمليات شراء اليوم' }}
@endcan @endsection @section('js') @endsection