@extends('layout.app') @section('title', __('dashboard')) @section('content')
@if (request()->get('type') && request()->get('type') == 'daily') {{ today()->format('M d, Y') }} @elseif (request()->get('type') && request()->get('type') == 'weekly') {{ now()->startOfWeek()->format('M d, Y') }} To {{ now()->endOfWeek()->format('M d, Y') }} @elseif (request()->get('type') && request()->get('type') == 'monthly') {{ now()->startOfMonth()->format('M d, Y') }} To {{ now()->endOfMonth()->format('M d, Y') }} @elseif (request()->get('type') && request()->get('type') == 'yearly') {{ now()->startOfYear()->format('M d, Y') }} To {{ now()->endOfYear()->format('M d, Y') }} @else {{ __('total') }} @endif
{{ __('total_sales') }}
{{ numberFormat($sales->sum('grand_total')) }}
{{ __('net_profit') }}
{{ numberFormat($monthlyNetProfit) }}
{{ __('gross_profit') }}
{{ numberFormat($monthlyGrossProfit) }}
{{ __('sales_return') }}
{{ numberFormat($saleReturns->sum('grand_total')) }}
@if (feature('purchases'))
{{ __('purchase') }}
{{ numberFormat($purchases->sum('grand_total')) }}
{{ __('purchase_due') }}
{{ numberFormat($purchases->sum('grand_total') - $purchases->sum('paid_amount')) }}
@endif
{{ __('expense') }}
{{ numberFormat($expenses->sum('amount')) }}
{{ __('salary_cost') }}
{{ numberFormat($payrolls->sum('amount')) }}
@if (feature('purchases'))
{{ __('purchase_and_sale_flow') }}
@endif
{{ __('cash_flow') }}
{{ __('sales_in') }} {{ date('F') }}
@foreach ($productSales as $sale) @endforeach
{{ __('product_details') }} {{ __('qty') }}
{{ Str::limit($sale->product->name, 30, '...') }} @if (feature('barcodes')) [{{ $sale->product->code }}] @endif
{{ $sale->total_quantity }}
@if (feature('purchases'))
{{ __('purchase_in') }} {{ date('F') }}
@foreach ($productPurchases as $purchase) @endforeach
{{ __('product_details') }} {{ __('qty') }}
{{ Str::limit($purchase->product->name, 30, '...') }} @if (feature('barcodes')) [{{ $purchase->product->code }}] @endif
{{ $purchase->total_quantity }}
@endif
{{ __('recent_transaction') }}
@foreach ($transactions as $transaction) @endforeach
{{ __('date') }} {{ __('payment_method') }} {{ __('translation_by') }} {{ __('status') }} {{ __('amount') }}
{{ dateFormat($transaction->date) }} {{ $transaction->payment_method }} {{ $transaction->user->name }} @if ($transaction->transection_type->value == 'Debit') {{ $transaction->transection_type->value }} @else {{ $transaction->transection_type->value }} @endif {{ numberFormat($transaction->amount) }}
@endsection @push('scripts') @if (session('token')) @endif @endpush