@extends('layouts.app') @section('title', isset($asset) ? 'تعديل أصل - '.config('app.name') : 'أصل جديد - '.config('app.name')) @section('breadcrumb') الرئيسية › المحاسبة › الأصول الثابتة › {{ isset($asset) ? 'تعديل أصل' : 'أصل جديد' }} @endsection @section('content') @php $fixedAssetCategoryOptions = collect($categories ?? [])->map(fn ($category) => [ 'value' => $category->id, 'label' => trim((string) ($category->code ?? '').' - '.(string) ($category->name_ar ?? '')), ])->all(); $fixedAssetCostCenterOptions = collect($costCenters ?? [])->map(fn ($center) => [ 'value' => $center->id, 'label' => trim((string) ($center->code ?? '').' - '.(string) ($center->name ?? '')), ])->all(); $fixedAssetBankOptions = collect($bankAccounts ?? [])->map(fn ($bank) => [ 'value' => $bank->id, 'label' => trim((string) ($bank->bank_name ?? '').' - '.(string) ($bank->account_number ?? '')), ])->all(); $faPaymentMethodOpts = [ ['value' => 'cash', 'label' => 'نقدًا'], ['value' => 'bank', 'label' => 'تحويل بنكي'], ['value' => 'card', 'label' => 'بطاقة'], ['value' => 'check', 'label' => 'شيك'], ]; $faDepreciationMethodOpts = [ ['value' => 'straightline', 'label' => 'القسط الثابت'], ['value' => 'reducing_balance', 'label' => 'الرصيد المتناقص'], ['value' => 'units_of_production', 'label' => 'وحدات الإنتاج'], ]; @endphp