@extends('layouts.pdf.base') @section('pdf-title', 'Depreciation Schedule') @section('pdf-subtitle') As of {{ now()->format('d M Y') }} @endsection @section('pdf-content') @foreach($assets as $asset) @php $accumulated = $asset->depreciationEntries->sum('amount'); $netBook = $asset->cost - $accumulated; @endphp @endforeach
# Asset Cost Accumulated Depreciation Net Book Value
{{ $loop->iteration }} {{ $asset->name }} {{ number_format($asset->cost, 2) }} {{ number_format($accumulated, 2) }} {{ number_format($netBook, 2) }}
@endsection