@extends('layouts.app') @section('title', 'Asset Register') @section('breadcrumb') @endsection @push('styles') @include('partials.report-datepicker-assets') @endpush @section('content') @php $companyId = auth()->user()->company_id; $fmt = fn ($n) => \App\Helpers\NumberHelper::formatAmount((float) $n, $companyId); @endphp @if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
@foreach($errors->all() as $e)
{{ $e }}
@endforeach
@endif
@forelse($assets as $asset) @empty @endforelse
Code Name Category Purchase Date Cost Accum. Dep. Book Value Status Actions
{{ $asset->code }}
{{ $asset->name }}
@if($asset->location)
{{ $asset->location }}
@endif
{{ $asset->category?->name ?? '—' }} {{ $asset->purchase_date?->format('d-m-Y') ?? '—' }} {{ $fmt($asset->purchase_cost) }} {{ $fmt($asset->accumulated_depreciation) }} {{ $fmt($asset->bookValue()) }} {{ $asset->statusLabel() }} @if(auth()->user()->hasPermission('fixed_assets', 'edit'))
@csrf @method('PATCH')
@csrf @method('DELETE')
@endif
No fixed assets found.
@if($assets->hasPages())
{{ $assets->links() }}
@endif
@include('fixed-assets.register._form-modal', ['modalId' => 'assetAddModal', 'formId' => 'assetAddForm', 'title' => 'New Asset', 'action' => route('fixed-assets.register.store')]) @include('fixed-assets.register._form-modal', ['modalId' => 'assetEditModal', 'formId' => 'assetEditForm', 'title' => 'Edit Asset', 'action' => '', 'method' => 'PUT']) @endsection @push('scripts') @endpush