@extends('layouts.admin') @section('page-title') {{ __('Dashboard') }} @endsection @php use App\Models\Utility; @endphp @push('script-page') @endpush @section('breadcrumb') {{-- --}} @endsection @section('content')

{{ __('Total') }}

{{__('Customers')}}

{{ \Auth::user()->countCustomers() }}

{{ __('Total') }}

{{__('Vendors')}}

{{ \Auth::user()->countVenders() }}

{{ __('Total') }}

{{__('Invoices')}}

{{ \Auth::user()->countInvoices() }}

{{ __('Total') }}

{{__('Bills')}}

{{ \Auth::user()->countBills() }}

{{ __('Account Balance') }}
@forelse($bankAccountDetail as $bankAccount) @empty @endforelse
{{ __('Bank') }} {{ __('Holder Name') }} {{ __('Balance') }}
{{ $bankAccount->bank_name }} {{ $bankAccount->holder_name }} {{ \Auth::user()->priceFormat($bankAccount->opening_balance) }}
{{ __('there is no account balance') }}
{{ __('Income Vs Expense') }}

{{ __('Income Today') }}

{{ \Auth::user()->priceFormat(\Auth::user()->todayIncome()) }}

{{ __('Expense Today') }}

{{ \Auth::user()->priceFormat(\Auth::user()->todayExpense()) }}

{{ __('Income This Month') }}

{{ \Auth::user()->priceFormat(\Auth::user()->incomeCurrentMonth()) }}

{{ __('Expense This Month') }}

{{ \Auth::user()->priceFormat(\Auth::user()->expenseCurrentMonth()) }}

{{ __('Cashflow') }}
{{ __('Income & Expense') }} {{ __('Current Year') . ' - ' . $currentYear }}
{{ __('Income By Category') }} {{ __('Year') . ' - ' . $currentYear }}
{{ __('Latest Income') }}
@forelse($latestIncome as $income) @empty @endforelse
{{ __('Date') }} {{ __('Customer') }} {{ __('Amount Due') }}
{{ \Auth::user()->dateFormat($income->date) }} {{ !empty($income->customer) ? $income->customer->name : '-' }} {{ \Auth::user()->priceFormat($income->amount) }}
{{ __('there is no latest income') }}
{{ __('Expense By Category') }} {{ __('Year') . ' - ' . $currentYear }}
{{ __('Latest Expense') }}
@forelse($latestExpense as $expense) @empty @endforelse
{{ __('Date') }} {{ __('Vendor') }} {{ __('Amount Due') }}
{{ \Auth::user()->dateFormat($expense->date) }} {{ !empty($expense->vender) ? $expense->vender->name : '-' }} {{ \Auth::user()->priceFormat($expense->amount) }}
{{ __('there is no latest expense') }}
{{ __('Recent Invoices') }}
@forelse($recentInvoice as $invoice) @empty @endforelse
# {{ __('Customer') }} {{ __('Issue Date') }} {{ __('Due Date') }} {{ __('Amount') }} {{ __('Status') }}
{{ \Auth::user()->invoiceNumberFormat($invoice->invoice_id) }} {{ !empty($invoice->customer) ? $invoice->customer->name : '' }} {{ Auth::user()->dateFormat($invoice->issue_date) }} {{ Auth::user()->dateFormat($invoice->due_date) }} {{ \Auth::user()->priceFormat($invoice->getTotal()) }} @if ($invoice->status == 0) {{ __(\App\Models\Invoice::$statues[$invoice->status]) }} @elseif($invoice->status == 1) {{ __(\App\Models\Invoice::$statues[$invoice->status]) }} @elseif($invoice->status == 2) {{ __(\App\Models\Invoice::$statues[$invoice->status]) }} @elseif($invoice->status == 3) {{ __(\App\Models\Invoice::$statues[$invoice->status]) }} @elseif($invoice->status == 4) {{ __(\App\Models\Invoice::$statues[$invoice->status]) }} @endif
{{ __('there is no recent invoice') }}
{{ __('Total') }}

{{ __('Invoice Generated') }}

{{ \Auth::user()->priceFormat($weeklyInvoice['invoiceTotal']) }}

{{ __('Total') }}

{{ __('Paid') }}

{{ \Auth::user()->priceFormat($weeklyInvoice['invoicePaid']) }}

{{ __('Total') }}

{{ __('Due') }}

{{ \Auth::user()->priceFormat($weeklyInvoice['invoiceDue']) }}

{{ __('Total') }}

{{ __('Invoice Generated') }}

{{ \Auth::user()->priceFormat($monthlyInvoice['invoiceTotal']) }}

{{ __('Total') }}

{{ __('Paid') }}

{{ \Auth::user()->priceFormat($monthlyInvoice['invoicePaid']) }}

{{ __('Total') }}

{{ __('Due') }}

{{ \Auth::user()->priceFormat($monthlyInvoice['invoiceDue']) }}

{{ __('Recent Bills') }}
@forelse($recentBill as $bill) @empty @endforelse
# {{ __('Vendor') }} {{ __('Bill Date') }} {{ __('Due Date') }} {{ __('Amount') }} {{ __('Status') }}
{{ \Auth::user()->billNumberFormat($bill->bill_id) }} {{ !empty($bill->vender) ? $bill->vender->name : '' }} {{ Auth::user()->dateFormat($bill->bill_date) }} {{ Auth::user()->dateFormat($bill->due_date) }} {{ \Auth::user()->priceFormat($bill->getTotal()) }} @if ($bill->status == 0) {{ __(\App\Models\Bill::$statues[$bill->status]) }} @elseif($bill->status == 1) {{ __(\App\Models\Bill::$statues[$bill->status]) }} @elseif($bill->status == 2) {{ __(\App\Models\Bill::$statues[$bill->status]) }} @elseif($bill->status == 3) {{ __(\App\Models\Bill::$statues[$bill->status]) }} @elseif($bill->status == 4) {{ __(\App\Models\Bill::$statues[$bill->status]) }} @endif
{{ __('there is no recent bill') }}
{{ __('Total') }}

{{ __('Bill Generated') }}

{{ \Auth::user()->priceFormat($weeklyBill['billTotal']) }}

{{ __('Total') }}

{{ __('Paid') }}

{{ \Auth::user()->priceFormat($weeklyBill['billPaid']) }}

{{ __('Total') }}

{{ __('Due') }}

{{ \Auth::user()->priceFormat($weeklyBill['billDue']) }}

{{ __('Total') }}

{{ __('Bill Generated') }}

{{ \Auth::user()->priceFormat($monthlyBill['billTotal']) }}

{{ __('Total') }}

{{ __('Paid') }}

{{ \Auth::user()->priceFormat($monthlyBill['billPaid']) }}

{{ __('Total') }}

{{ __('Due') }}

{{ \Auth::user()->priceFormat($monthlyBill['billDue']) }}

{{ __('Goal') }}
@forelse($goals as $goal) @php $total = $goal->target($goal->type, $goal->from, $goal->to, $goal->amount)['total']; $percentage = $goal->target($goal->type, $goal->from, $goal->to, $goal->amount)[ 'percentage' ]; @endphp
@empty
{{ __('There is no goal.') }}
@endforelse
@endsection