@extends('master.app') @section('title', 'Dashboard') @section('body')
@php $date = date('Y-m-d'); $date_week = date('Y-m-d', strtotime('-7 days')); $yesterday = date('Y-m-d', strtotime('-1 days')); $word = explode('-', $date); $year = $word[0]; $month = $word[1]; $this_month = $year . '-' . $month; @endphp
Customers

{{ $customers }}

Suppliers

{{ $suppliers }}

Employees

{{ $employees }}

Bankes

{{ $bankers }}

Debetors

{{ $debitors }}

Investors

{{ $investors }}

{{-- today sale --}}
نن ورځی فروشات
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $sale->where('invoice_date', $date)->where('currency_id', $row->id)->sum('grand_total') }}

@endforeach
نن ورځ رسید شوی
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $received->where('date', $date)->where('currency_id', $row->id)->sum('amount') }}

@endforeach
نن ورځی بیلانس
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $sale->where('invoice_date', $date)->sum('grand_total') -$received->where('date', $date)->where('currency_id', $row->id)->sum('amount') }}

@endforeach
{{-- month sale --}}
روانی میاشتی فروشات
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $sale->where('invoice_date', '>=', $this_month)->where('currency_id', $row->id)->sum('grand_total') }}

@endforeach
روانی میاشتی وصولی
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $received->where('date', '>=', $this_month)->where('currency_id', $row->id)->sum('amount') }}

@endforeach
روانی میاشتی بیلانس
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $sale->where('invoice_date', '>=', $this_month)->where('currency_id', $row->id)->sum('grand_total') -$received->where('date', '>=', $this_month)->where('currency_id', $row->id)->sum('amount') }}

@endforeach
{{-- total sale --}}
ټول فروشات
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $sale->where('currency_id', $row->id)->sum('grand_total') }}

@endforeach
ټوله وصولی
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $received->where('currency_id', $row->id)->sum('amount') }}

@endforeach
ټوټل بیلانس
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $sale->where('currency_id', $row->id)->sum('grand_total') - $received->where('currency_id', $row->id)->sum('amount') }}

@endforeach
{{-- today purchase --}}
نن ورځی خریداری
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $purchase->where('invoice_date', $date)->where('currency_id', $row->id)->sum('grand_total') }}

@endforeach
نن ورځ فیمنټ شوی
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $payment->where('date', $date)->where('currency_id', $row->id)->sum('amount') }}

@endforeach
نن ورځی بیلانس
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $purchase->where('invoice_date', $date)->sum('grand_total') -$received->where('date', $date)->where('currency_id', $row->id)->sum('amount') }}

@endforeach
{{-- month purchase --}}
روانی میاشتی خریداری
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $purchase->where('invoice_date', '>=', $this_month)->where('currency_id', $row->id)->sum('grand_total') }}

@endforeach
روانی میاشتی فیمنټ شوی
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $payment->where('date', '>=', $this_month)->where('currency_id', $row->id)->sum('amount') }}

@endforeach
روانی میاشتی بیلانس
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $purchase->where('invoice_date', '>=', $this_month)->where('currency_id', $row->id)->sum('grand_total') -$received->where('date', '>=', $this_month)->where('currency_id', $row->id)->sum('amount') }}

@endforeach
{{-- total purchase --}}
ټول خریداری
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $purchase->where('currency_id', $row->id)->sum('grand_total') }}

@endforeach
ټوله فیمنټ شوی
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $payment->where('currency_id', $row->id)->sum('amount') }}

@endforeach
ټوټل بیلانس
@foreach ($currencies as $row)

{{ $row->title_en }} {{ $purchase->where('currency_id', $row->id)->sum('grand_total') - $payment->where('currency_id', $row->id)->sum('amount') }}

@endforeach
@endsection @section('pageJs') @endsection