@extends('layouts.app') @section('content')
مقارنة شاملة بين الفترة الحالية والفترة السابقة
عدد أوامر الشراء
{{ $data['current_period']['po_count'] ?? 0 }}
إجمالي الأوامر
{{ number_format($data['current_period']['po_total'] ?? 0, 2) }} ر.س
عدد الفواتير
{{ $data['current_period']['invoice_count'] ?? 0 }}
إجمالي الفواتير
{{ number_format($data['current_period']['invoice_total'] ?? 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 |