@extends('layouts.app')
@section('title', 'عرض أصل - '.config('app.name'))
@section('breadcrumb')
الرئيسية
›
المحاسبة
›
الأصول الثابتة
›
{{ $asset->asset_code }}
@endsection
@php
$methodLabels = [
'straightline' => 'خط مستقيم',
'reducing_balance' => 'متناقص',
'units_of_production' => 'وحدات إنتاج',
];
$statusLabels = [
'in_use' => ['label' => 'مستخدم', 'class' => 'bg-green-100 text-green-700'],
'stopped' => ['label' => 'متوقف', 'class' => 'bg-gray-100 text-gray-600'],
'decommissioned' => ['label' => 'خارج الخدمة', 'class' => 'bg-orange-100 text-orange-700'],
];
$st = $statusLabels[$asset->status] ?? ['label' => $asset->status, 'class' => 'bg-gray-100 text-gray-600'];
@endphp
@section('content')
المعلومات الأساسية
- رمز الأصل
- {{ $asset->asset_code }}
- فئة الأصل
- {{ $asset->fixedAssetCategory?->name_ar ?? $asset->category ?? '—' }}
- مركز التكلفة
- {{ $asset->costCenter ? $asset->costCenter->code.' — '.$asset->costCenter->name : '—' }}
- الموقع
- {{ $asset->location ?: '—' }}
- الوصف
- {{ $asset->description ?: '—' }}
- الحالة
-
{{ $st['label'] }}
@if($asset->fixedAssetCategory)
حسابات الدليل المرتبطة بالفئة
- حساب الأصل
-
@if($asset->fixedAssetCategory->ledgerAssetAccount)
{{ $asset->fixedAssetCategory->ledgerAssetAccount->code }}
— {{ $asset->fixedAssetCategory->ledgerAssetAccount->name_ar }}
@else
—
@endif
- مصروف الإهلاك
-
@if($asset->fixedAssetCategory->ledgerDepreciationCostAccount)
{{ $asset->fixedAssetCategory->ledgerDepreciationCostAccount->code }}
— {{ $asset->fixedAssetCategory->ledgerDepreciationCostAccount->name_ar }}
@else
—
@endif
- مجمع الإهلاك
-
@if($asset->fixedAssetCategory->ledgerAccumulatedDepreciationAccount)
{{ $asset->fixedAssetCategory->ledgerAccumulatedDepreciationAccount->code }}
— {{ $asset->fixedAssetCategory->ledgerAccumulatedDepreciationAccount->name_ar }}
@else
—
@endif
@endif
الاقتناء والقيمة
- تاريخ الاقتناء
- {{ optional($asset->acquisition_date)->format('Y-m-d') ?? '—' }}
- تكلفة الاقتناء
- {{ number_format((float) $asset->acquisition_cost, 2) }} SAR
- القيمة الدفترية
- {{ number_format((float) $asset->calculated_book_value, 2) }} SAR
- طريقة الإهلاك
- {{ $asset->depreciation_method ? ($methodLabels[$asset->depreciation_method] ?? $asset->depreciation_method) : '—' }}
- بداية الإهلاك
- {{ optional($asset->depreciation_start_date)->format('Y-m-d') ?? '—' }}
- القيمة المتبقية
- {{ $asset->salvage_value !== null ? number_format((float) $asset->salvage_value, 2).' SAR' : '—' }}
- العمر الإنتاجي (سنوات / أشهر)
- {{ (int) ($asset->useful_life_years ?? 0) }} / {{ (int) ($asset->useful_life_months ?? 0) }}
تفاصيل إضافية
- الرقم التسلسلي
- {{ $asset->serial_number ?: '—' }}
- الموديل / الصانع
- {{ trim(implode(' — ', array_filter([$asset->model, $asset->manufacturer]))) ?: '—' }}
- انتهاء الضمان
- {{ optional($asset->warranty_end_date)->format('Y-m-d') ?? '—' }}
- وثيقة التأمين / انتهاء التأمين
-
@if($asset->insurance_document || $asset->insurance_end_date)
{{ $asset->insurance_document ?: '—' }}
@if($asset->insurance_end_date)
· {{ $asset->insurance_end_date->format('Y-m-d') }}
@endif
@else
—
@endif
@endsection