@extends('layouts.app') @section('content')
تقرير شامل للمنتجات والأصناف المشتراة من الموردين
إجمالي المنتجات
{{ count($data) }}
إجمالي الكميات
{{ number_format($data->sum('total_quantity'), 0) }}
إجمالي التكاليف
{{ number_format($data->sum('total_cost'), 2) }} ر.س
متوسط السعر
{{ number_format($data->count() > 0 ? $data->sum('total_cost') / $data->sum('total_quantity') : 0, 2) }} ر.س
| # | اسم المنتج | الكمية الإجمالية | التكلفة الإجمالية | متوسط السعر | عدد الموردين | النسبة المئوية |
|---|---|---|---|---|---|---|
| {{ $loop->iteration }} |
{{ $item['product_name'] ?? 'غير معروف' }}
ID: {{ $item['product_id'] }} |
{{ number_format($item['total_quantity'], 0) }} وحدة | {{ number_format($item['total_cost'], 2) }} ر.س | @if($item['total_quantity'] > 0) {{ number_format($item['total_cost'] / $item['total_quantity'], 2) }} ر.س @else - @endif | {{ $item['supplier_count'] ?? 1 }} موردين |
{{ number_format(($item['total_cost'] / $data->sum('total_cost') * 100) ?? 0, 1) }}% |
|
لا توجد بيانات حالياً لم يتم شراء أي منتجات بعد |
||||||
إجمالي المنتجات
{{ count($data) }}
إجمالي الكميات المشتراة
{{ number_format($data->sum('total_quantity'), 0) }} وحدة
إجمالي المصروفات
{{ number_format($data->sum('total_cost'), 2) }} ر.س
{{ number_format($item['total_quantity'], 0) }} وحدة × {{ number_format($item['total_cost'] / max($item['total_quantity'], 1), 2) }} ر.س
{{ number_format($item['total_cost'], 2) }} ر.س
{{ number_format(($item['total_cost'] / $data->sum('total_cost') * 100), 1) }}% من الإجمالي