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

مقارنة تاريخية

مقارنة شاملة بين الفترة الحالية والفترة السابقة

العودة

عدد أوامر الشراء

{{ $data['current_period']['po_count'] ?? 0 }}

الفترة السابقة: {{ $data['previous_period']['po_count'] ?? 0 }}

إجمالي الأوامر

{{ number_format($data['current_period']['po_total'] ?? 0, 2) }} ر.س

التغير {{ ($data['po_change_percent'] ?? 0) >= 0 ? '+' : '' }}{{ number_format($data['po_change_percent'] ?? 0, 2) }}%

عدد الفواتير

{{ $data['current_period']['invoice_count'] ?? 0 }}

الفترة السابقة: {{ $data['previous_period']['invoice_count'] ?? 0 }}

إجمالي الفواتير

{{ number_format($data['current_period']['invoice_total'] ?? 0, 2) }} ر.س

التغير {{ ($data['invoice_change_percent'] ?? 0) >= 0 ? '+' : '' }}{{ number_format($data['invoice_change_percent'] ?? 0, 2) }}%

مقارنة أوامر الشراء

مقارنة الفواتير

مقارنة مفصلة

المقياس الفترة الحالية الفترة السابقة الفرق النسبة %
عدد أوامر الشراء {{ $data['current_period']['po_count'] ?? 0 }} {{ $data['previous_period']['po_count'] ?? 0 }} {{ ($data['current_period']['po_count'] ?? 0) - ($data['previous_period']['po_count'] ?? 0) }} @if(($data['previous_period']['po_count'] ?? 0) > 0) {{ ($data['po_change_percent'] ?? 0) >= 0 ? '+' : '' }}{{ number_format(($data['previous_period']['po_count'] ?? 0) > 0 ? ((($data['current_period']['po_count'] ?? 0) - ($data['previous_period']['po_count'] ?? 0)) / ($data['previous_period']['po_count'] ?? 1)) * 100 : 0, 2) }}% @else - @endif
إجمالي أوامر الشراء {{ number_format($data['current_period']['po_total'] ?? 0, 2) }} ر.س {{ number_format($data['previous_period']['po_total'] ?? 0, 2) }} ر.س {{ ($data['current_period']['po_total'] ?? 0) >= ($data['previous_period']['po_total'] ?? 0) ? '+' : '' }}{{ number_format(($data['current_period']['po_total'] ?? 0) - ($data['previous_period']['po_total'] ?? 0), 2) }} ر.س {{ ($data['po_change_percent'] ?? 0) >= 0 ? '+' : '' }}{{ number_format($data['po_change_percent'] ?? 0, 2) }}%
عدد الفواتير {{ $data['current_period']['invoice_count'] ?? 0 }} {{ $data['previous_period']['invoice_count'] ?? 0 }} {{ ($data['current_period']['invoice_count'] ?? 0) - ($data['previous_period']['invoice_count'] ?? 0) }} @if(($data['previous_period']['invoice_count'] ?? 0) > 0) {{ ($data['invoice_change_percent'] ?? 0) >= 0 ? '+' : '' }}{{ number_format(($data['previous_period']['invoice_count'] ?? 0) > 0 ? ((($data['current_period']['invoice_count'] ?? 0) - ($data['previous_period']['invoice_count'] ?? 0)) / ($data['previous_period']['invoice_count'] ?? 1)) * 100 : 0, 2) }}% @else - @endif
إجمالي الفواتير {{ number_format($data['current_period']['invoice_total'] ?? 0, 2) }} ر.س {{ number_format($data['previous_period']['invoice_total'] ?? 0, 2) }} ر.س {{ ($data['current_period']['invoice_total'] ?? 0) >= ($data['previous_period']['invoice_total'] ?? 0) ? '+' : '' }}{{ number_format(($data['current_period']['invoice_total'] ?? 0) - ($data['previous_period']['invoice_total'] ?? 0), 2) }} ر.س {{ ($data['invoice_change_percent'] ?? 0) >= 0 ? '+' : '' }}{{ number_format($data['invoice_change_percent'] ?? 0, 2) }}%
المبالغ المدفوعة {{ number_format($data['current_period']['paid_amount'] ?? 0, 2) }} ر.س {{ number_format($data['previous_period']['paid_amount'] ?? 0, 2) }} ر.س {{ ($data['current_period']['paid_amount'] ?? 0) >= ($data['previous_period']['paid_amount'] ?? 0) ? '+' : '' }}{{ number_format(($data['current_period']['paid_amount'] ?? 0) - ($data['previous_period']['paid_amount'] ?? 0), 2) }} ر.س @if(($data['previous_period']['paid_amount'] ?? 0) > 0) {{ (($data['previous_period']['paid_amount'] ?? 0) > 0 ? ((($data['current_period']['paid_amount'] ?? 0) - ($data['previous_period']['paid_amount'] ?? 0)) / ($data['previous_period']['paid_amount'] ?? 1)) * 100 : 0) >= 0 ? '+' : '' }}{{ number_format(($data['previous_period']['paid_amount'] ?? 0) > 0 ? ((($data['current_period']['paid_amount'] ?? 0) - ($data['previous_period']['paid_amount'] ?? 0)) / ($data['previous_period']['paid_amount'] ?? 1)) * 100 : 0, 2) }}% @else - @endif
المبالغ المعلقة {{ number_format($data['current_period']['pending_payment'] ?? 0, 2) }} ر.س {{ number_format($data['previous_period']['pending_payment'] ?? 0, 2) }} ر.س {{ ($data['current_period']['pending_payment'] ?? 0) >= ($data['previous_period']['pending_payment'] ?? 0) ? '+' : '' }}{{ number_format(($data['current_period']['pending_payment'] ?? 0) - ($data['previous_period']['pending_payment'] ?? 0), 2) }} ر.س @if(($data['previous_period']['pending_payment'] ?? 0) > 0) {{ (($data['previous_period']['pending_payment'] ?? 0) > 0 ? ((($data['current_period']['pending_payment'] ?? 0) - ($data['previous_period']['pending_payment'] ?? 0)) / ($data['previous_period']['pending_payment'] ?? 1)) * 100 : 0) >= 0 ? '+' : '' }}{{ number_format(($data['previous_period']['pending_payment'] ?? 0) > 0 ? ((($data['current_period']['pending_payment'] ?? 0) - ($data['previous_period']['pending_payment'] ?? 0)) / ($data['previous_period']['pending_payment'] ?? 1)) * 100 : 0, 2) }}% @else - @endif
متوسط قيمة الأمر {{ number_format($data['current_period']['average_po_value'] ?? 0, 2) }} ر.س {{ number_format($data['previous_period']['average_po_value'] ?? 0, 2) }} ر.س {{ ($data['current_period']['average_po_value'] ?? 0) >= ($data['previous_period']['average_po_value'] ?? 0) ? '+' : '' }}{{ number_format(($data['current_period']['average_po_value'] ?? 0) - ($data['previous_period']['average_po_value'] ?? 0), 2) }} ر.س @if(($data['previous_period']['average_po_value'] ?? 0) > 0) {{ (($data['previous_period']['average_po_value'] ?? 0) > 0 ? ((($data['current_period']['average_po_value'] ?? 0) - ($data['previous_period']['average_po_value'] ?? 0)) / ($data['previous_period']['average_po_value'] ?? 1)) * 100 : 0) >= 0 ? '+' : '' }}{{ number_format(($data['previous_period']['average_po_value'] ?? 0) > 0 ? ((($data['current_period']['average_po_value'] ?? 0) - ($data['previous_period']['average_po_value'] ?? 0)) / ($data['previous_period']['average_po_value'] ?? 1)) * 100 : 0, 2) }}% @else - @endif

ملخص الفترة الحالية

  • عدد الأوامر: {{ $data['current_period']['po_count'] ?? 0 }} أمر
  • قيمة الأوامر: {{ number_format($data['current_period']['po_total'] ?? 0, 0) }} ر.س
  • عدد الفواتير: {{ $data['current_period']['invoice_count'] ?? 0 }} فاتورة
  • المبالغ المدفوعة: {{ number_format($data['current_period']['paid_amount'] ?? 0, 0) }} ر.س

ملخص التغيرات

  • @if(($data['po_change_percent'] ?? 0) >= 0) @else @endif أوامر الشراء: {{ ($data['po_change_percent'] ?? 0) >= 0 ? '+' : '' }}{{ number_format($data['po_change_percent'] ?? 0, 2) }}%
  • @if(($data['invoice_change_percent'] ?? 0) >= 0) @else @endif الفواتير: {{ ($data['invoice_change_percent'] ?? 0) >= 0 ? '+' : '' }}{{ number_format($data['invoice_change_percent'] ?? 0, 2) }}%
  • المبالغ المدفوعة الإجمالية من الفواتير: {{ $data['current_period']['paid_amount'] ?? 0 > 0 ? number_format((($data['current_period']['paid_amount'] ?? 0) / max($data['current_period']['invoice_total'], 1)) * 100, 2) : 0 }}%
  • نسبة الفواتير المعلقة: {{ $data['current_period']['invoice_total'] ?? 0 > 0 ? number_format((($data['current_period']['pending_payment'] ?? 0) / max($data['current_period']['invoice_total'], 1)) * 100, 2) : 0 }}%
@push('scripts') @endpush @endsection